+ # Если существует cover.png, добавляем coverpage
+ if (/<coverpage \/>/) {
+ $_="";
+ COVER:
+ for $file ("cover.jpg","cover.png") {
+ if (-f $file) {
+ my $id = $file;
+ $id=~tr/./_/;
+ $_ = "<coverpage>\n<image l:href=\"#$id\" />\n</coverpage>\n";
+ $pics .= mkbinary($file,$id);
+ last COVER;
+ }
+ }
+ }