OSDN Git Service

modify fig: check image size and add width attribute
[otptools/otptools.git] / shtml2footnotedat.pl
1
2 use utf8;
3 use open IN => ':utf8';
4 #use open OUT => ':encoding(Shift_JIS)';
5 use open OUT => ':utf8';
6 use open ':std';
7
8
9 #<DL> <DT><A NAME="62">...\82È\82ç\82È\82¢(reschedule_idle\8aÖ\90\94</A><DD>\82Ù\82ñ\82Ì\8f­\82µ\82µ\82©
10 #\83v\83\89\83C\83I\83\8a\83e\83B\8d·\82ª\96³\82¢\82Æ\82«\82Í\81A\97v\8b\81\82ð\8fo\82³\82È\82¢
11 #<PRE>.
12
13
14 while(my $line = <> ){
15   chomp $line;
16   my $string = "";
17   if( $line =~ m/<DT><A NAME="([0-9]+)">/ ) {
18     my $num = $1;
19     $line =~ s/^.*<DD>//;
20     $string = $line;
21     while( $line = <> ) {
22       chomp $line;
23       if ($line =~ m/(^.*)<PRE>/ ) {
24         $string .= $1;
25         last;
26       } else {
27         $string .= $line;
28       }
29     }
30     print "    '$num' => '$string',\n";
31   }
32 }
33