On 24/05/2017 9:24 p.m., José Abílio Matos wrote:
On Wednesday, 24 May 2017 03.51.55 WEST Scott Kostyshak wrote:
Any objection from anyone else?
Scott
Honestly the use of the plus sign as a special character seems unnatural
to me. :-)
My suggestion would be to pass an option that specify just that, say -d.
The advantage of this approach it that it does not add new special
characters.
A patch follows attached. I have not updated the documentation.
Regards,
José Abílio
Thank you José. I was the person requesting this, and yes, -d is better
than using +.
(Deep breath.) I think ext_copy.py is only half of a pair of scripts.
The other half is a "dummy exporter", something like
## dummy_export.py
## a minimal script used to 'export' the
## current document and excite the LyX
## copier mechanism into action
import sys
fin = open(sys.argv[1], 'r') # $$i
fout = open(sys.argv[2], 'w') # $$o
fout.write('\n')
fin.close()
fout.close()
To give an example of use: if I want to copy the preview logs back from
the temp directory to the document directory or a subdirectory /LOGS of
it, I define a file format LOG (preview) with extension tmp. The copier is
python -tt $$s/scripts/ext_copy.py -e log -t LOGS $$i $$o
and under converters, from LyX to LOG (preview), enter
python -tt $$s/scripts/dummy_export.py $$i $$o
"Exporting" the current document to LOG (preview) format creates a file
<filename>.tmp in the temp directory (containing a single linefeed
character); ext_copy.py then springs into action and copies the preview
logs back to the /LOGS subdirectory of the document directory. Since I
use the LaTeX runs of the preview mechanism to perform various
non-standard tasks, the logs are often of great interest.
Using these two scripts together like this provides a fairly simple
mechanism for a user to rescue or preserve files from the temp
directory. Perhaps LyX developers might include something like
dummy_export.py, the "other half" of ext_copy.py, with LyX so that this
mechanism is available "out of the box"?
Andrew
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus