[Goodies-commits] r2960 - in thunar-thumbnailers/trunk: . pdf-thumbnailer svgz-thumbnailer

Mike Massonnet mmassonnet at gmail.com
Tue Aug 7 18:33:38 CEST 2007


Hi Erland,

On Tue, Aug 07, 2007 at 11:19:31AM +0000, Erlend Davidson wrote:
> Author: erland
> Date: 2007-08-07 11:19:31 +0000 (Tue, 07 Aug 2007)
> New Revision: 2960
> --- thunar-thumbnailers/trunk/pdf-thumbnailer/pdf-thumbnailer	                        (rev 0)
> +++ thunar-thumbnailers/trunk/pdf-thumbnailer/pdf-thumbnailer	2007-08-07 11:19:31 UTC (rev 2960)
> @@ -0,0 +1,35 @@
> +#!/bin/sh
> +#
> +#  Copyright 2007 Erlend Davidson <Erlend.Davidson at gmail.com>
> +#
> +#  This program is free software; you can redistribute it and/or modify
> +#  it under the terms of the GNU General Public License as published by
> +#  the Free Software Foundation; either version 2 of the License, or
> +#  (at your option) any later version.
> +#
> +#  This program is distributed in the hope that it will be useful,
> +#  but WITHOUT ANY WARRANTY; without even the implied warranty of
> +#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +#  GNU Library General Public License for more details.
> +#
> +#  You should have received a copy of the GNU General Public License
> +#  along with this program; if not, write to the Free Software
> +#  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
> +#
> +# ps-thumbnailer - thumbnailer script for PS files.
> +#
> +# Usage: ps-thumbnailer ps-file png-file size
> +#
> +
> +# command line parameters
> +ifile=$1
> +ofile=$2
> +size=$3
> +
> +# evince-thumbnailer is better, check if that is installed
> +if [ `which evince-thumbnailer` ]; then
> +    exec evince-thumbnailer -s 128 $ifile $ofile
> +fi
> +
> +# invoke convert (ImageMagick)
> +exec convert "pdf:$ifile[0]" -scale "$sizex$size" "png:$ofile"

That will call evince if there, and convert finally.  You need to add an
exit 0 in the "if" condition or something like that.


Mike.



More information about the Goodies-commits mailing list