After that, I handed it off to the design team, who made it look beautiful!įrom Google Docs to InDes. In this way, I turned each chapter into a text file that could be easily placed into an InDesign file. Something like Figure-01-01.png is much more pleasant than GOHacks_Documents_Linked_ The program had to keep track of figures, number them as it went, and rename the files to something that Make's production crew would find easier to work with than the defaults. Without going into the gory details, the hard part was to set up a SAX parser whose events were triggered as bits of the HTML document were encountered. Just authenticate with a Google login (it prompts the user interactively for the password) and specify a DocId (which you can find in the URL of the Google document):Īfter that, I fed the document into the tidy processor and stored the text in a Perl variable. For this, I wrote a simple module ( GDoc.pm) that could authenticate itself to Google and request a zipped Google document, which includes the HTML file and images. The first trick was getting the HTML files out of Google Docs. Get your hands on stock photos, video templates and fonts for your next project with Envato. I'm sure there are dozens of better ways to do it, but this had the advantage of being quick and familiar for me to work with. Download unlimited digital assets with a single subscription. Most of my XML programming knowledge is frozen in time, so I turned to a couple of trusty tools that I was familiar with: tidy, for making sure that the HTML I got out of Google was proper HTML, and Perl's XML::SAX module, which I used to traverse the document and crank out the InDesign Tagged Text format as I went. To copy snippets and jot down thoughts while
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |