On 09/08/2011 01:57 PM, Julien Rioux wrote:
> On 08/09/2011 7:34 PM, Tommaso Cucinotta wrote:
>> Hi,
>>
>> would it be possible to add to LyX the possibility to specify an
>> explicit output file-name when exporting from the command-line to a
>> different format ?
>>
>> Something along the line of:
>>
>> lyx -e latex -o /path/to/output.tex /path/to/input.lyx
>>
>> While writing scripts and automating conversions, I don't want the
>> exported files to pollute the working folder, but rather I prefer to
>> have control on where to place them (normally temporary or "output"
>> folders).
>>
>> Thanks,
>>
>> T.
>>
>
> Sure, it's possible, but nobody works on it.
>
> http://www.lyx.org/trac/ticket/4501
>
Presumably what is needed here is a "buffer-export-as" LFUN. But making
this work naturally from the command line will be trickier than it
looks. In effect, "-e pdf" is just shorthand for:
    -x "buffer-export pdf"
so the -o switch comes too late to change the effect of -e. (Look at the
code for easyParse in LyX.cpp). The easy thing to do would be to add a
new switch, say, -E, which takes two arguments, and have that act as
shorthand for:
    -x "buffer-export-as pdf /path/to/export.lyx"

Richard

Reply via email to