Astuce pour impression carte CNFD
* cd /home/ndimby/cartes-abts/
* ./numeroter février 2010 40 50 (impression de 400 cartes à 510)
MOIS=$1 ANNEE=$2 DEBUT=$3 FIN=$4 rm tmp/*.ps cp template-verso.svg tmp/verso.svg perl -i.bak -pe "s/MMMMMMMMMM/$MOIS/;s/YYYY/$ANNEE/;" tmp/verso.svg for a in $(seq $DEBUT $FIN); do ./numeroter.pl $a <tmp/verso.svg >tmp/tmp.svg inkscape -z -f tmp/tmp.svg -P "tmp/$a.ps" done
* script de modification des numéros
# numeroter.pl -- # Author : J<E9>r<F4>me Santini <Jerome.Santini@auf.org> # Created On : Fri Nov 26 08:47:33 2004 # Last Modified By: J<E9>r<F4>me Santini <Jerome.Santini@auf.org> # Last Modified On: Wed Dec 22 12:41:42 2004 # Update Count : 12 use strict; my $num = $ARGV[0]; my $cnt = $num * 10; while ((<STDIN>)) { if ((/XXXX/)) { my $xxxx ; $cnt++; $xxxx = sprintf "%04d",$cnt; s/XXXX/$xxxx/; } print; } # -------------------------------------------------------------------- # EOF
* Imprimer après avoir défini l'imprimante par défaut:
lpr tmp/*.ps