Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 23 lines (16 sloc) 0.548 kb
c0ad07f7 »
2009-11-06 [tutorial/make-pdf] ported to Perl 6
1 #!/usr/local/bin/perl6
2d1d511d »
2009-11-04 [tutorial] started putting together one
2
3 my $inkscape_executable
4 = '/Applications/Inkscape.app/Contents/Resources/bin/inkscape';
5
73ba441b »
2009-11-05 [make-pdf] silenced STDERR
6 die 'Could not find inkscape'
c0ad07f7 »
2009-11-06 [tutorial/make-pdf] ported to Perl 6
7 unless $inkscape_executable ~~ :f;
73ba441b »
2009-11-05 [make-pdf] silenced STDERR
8
8e3fe49c »
2009-11-06 [tutorial/make-pdf] number-of-pages no longer hardcoded
9 run 'rm -rf pdf/*';
10
11 my $i = 0;
12 while 'src/' ~ (my $page = 'page' ~ ++$i) ~ '.svg' ~~ :f {
13 run
14 "$inkscape_executable "
15 ~ "--without-gui --file=src/$page.svg "
16 ~ "--export-pdf=pdf/$page.pdf 2> /dev/null";
17 }
2d1d511d »
2009-11-04 [tutorial] started putting together one
18
c0ad07f7 »
2009-11-06 [tutorial/make-pdf] ported to Perl 6
19 run
2d1d511d »
2009-11-04 [tutorial] started putting together one
20 'gs -q -sPAPERSIZE=letter -dNOPAUSE -dBATCH -sDEVICE=pdfwrite'
c0ad07f7 »
2009-11-06 [tutorial/make-pdf] ported to Perl 6
21 ~ " -sOutputFile=win.pdf pdf/*.pdf 2> /dev/null";
2d1d511d »
2009-11-04 [tutorial] started putting together one
22
Something went wrong with that request. Please try again.