chiark
/
gitweb
/
~yarrgweb
/
ypp-sc-tools.db-live.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Allow computing and using dest stall poe limit
[ypp-sc-tools.db-live.git]
/
yarrg
/
web
/
autohandler
diff --git
a/yarrg/web/autohandler
b/yarrg/web/autohandler
index 55b9a93695552295b4899d5a52fd0fd5ca4f3651..8ff09966b953143dfd474a4a0d43c66913f47c38 100644
(file)
--- a/
yarrg/web/autohandler
+++ b/
yarrg/web/autohandler
@@
-38,10
+38,19
@@
use CommodsWeb;
my $printable= printable($m);
use CommodsWeb;
my $printable= printable($m);
-if ($printable
eq 'pdf' || $printable eq 'ps'
) {
+if ($printable
=~ m/^pdf|^ps/
) {
my $output;
my $got= $m->call_self(\$output);
if ($got) {
my $output;
my $got= $m->call_self(\$output);
if ($got) {
+ my @htargs= qw(htmldoc --continuous --gray --size 210x279mm
+ --left 1cm --right 1cm);
+ $printable =~ m/^[a-z]+/;
+ push @htargs, '-t',$&;
+ if ($printable =~ m/2$/) {
+ push @htargs, qw(--nup 2);
+ }
+ push @htargs, qw(-);
+
my $tmpfile= IO::File::new_tmpfile();
print $tmpfile $output or die $!;
$tmpfile->flush() or die $!;
my $tmpfile= IO::File::new_tmpfile();
print $tmpfile $output or die $!;
$tmpfile->flush() or die $!;
@@
-52,8
+61,8
@@
if ($printable eq 'pdf' || $printable eq 'ps') {
eval {
$ENV{'HTMLDOC_NOCGI'}=1;
open STDIN, '<&', $tmpfile or die $!;
eval {
$ENV{'HTMLDOC_NOCGI'}=1;
open STDIN, '<&', $tmpfile or die $!;
- exec qw(htmldoc -t),$printable,qw(
-
--continuous --gray --size 210x279mm -)
;
+
+
exec @htargs
;
die $!;
};
print STDERR "HTMLDOC FAILURE $@";
die $!;
};
print STDERR "HTMLDOC FAILURE $@";