Il 02/10/2011 22:18, Alex Fernandez ha scritto:
I have uploaded to Savannah a test version which uses this feature:
   http://download-mirror.savannah.gnu.org/releases/elyxer/older/elyxer-lyx-C.py
To use LyX as a converter:
   $ elyxer --converter=lyx input.lyx output.html
It is a bit experimental at this moment, as I could not test it with your patch.

So, I just tried it out. It worked, but I had to modify it, because it was
trying to call back the system-wide lyx, instead of the trunk version I'm
experimenting with.

I have basically a couple of comments:

1) the output file-name is somewhat weird, as compared to the other
    LyX converters; specifically:

    $ ./src/lyx -e html ~/odg.lyx

    causes the output to go into ~/odg.html.LyXconv/odg.html (and the
    kk.png image to be placed in the same folder), but when
    converting to latex:

    $ ./src/lyx -e latex ~/odg.lyx

    then the output will go to ~/odg.tex (and all needed files exported to
    the same folder, i.e., ~/). Same thing happens now when exporting
    to xhtml. So, I'd like to see a common behaviour here.
On a related note, when trying to use the --destdirectory option, I get:

       Exception: Unused arguments: ['--destdirectory', '/tmp']

2) the --converter option of elyxer doesn't really allow for using an arbitrary program, because it is actually a string that is looked up internally within the converters map. I understand this is done in order to figure out what is the right syntax, however it might not be bad if one could specify the
    whole looked up syntax into the option itself.
    For example, in order to use elyxer with the trunk lyx, I had to modify
    elyxer as follows:

u'lyx':u'/home/tommaso/lyx-trunk-ws/lyx-trunk/src/lyx -C "$input" "$output"',

    however, AFAICS, a possible way to work around this might have been
    something along the line of:

    elyxer --converter '/path/to/my/lyx -C $input $output'

For example, imagine I install a brand new universal converter uconvert, then I could simply invoke elyxer specifying its syntax, instead to have
    to modify elyxer in order to specify the new converter and associated
    syntax.

Bye,

    T.

Reply via email to