
i only look in on the d.p. forums intermittently these days so i had no idea there was huge amusement there this weekend. a thread started up discussing the generation of .epub files:
amazingly, it's as if it was their first time through this topic. thus, it strongly reminded me of the movie "groundhog day". among a plentitude of amusing and strange things going on, greg newby is over there saying "p.g. has no _resistance_ to d.p. doing .epub files, i don't know where you got that..." or consider that rfrank added this on page 2 of the thread:
In my opinion the real solution is, as it has always been, one source, many outputs with a generator that both DP and PG can use. That way, both DP and PG users are working with one file for now and for always. A generator would have a back-end for text, HTML and epub and for whatever is the next big thing when the time comes. Importantly, the single source file wouldn't change. The post-processor's job and the whitewasher's job would be greatly simplified. Errata handling would be merely editing one file and regenerating. User-requested formats could even be generated on-demand.
that's right. it's as if you were reading the gutvol-d archives. for 2003... or 2005... or 2007... or 2009... or last february... i kept expecting bill murray and andie macdowell to pop up... but you wanna know what's the funniest part of this scene? it's the _very_next_post,_ where marcello reports that -- for the e-books he makes for his personal use -- he uses restructuredtext, and then converts from that to a number of other formats, including .epub, .pdf, etc. to understand why this is so funny, you need to know that restructuredtext is a form of light markup much like z.m.l. so marcello has come over to my side of the fence. try to wrap your head around that. after insisting for years that i was crazy, to the point that he even put up a "fansite" that makes fun of all my quotes, marcello now uses the approach that i advocated all along. he was wrong. i was right. his own actions scream the truth. so now he's having the same arguments with the d.p. folks that i used to have with them, except where i used to plead to their rationality, he just outright calls them stupid, in his special inimitable marcello way. so there is a certain justice, stemming from that old saying about people who forget their history being doomed to repeat it. you doomed yourself, d.p. *** ah, but my role is also being played by roger frank, the part where it goes, "i believe i can make a master-format work". of course, i have since gone on to _make_it_work_, but that is but a mere technicality, right? if _roger_ says it can work... *** anyway, here's a bit more about restructuredtext... unlike z.m.l., it wasn't developed specifically for e-books, nor was it based on the pg-text-format in its extant form, so it would need to be extended to handle the p.g. library. neither does restructuredtext have the currency or the reach of _markdown_, the most popular light markup these days... but restructuredtext is a solid contender nonetheless... it is used as the master-format for official python documentation, so it has shown its range and versatility during that workout...
http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html
(observant observers will notice that light markup and python share the convention that whitespace is considered significant, which is a radical departure from most other forms of markup.) again, once you hack restructuredtext so that it works for p.g., you will end up with something that's strikingly similar to z.m.l. for instance, here's the restructuredtext version of headers:
Section Header ==============
Subsection Header -----------------
not bad. but not necessarily any better than the 4-1-2 style that has been employed by p.g. for well over a decade now... which is why i decided to keep the p.g. convention for z.m.l. *** of course, i always said that it would eventually come to this. once you grok the superiority of light markup for this task, it's _inevitable_... thus i always told you that i'd be here to snort "i told you so". so here i am, folks, listen up: "i told you so." *** by the way, i'm releasing _my_ conversion tool very soon. finally went and bought the domain name for it last week. i'll let you know when it drops... -bowerbird