Bo Peng wrote:

> Dear list,
> 
> Attached is a Python version of the configure script. I currently do
> not have access to a windows machine with lyx on so I can not test it
> on windows. On my linux machine, it produces identical lyxrc.default
> and doc/LaTeXConfig.lyx but no further testing/proof-read of the code
> has been done.

Hi, Bo. Fantastic!

In anticipation of this being rolled into the LyX repository, can I get you
to drop an email to this list (replying to this mail would be perfect) in
which you state explicitly that you agree to licence your contributions
under the terms of the Gnu General Public Licence version 2 or later.

I'll then roll you into lib/generate_contributions.py.


Typically, our files contain blurb of the form:

# file configure.py
# This file is part of LyX, the document processor.
# Licence details can be found in the file COPYING.

# author Bo Peng
# Full author contact details are available in file CREDITS.

which makes it trivial to keep files in sync with licence and contact info.

==========================================================================

Looking at the file...

#### Adjust PATH for Win32 (Cygwin)
# i.e., change /cygdrive/c to c:
#
# FIXME: necessary? I assume that lyx/win does not like cygwin.

There's LyX/Win but there's also LyX/Cygwin. 


checkProg: the name of the executable will be "latex.exe". See "find_exe"
in lib/scripts/lyxpreview_tools.py. In fact, I'd imagine that this file
could be renamed as scripts/tools.py and used by configure.py.


Rather than that enormous 
writeToFile(outfile, '''
# This file has been automatically generated by LyX' lib/configure
# script. It contains default settings that have been determined by
...
\\converter latex dvi "%s" "latex"
...
''' % (latex_to_dvi, latex_to_pdf, latex_to_html_command, 

I think it would maintenance easier to output each converter separately:

writeToFile(outfile, '\\converter latex dvi "%s" "latex"' % latex_to_dvi)

It's going to be very easy to get out of sync with the code as it is now.

Well done!
Regards,
-- 
Angus

Reply via email to