Afficher un message
Vieux 17/09/2007, 08h46   #4
micathom
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: uniforma-0.0.1 - converter for text formats

> Library for parsing "simple text" formats (RD, Textile, Markdown, etc.) and
> generating output in various formats (including simple text, html/xml and
> more complex ones).


I wrote deplate[1], which has similar goals (well, with the exception
of
source quality maybe ;-).

The point here is of course that simple formats are easy to parse, so
the question is how simple do you mean with "simple".

> I want be able to easy define MS Word generator (using
> win32ole, of course, no hand-made heroism).


If simple is really simple like rdoc-simple, why not simply import
HTML?
Although I like slightly more the way how OpenOffice uses HTML files.

If "simple" includes cross references, footnotes, endnotes, headers,
footers, table of contents/tables/figures etc., I think you'll
probably
need:

- a general way to define counters and lists
- some notion of metadata (like index, footnotes, labels, section
names etc.)
- make it possible to locate text at some random position in the
output document (eg for headers & footers), e.g. move text to
the
top of the document, after packages are required but before the
start of the body etc. deplate defines "slots" for this which
allows users to place the element at any position they want.
- on the long (or intermediate-distance) run, you might also
think
of some plugin-mechanism (e.g. e-mail obfuscation that may be
loaded when converting the document without being hard-coded,
although this could also be done by post-processing the output).

> * non-line based formats parsers (in fact, it also has one "toy" parser for
> HTML, which even works! on not-very-complex HTML documents)


>From a pragmatic point of view, using hpricot and writing and map

classes on its output could be the better strategy.

Anyway, I'm eager to see how this develops.

Cheers,
Thomas.


[1] http://deplate.sf.net


  Réponse avec citation
 
Page generated in 0,05385 seconds with 9 queries