Discussion:
Copier enquiry/enhancement
aparsloe
2014-07-08 01:09:08 UTC
Permalink
Is there a reason why the copier ext_copy.py in the LyX
2.1.0/Resources/scripts folder does NOT have an option for copying to
the same directory as the LyX file? At present the copied files end up
in a subdirectory of the directory containing the LyX file.

I have a use case where copying to the same directory as the LyX file is
the natural thing to do. I've made a simple adjustment to the script so
that it allows this option, but it involved some wriggling around
permissions to get access to it. It would be good to have this
possibility written-in to the script so that the option was there
already for users (unless, that is, there is a strong reason for not
providing it).

Andrew
Richard Heck
2014-07-08 12:36:07 UTC
Permalink
Post by aparsloe
Is there a reason why the copier ext_copy.py in the LyX
2.1.0/Resources/scripts folder does NOT have an option for copying to
the same directory as the LyX file? At present the copied files end
up in a subdirectory of the directory containing the LyX file.
I have a use case where copying to the same directory as the LyX file
is the natural thing to do. I've made a simple adjustment to the
script so that it allows this option, but it involved some wriggling
around permissions to get access to it. It would be good to have this
possibility written-in to the script so that the option was there
already for users (unless, that is, there is a strong reason for not
providing it).
There's no reason that isn't an option. I didn't implement it that way
because its generally our policy not to "pollute" the user's directory
structure, and copying a bazillion image files would do that. But, as an
option, it's fine.

Richard
aparsloe
2014-07-09 00:50:37 UTC
Permalink
Post by Richard Heck
Post by aparsloe
Is there a reason why the copier ext_copy.py in the LyX
2.1.0/Resources/scripts folder does NOT have an option for copying to
the same directory as the LyX file? At present the copied files end
up in a subdirectory of the directory containing the LyX file.
I have a use case where copying to the same directory as the LyX file
is the natural thing to do. I've made a simple adjustment to the
script so that it allows this option, but it involved some wriggling
around permissions to get access to it. It would be good to have this
possibility written-in to the script so that the option was there
already for users (unless, that is, there is a strong reason for not
providing it).
There's no reason that isn't an option. I didn't implement it that way
because its generally our policy not to "pollute" the user's directory
structure, and copying a bazillion image files would do that. But, as
an option, it's fine.
Richard
I understand the pollution rationale and suspected that was the reason
for the LyXconv subdirectory. In my case I have one file (plus pdf) to
copy and burying it in a subdirectory seems excessive. My hope is that
the adjustment is made to ext_copy.py so that the option is available to
users for this kind of situation. Then I could refer to this copier and
its new option in the documentation to a latex package I've written.

(I've only just realised that the reason I couldn't get it to work from
the scripts folder of my personal LyX directory -- hence the battle with
permissions -- is that lyxpreview_tools.py also needs to be copied
across. I remember an item from a science class in my first year at high
school about 55 years ago: "simple animals learn slowly and soon forget".)

Andrew

Loading...