Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 23 lines (16 sloc) 0.548 kB
c0ad07f @masak [tutorial/make-pdf] ported to Perl 6
authored
1 #!/usr/local/bin/perl6
2d1d511 @masak [tutorial] started putting together one
authored
2
3 my $inkscape_executable
4 = '/Applications/Inkscape.app/Contents/Resources/bin/inkscape';
5
73ba441 @masak [make-pdf] silenced STDERR
authored
6 die 'Could not find inkscape'
c0ad07f @masak [tutorial/make-pdf] ported to Perl 6
authored
7 unless $inkscape_executable ~~ :f;
73ba441 @masak [make-pdf] silenced STDERR
authored
8
8e3fe49 @masak [tutorial/make-pdf] number-of-pages no longer hardcoded
authored
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 }
2d1d511 @masak [tutorial] started putting together one
authored
18
c0ad07f @masak [tutorial/make-pdf] ported to Perl 6
authored
19 run
2d1d511 @masak [tutorial] started putting together one
authored
20 'gs -q -sPAPERSIZE=letter -dNOPAUSE -dBATCH -sDEVICE=pdfwrite'
c0ad07f @masak [tutorial/make-pdf] ported to Perl 6
authored
21 ~ " -sOutputFile=win.pdf pdf/*.pdf 2> /dev/null";
2d1d511 @masak [tutorial] started putting together one
authored
22
Something went wrong with that request. Please try again.