This, I know, is the code a lot of people have been waiting for. It hasn’t been posted till now mostly because I’ve been trying to package everything to make it plug-and-play. At a certain point it was time to give up.
The code isn’t hard to grasp, but it will take some modification to get it to work.
The code is all on Github. Essentially it reads posts from WordPress via XMLRPC and creates InDesign Tagged Text files on a local drive.
I’ve written XMLRPC extenders for WordPress to go with this code. It is also on Github.
The XMLRPC extender simply allows us to query based on a lot more options and return a very full result. The real work is in the import script, and there you’ll have to do some modifications to make it work with your InDesign styles.
For us, this script is running on a server on our local network that everyone here has access to. We let it run every minute by setting up this simple cron job:
*/1 * * * * curl localhost/import.php
You’ll need a folder to store all the files in. By default it’s a directory called files. You’ll need to make sure that has the proper permissions to be written to.
By default all the stories will be saved in that folder named id.txt. We use this to programmatically pull the stories into InDesign, but that plugin isn’t released yet. You might want to consider naming the files using the story title to make it more easily human readable.
The templating process isn’t quite as easy as WordPress’, but if you’re familiar at all with styles and PHP you should be able to figure things out. The code is pretty well documented, I think, but if you have questions please leave them as a comment on this post and I will do my best to respond to all of them.
Pingback: This Week in InDesign Articles, Number 84 | InDesignSecrets
Yeah, I’m pretty sure your script won’t work on a mac, huh?
The script runs off PHP, and we actually had it running on a mac to start. You should be able to as well once you’ve enabled web services and PHP or installed MAMP.
This looks very promising. I’m excited to dig more into it.
Thanks, let me know if you have any questions.
Hi this looks very awesome and for me as a student can help me allot. For my projects i need to keep track of what i did and make a full report of it, needs to have a nice template for it so that i can make it well presented.
This I do in indesign, but i’me not that good in coding stuff. HTML and CSS are my basic skills and I know a bit of PHP but this really blows my mind. So I wondered if you have had some progress with the plugin yet? I cant wait till its released.
If this isn’t possible yet could you make me a small (noob) tutorial?
Hope to here from you,
Hey Rik, are you referring to actual InDesign plugin?
this sounds awesome! i just stumbled into this today, and i might just need to do something like this for a big project. do you know if there were any updates since this?
thanks!!
Daniel,
There are actually some updates. I’ll try to post them here soon.
awesome! can you email me whenever you post these? thanks!