On Sat, Jan 24, 2004 at 10:57:31AM -0600, Bo Peng wrote: > I guess I can use /bin/sh as UpdateCommand to call script file $$FName > to do whatever I want. This will never be included in the official > release though. :)
I did it! I added a shell template to my external_template. Now, I can specify command in $$FName and parameters in $$Parameter and get whatever `$$Fname $$Parameter` outputs. My lyx file can not be opened on another machine but I do not really care. With this functionality, everything can be automated so portability is only a small price to pay. Bo Template Shell GuiName "[Shell]" HelpText Run shell command Filename with given parameters. HelpTextEnd FileFilter "*" ViewCommand "xterm -e less $$Tempname" AutomaticProduction true Format LaTeX Product "$$Contents(\"$$Tempname\")" UpdateCommand "python $$Sysdir/scripts/general_command_wrapper.py - $$Tempname $$FName $$Parameters" FormatEnd Format Ascii Product "$$Contents(\"$$Tempname\")" UpdateCommand "python $$Sysdir/scripts/general_command_wrapper.py - $$Tempname $$FName $$Parameters" FormatEnd Format DocBook Product "$$Contents(\"$$Tempname\")" UpdateCommand "python $$Sysdir/scripts/general_command_wrapper.py - $$Tempname $$FName $$Parameters" FormatEnd Format LinuxDoc Product "$$Contents(\"$$Tempname\")" UpdateCommand "python $$Sysdir/scripts/general_command_wrapper.py - $$Tempname $$FName $$Parameters" FormatEnd TemplateEnd -- Bo Peng