[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Texi2html-bug] Help loading dynamically a format from the same file
From: |
Patrice Dumas |
Subject: |
[Texi2html-bug] Help loading dynamically a format from the same file |
Date: |
Tue, 28 Apr 2009 00:12:59 +0200 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
Hello,
The info backend now works, though I am waiting for some input from Karl
for some little issues remaining. So it is certainly time to try to be
less HTML centric, and also separate a bit things, setting apart argument
parsing (for instance to have a makeinfo or texi2html way to process
options), generic texinfo stuff and formatting.
The first thing I would like to do would be to setup texi2html such that
it doesn't produces html in the default case. Instead, I'd like to have
a raw text output that simply leaves things as is and use the ascii_*_map
in the default case. (It could also be thought as an example of the API
use).
Then the format to use could be set dynamically, like what makeinfo does
with --docbook, for example. If called as texi2html the output format
loaded in the default case would be html (with maybe some specific
texi2html features in top of an html common to makeinfo --html and
texi2html), called as makeinfo the output format would be info,
and --xml, --docbook and so on and so forth would do the right thing.
There are 2 possibilities to do that dynamical loading:
1. load an init file. Allready done like that, no problem.
2. load some code from within the texi2html script.
I would have preferred to do 2., but I have some trouble coming with
something simple in the current setting. The only solution I have come to
is to have a function that loads everything for a format, whose name is
known from the main program, and this function associates all the function
references and resets all the maps, hashes, arrays and default variables.
Does this looks sane to you?
Do you have another solution?
Maybe going to an object oriented solution (what I describe just above
being the constructor) instead of just using whatever is in the
Texi2HTML::Config namespace could be a better move, but I'd have liked
to keep the possibility to change things simply by putting some simple
perl code in an init file.
--
Pat
- [Texi2html-bug] Help loading dynamically a format from the same file,
Patrice Dumas <=