Hi,
I currently have the data for a book in a MySQL database. One table contains the book metadata (title, subtitle, ISBN, etc.) and another contains the chapters (title, text, etc.). The chapters (about 40 in all, each about 1,200 words) are tagged with HTML. I use a PHP script to write this content to either a web-based book (separate .html files) or an EPUB book (.xhtml files, .opf file, TOC, etc, which are then zipped into a .epub file). This works well (that is, the book looks good and the EPUB file validates).
My next step is to create screen and print-ready PDFs. I've tried using Access VBA to write the MySQL content to a Word doc and then export to PDF using Acrobat. The results are, not surprisingly, only mediocre, mostly because Word is such a poor page design tool.
InDesign is far superior, so my question is this: What is the best way to get my metadata and HTML content from MySQL into an InDesign book structure?
When I say "best", I mean "with the least amount of manual tweaking afterward, but still looking great."
I can code at a high level in PHP and JavaScript and I know my way around XML and InDesign. Note that this doesn't have to be two-way. That is, I'm fine having the MySQL data as the "master copy" of the book, so any changes would flow from MySQL to InDesign (but not the other way).
I've looked into third-party database plugins, but why pay hundreds, even thousands of dollars when I can code something myself?
Any and all suggestions are appreciated.
Cheers,
Paul