View Single Post
Old 11-02-2007, 08:32 PM   #10
bowerbird
Banned
bowerbird has been very, very naughtybowerbird has been very, very naughtybowerbird has been very, very naughty
 
Posts: 269
Karma: -273
Join Date: Sep 2006
Location: los angeles
nate said:
> Will the output be in HTML? That's the closest I know to a universal file type.

i will transform the pg-ascii files into my own format -- z.m.l. --
which stands for "zen markup language", a light-markup system.

i designed z.m.l. based on pg-ascii, to speed the transformation.

or, more accurately, to tell the story the way it really evolved,
i original wrote a viewer-program for project gutenberg e-texts.

what happened was that writing the viewer-program was easy,
but resolving inconsistencies in the p.g. e-texts made it complex.

at some point, i threw up my hands and said, "it will be easier to
create a set of dirt-simple rules, and then make all the e-texts be
consistent with that rule-set, than continue efforts at overcoming
never-ending p.g. inconsistencies." fortunately, i'd already coded
routines to resolve the bulk of the inconsistencies, so it was simple
to "convert" an e-text just by outputting a _consistent_ version of it.
(for example, making sure it had 4 blank lines before each header.)

in the end, it's better to have a consistent library, because then other
developers can concentrate on adding value, instead of parsing text...

z.m.l. is a set of simple rules for expressing the _structure_ of a book.
that is to say, all the structural elements are indicated in a unique way.

this means a zml-viewer can take a z.m.l. file as _input_ and render it.

it also means that converter-routines can transform a z.m.l. file into
outputs of various types. thus far, i have focused on .html and .pdf...

z.m.l. viewer-apps are easy to program, because the z.m.l. format is simple.
i've already written various iterations in 3 languages, including basic and perl.

i'm biased, of course, but i think my viewer kicks other programs to the curb...
so, eventually, if you've got a book in z.m.l., you won't even want to convert it,
because there will be a zml-viewer-program that will run wherever it's needed...

long-run, i even expect browsers to accept z.m.l. and display it correctly.

here's a webpage where you can see zml-to-html canned demos:
> http://z-m-l.com/go/vl3.pl
click the linked book-titles to see the z.m.l., or the button to convert it.

if you're brave, you can even experiment with live zml-to-html conversion:
> http://z-m-l.com/go/zmldingus093.pl
click in the same canned demos from the url above, or click "skeleton"
to bring in a skeleton book, which you can edit, and then click "do it"...

-bowerbird
bowerbird is offline