Changeset 3102
- Timestamp:
- 2002-04-28T10:24:21+12:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/bin/script/convert_toc.pl
r3093 r3102 25 25 $content =~ s/<img\s+src=\"?(\w+\.(?:png|jpe?g|gif))\"?/rename_image($1, $dirname)/iegs; 26 26 27 28 27 # process section title 29 28 $content =~ s/(?:<P[^>]*>|<BR>)(?:\s*<\/?[^>]*>)*?<<TOC(\d+)>>(.*?)(?=<\/?P[^>]*>|<BR>)/ 30 29 process_toc ($1, $2)/sige; 31 30 32 31 # close the remaining sections 33 32 my $section_ending = "<!--\n"; … … 58 57 } 59 58 } 59 60 60 $toc .= "<Section>\n". 61 61 " <Description>\n". … … 65 65 66 66 $level = $thislevel; 67 67 68 68 return $toc; 69 69 } … … 83 83 sub rename_image { 84 84 my ($image_name, $dirname) = @_; 85 85 86 86 87 if (!-e "$dirname/$image_name") { … … 110 111 } else { 111 112 print STDERR "ERROR**** $dirname/$image_name could not be found\n"; 113 if (open (ERROR, ">>error.txt")) { 114 print ERROR "ERROR**** $dirname/$image_name could not be found\n"; 115 close ERROR; 116 } 112 117 } 113 118 }
Note:
See TracChangeset
for help on using the changeset viewer.