chiark / gitweb /
adjust re node.js ishness
[talk-2019-ghm-rust.git] / txt2ps
1 #!/usr/bin/perl -w
2
3 use strict;
4
5 my $fs=11;
6
7 print "
8 \%!
9  /Courier findfont $fs scalefont setfont
10  0 800 moveto
11 " or die;
12
13 print "gsave 1 setgray 0 $fs rlineto stroke grestore\n" or die $!;
14
15 while (<STDIN>) {
16     chomp or die;
17     print "gsave (" or die;
18     s/[\\()]/\\$&/g;
19     print or die $!;
20     print ") show grestore 0 -$fs rmoveto\n" or die $!;
21 }
22
23 print "1 setgray 0 $fs rmoveto 1 1 rlineto stroke showpage\n" or die $!;