[LyX/master] Example script for looking up the citation pdfs.

Jürgen Spitzmüller spitz at lyx.org
Mon Aug 24 09:13:56 UTC 2020


Am Freitag, den 21.08.2020, 09:56 +0200 schrieb Pavel Sanda:
> I am not entirely against pythonic solution, but I think at this
> stage it's really for win users to step up. I can make the linux part
> working if they come up with a solution.

Humble attempt attached. Works for me (on Linux) and is surprisingly
fast (though arguably a bit slower than locate).

Some advantages over the bash script apart from portability:

* No hardcoded viewer. This checks for the same set of viewers than
configure.py and takes the first match. Also, there are options to
specify a custom pdf/ps viewer (-v and -w)

* Handles filenames with spaces (can be easily fixed in the bash script
though)

I suppose if the python find method turns out to be too slow, we can
also use locate on *nix and the equivalent (dir?) on windows and only
fall back to the python method if none of these is available.

Pavel, what do you think?

Jürgen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lyxpaperview.py
Type: text/x-python3
Size: 3632 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20200824/ab18cab0/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20200824/ab18cab0/attachment.asc>


More information about the lyx-devel mailing list