sub preprocess (@) { #{{{
my %params=@_;
+
$params{pages}="*" unless defined $params{pages};
# Needs to update whenever a page is added or removed, so
my $pid;
while (1) {
eval {
- $pid=open2(*IN, *OUT, "dot /dev/stdin -Tpng -o '$IkiWiki::config{destdir}/$params{page}.png' -Tcmapx");
+ $pid=open2(*IN, *OUT, "dot -Tpng -o '$IkiWiki::config{destdir}/$params{page}.png' -Tcmapx");
};
last unless $@;
$tries--;
print OUT "digraph linkmap$mapnum {\n";
print OUT "concentrate=true;\n";
print OUT "charset=\"utf-8\";\n";
+ print OUT "ratio=compress;\nsize=\"".($params{width}+0).", ".($params{height}+0)."\";\n"
+ if defined $params{width} and defined $params{height};
foreach my $item (keys %mapitems) {
print OUT "\"$item\" [shape=box,href=\"$mapitems{$item}\"];\n";
foreach my $link (map { IkiWiki::bestlink($item, $_) } @{$IkiWiki::links{$item}}) {