--- deliantra/Deliantra-Client/bin/pod2wiki 2006/08/14 01:54:09 1.5 +++ deliantra/Deliantra-Client/bin/pod2wiki 2006/08/14 18:46:08 1.8 @@ -3,7 +3,7 @@ # convert given .pod files to wiki style # base path of arch tree, only used for new arch graphics -my $ARCH = "/root/src/cf.schmorp.de/arch"; +my $ARCH = "/root/devel/cvs/cf.schmorp.de/arch"; use strict; @@ -39,6 +39,10 @@ $_ } +sub special { + $MA_BEG . (join $MA_SEP, @_) . $MA_END +} + package AsParagraphs; use strict; @@ -69,10 +73,10 @@ } elsif ($link =~ /^\$ARCH\/(.+)$/) { my $path = $1; (my $base = $path) =~ s/.*\///; - -f "$ARCH/$path" && system "cp -p \Q$ARCH/$path\E \Qresources/arch/$base"; - "${MA_BEG}image${MA_SEP}arch/$base$MA_END" + -f "$ARCH/$path" && system "rsync -av -c \Q$ARCH/$path\E \Qresources/arch/$base"; + ::special image => "arch/$base", 1; } else { - "${MA_BEG}link$MA_SEP$text$MA_SEP$link$MA_END" + ::special link => $text, $link } } @@ -158,7 +162,7 @@ push @result, { indent => $indent * 16, level => $level, - markup => "${MA_BEG}image${MA_SEP}pod/" . $_->text . $MA_END, + markup => (::special image => "pod/" . $_->text), }; } ()