Copy link to clipboard
Copied
I use DataMerge for about 3 years by now. But until today I'm not using any scripts to do my job.
All the thirdparties plugins are too expensive and now I want to make some things by myself.
Of Course if I can get some help with pros like you guys, will be more easy.
My true problem is to make yearbook pages. Today I make like this.
With DataMerge I create all pages with the data of the class. like
eg: High Schooll 2nd Grade - Noon Period ,
High Schooll 3nd Grade - Noon Period
High Schooll 4nd Grade - Noon Period
.. ...and so on.
Them one class by the time I populate the pictures of the students...With Captions
And I getting to work with the script inlineMerge , but that script populate all the data in one textBox.
I have to manually separate the classes.
My data is allways in .txt.
Is possible to sort by class ?
I really need a script ? If I did , can you help ?
I"m learning the basics of scripts, but I dont known where to start.
Ok, I guess you can write code to do some datamerge, messing documents and so on. But, if I had to do this without any paid-for plugin, I would consider XML import.
I did a quick and dirty template into which I can inject data and get all the data imported in one pass. Feel free to drop an eye on attached file (remember it's a proof of concept, would probably need some adjustment).
Good thing is, you don't need scripting. Well theorically speaking given that your data is in Excel. So in your pos
...Copy link to clipboard
Copied
We are always helping people who want to do efforts in order to accomplish their goals. The first question is how adequate data merge is for your project. I am having some issues understanding why it's a 2 step effort currently but I am probably missing a thing or two.
So my questions right now would be:
1) Can you share screenshots at minimum about the end result?
1) Can you share screenshots at minimum about the initial layout?
2) Do you have control over data output (I mean the csv here)? Can it be xml if needed?
Once your project, I think we can discuss the best option and provide guidelines.
Loic
Copy link to clipboard
Copied
thanks in advance !
sure , this is a old layout . But its something like that . Some job we have the "group" shot , and the faces at side.
I use datamerge with excell exporting in tab-delimited. (don't know , but I get some errors using .csv)
in the data we have:
group photo | individual photo | name | Grade |
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Ok, I guess you can write code to do some datamerge, messing documents and so on. But, if I had to do this without any paid-for plugin, I would consider XML import.
I did a quick and dirty template into which I can inject data and get all the data imported in one pass. Feel free to drop an eye on attached file (remember it's a proof of concept, would probably need some adjustment).
Good thing is, you don't need scripting. Well theorically speaking given that your data is in Excel. So in your position, my challenge would be to turn my excel data into a valid XML structure I could inject into inDesign.
It's likely you can export data to XML from Excel (or use some CSV to XML online converter). But it will be some XML structure that won't fit InDesign. You would need to change the structure and XSLT can be used for that. XSLT is basically a file including instructions to reformat an XML structure.
It may sound complicated but regarding pros and cons, I would consider it. I don't think it will be specifically more complex than learning how to use datamerge with scripting plus all the additional code.
Here are some details:
1) The InDD template:
What I did here is to place all items I need with repeating formatting in mind. For ex, I don't create all "students" frames, only one that will be repeated. The same apply for the "school" (i.e. all data for a specific school) that will be repeated.
2) Data
I exported a default XML and created dummy additional data (Escuela A, Escuela B, Escuela C).
<?xml version="1.0" encoding="UTF-8"?>
<schools>
<school>
<school_section>
<school_name>ESCUALA A</school_name>
<school_section_name>SECTION A</school_section_name>
<school_picture href="file:///Users/ozalto/Desktop/escuela.png"/>
</school_section>
<students>
<student>
<student_container>
<student_name_container>
<student_first_name>FIRST NAME A1</student_first_name>
<student_last_name>LAST NAME A1</student_last_name>
</student_name_container>
<student_image href="file:///Users/ozalto/Desktop/student1.png"/>
</student_container>
</student>
<student>
<student_container>
<student_name_container>
<student_first_name>FIRST NAME B1</student_first_name>
<student_last_name>LAST NAME B1</student_last_name>
</student_name_container>
<student_image href="file:///Users/ozalto/Desktop/student2.png"/>
</student_container>
</student>
<student>
<student_container>
<student_name_container>
<student_first_name>FIRST NAME C1</student_first_name>
<student_last_name>LAST NAME C1</student_last_name>
</student_name_container>
<student_image href="file:///Users/ozalto/Desktop/student3.png"/>
</student_container>
</student>
</students>
</school>
<school>
<school_section>
<school_name>ESCUALA B</school_name>
<school_section_name>SECTION B</school_section_name>
<school_picture href="file:///Users/ozalto/Desktop/escuela.png"/>
</school_section>
<students>
<student>
<student_container>
<student_name_container>
<student_first_name>FIRST NAME A2</student_first_name>
<student_last_name>LAST NAME A2</student_last_name>
</student_name_container>
<student_image href="file:///Users/ozalto/Desktop/student3.png"/>
</student_container>
</student>
<student>
<student_container>
<student_name_container>
<student_first_name>FIRST NAME B2</student_first_name>
<student_last_name>LAST NAME B2</student_last_name>
</student_name_container>
<student_image href="file:///Users/ozalto/Desktop/student2.png"/>
</student_container>
</student>
<student>
<student_container>
<student_name_container>
<student_first_name>FIRST NAME C2</student_first_name>
<student_last_name>LAST NAME C2</student_last_name>
</student_name_container>
<student_image href="file:///Users/ozalto/Desktop/student1.png"/>
</student_container>
</student>
</students>
</school>
<school>
<school_section>
<school_name>ESCUALA C</school_name>
<school_section_name>SECTION C</school_section_name>
<school_picture href="file:///Users/ozalto/Desktop/escuela.png"/>
</school_section>
<students>
<student>
<student_container>
<student_name_container>
<student_first_name>FIRST NAME C1</student_first_name>
<student_last_name>LAST NAME C1</student_last_name>
</student_name_container>
<student_image href="file:///Users/ozalto/Desktop/student2.png"/>
</student_container>
</student>
<student>
<student_container>
<student_name_container>
<student_first_name>FIRST NAME C2</student_first_name>
<student_last_name>LAST NAME C2</student_last_name>
</student_name_container>
<student_image href="file:///Users/ozalto/Desktop/student3.png"/>
</student_container>
</student>
<student>
<student_container>
<student_name_container>
<student_first_name>FIRST NAME C3</student_first_name>
<student_last_name>LAST NAME C3</student_last_name>
</student_name_container>
<student_image href="file:///Users/ozalto/Desktop/student1.png"/>
</student_container>
</student>
</students>
</school>
</schools>
3) Last step is to import data into template:
4) Result
Once again, not the prettiest result but it shows that XML data gently flowed into the template.
You get the idea. I hope it can help.
Copy link to clipboard
Copied
thanks. I'm not used to .xml , but I will try to learn . Its a great solution.
In .xml I can use the images in a folder without using the complete path like you did?
Today I only use the name of the image in the excell file with extension.
Copy link to clipboard
Copied
BTW, this is where XSLT can come handy because you can reformat data. In case, images wouldn't be found locally but on a specific location. But it requires some XSLT knowledge, not extremely complex but not easy at first.
Copy link to clipboard
Copied
I'm having trouble just to understand how I can transform my datasheet to xml with that complex structure, without I'm having to manually add data .
Copy link to clipboard
Copied
Yes, specifying a relative path works given that the resource is found. Regarding images and xml, you have to be sure images are found before importing or you will get the InDesign link not found warning. If you have one image missing, it's ok. If you have hundreds of them, you will have a bad time, believe my experience on this one 😉
Copy link to clipboard
Copied
I just want to thank you ...I discover I use a lot one of your scripts "Inline Merge" to make some of my jobs.
Like that I ask here. I basically flow all the pictures of all school in a frame and use grep to find and replace a special character that I put on between classes previous on my datasheet. To make the panels with just the individual photos, I can do without much trouble that way.
My problem is when I have this "group" shot. Today I make in two steps.
But thanks to bring some new horizonts .
Copy link to clipboard
Copied
I think my (not free) Yearbook Creator add-on could help you a lot:
Copy link to clipboard
Copied
Yes, Ariel, I am myself a big advocate of paid-for solutions instead of twisting your own arm trying to build complex things that editors have already solved. The ROI is often unbeatable. I was only introducing XML as a solution as our friend was looking for a "free" approach and I wish he can consider your tool 😉
Loic