Re: Better PDF/PS/Dia thumbnailers



On Tue, 2003-03-25 at 01:52, Alexander Larsson wrote:
> On 20 Mar 2003, Peter Harvey wrote:
> 
> > Hi all,
> > 
> > Since I have a large collection of PostScript and PDF files I found the
> > thumbnailers posted (by Keith Conger?) very useful, but not fast enough.
> > So I have modified them to improve both quality and speed. When
> > installed these new scripts provide nice 128x128 thumbnails for:
> >  - PDF files
> >  - PostScript files
> >  - Dia diagrams
> 
> Uhm. Doesn't all these scripts generate 80x80 thumbnails?

Thanks for that. :) I used to have them generating 128x128 thumbnails,
but changed it to 80x80 because they were too large - I wanted them the
same size as my desktop icons, which are all 64x64. I've updated the
scripts (and the description with them) to use the %s thing you
mentioned. However, it doesn't seem to be working for me, so I won't
upload the (minor) changes just yet. The following dumps from my
terminal should show that:

harvey samwise:~$ gconftool-2 -a /desktop/gnome/thumbnailers/application pdf
 command = gnome-thumbnail-pdf %u %o %s
 enable = true

harvey samwise:~$ touch CPLEX75_getstart.pdf ; ps -u harvey -o pid,args |grep thumbnail
 1795 /bin/sh /usr/local/bin/gnome-thumbnail-pdf file:///home/harvey/CPLEX75_getstart.pdf /tmp/.gnome_thumbnail.rPMIHR
 1797 grep thumbnail
 1798 /bin/sh /usr/local/bin/gnome-thumbnail-pdf file:///home/harvey/CPLEX75_getstart.pdf /tmp/.gnome_thumbnail.rPMIHR
 1799 /bin/sh /usr/local/bin/gnome-thumbnail-pdf file:///home/harvey/CPLEX75_getstart.pdf /tmp/.gnome_thumbnail.rPMIHR

Not only is the script not being run with the size argument, it's also
being run 3 times following a single touch. I've noticed that sometimes
files which are currently being written to (by pdflatex or dvips for
example) don't end up with a thumbnail. Probably because the file was
finished *while* the script was running (haven't downloaded the Nautilus
source, so can't verify this). There may be some problems with the way
Nautilus handles file updated (reported by fam, right?).

Where can I find a list of the arguments which can be passed to my
scripts? Is %u %o and %s all there are? Also, what would be the
recommended way to specify that thumbnails should be around the same
size as my icons?

Thanks heaps for the help.

-- 
Peter Harvey <pharvey uow edu au>





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]