chiark
/
gitweb
/
~ijackson
/
d.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8ebd2cc
)
numbered-alias-sheet: wip
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Wed, 30 Oct 2013 21:50:32 +0000
(21:50 +0000)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 3 Nov 2013 15:26:44 +0000
(15:26 +0000)
numbered-alias-sheet
patch
|
blob
|
history
diff --git
a/numbered-alias-sheet
b/numbered-alias-sheet
index a285be65a15029d3781ea02f824908969c8d8e8c..ef9e2bb12ca59b3dbe52424bea00dcc695ec127f 100755
(executable)
--- a/
numbered-alias-sheet
+++ b/
numbered-alias-sheet
@@
-9,19
+9,31
@@
our $font = 'Courier';
our $usage = <<END;
usage: $us [<options>] <foo-mail-pregen> <foo-mail-pregen-opts>...
options:
our $usage = <<END;
usage: $us [<options>] <foo-mail-pregen> <foo-mail-pregen-opts>...
options:
- -p<papersize> default is $papersize
+ -p<papersize> default is $papersize
(for libpaper, or "creditcard")
-f<fontsize> default is ${fontsize}pt
-F<font> default is $font
END
-f<fontsize> default is ${fontsize}pt
-F<font> default is $font
END
+our $paperx, $papery;
+
for (;;) {
badusage unless @ARGV;
last unless $ARGV[0] =~ m/^-/;
$_ = shift @ARGV;
last if m/^--?$/;
while (m/^-./) {
for (;;) {
badusage unless @ARGV;
last unless $ARGV[0] =~ m/^-/;
$_ = shift @ARGV;
last if m/^--?$/;
while (m/^-./) {
- if (s/^-p(.*)$//) {
-
+ if (s/^-p(\w+)$//) {
+ $papersize = $1;
+ } elsif (s/^-f([0-9]+)$//) {
+ eval { $fontsize = $1
+
+ } elsif (s/^-pcreditcard$//) {
+
+
+ my $
+ $!=0; $?=0; my $r = `paperconf -sp $1`;
+ defined $r or die "paperconf failed: $? $!\n";
+ $r =~ m/^([0-9.]+) ([0-9.]+)$/ or die "$_ ?";
p
while (@ARGV && $ARGV[0] =~ m/^-/) {
p
while (@ARGV && $ARGV[0] =~ m/^-/) {