On Mon, Aug 24, 2020 at 11:13:56AM +0200, Jürgen Spitzmüller wrote:
> 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?

I believe it is near to impossible to code a script which would fit to most
people. 

E.g. the first run of your script takes 1 min on my machine and won't find
half of my papers because they are outside home dir. By that I don't mean
we should improve it, it's just that interested ppl really need to customize
the code on their own.

My take is to commit paperview.py as well and change the configure that both
script can be found if installed in PATH (and make sure they are not available
for running by default).

Pavel
-- 
lyx-devel mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to