Changeset 3102


Ignore:
Timestamp:
2002-04-28T10:24:21+12:00 (22 years ago)
Author:
nzdl
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/bin/script/convert_toc.pl

    r3093 r3102  
    2525  $content =~ s/<img\s+src=\"?(\w+\.(?:png|jpe?g|gif))\"?/rename_image($1, $dirname)/iegs;
    2626
    27 
    2827  # process section title
    2928  $content =~ s/(?:<P[^>]*>|<BR>)(?:\s*<\/?[^>]*>)*?&lt;&lt;TOC(\d+)&gt;&gt;(.*?)(?=<\/?P[^>]*>|<BR>)/
    3029      process_toc ($1, $2)/sige;
    31  
     30
    3231  # close the remaining sections
    3332  my $section_ending = "<!--\n";
     
    5857    }
    5958  }
     59
    6060  $toc .= "<Section>\n".
    6161    "  <Description>\n".
     
    6565
    6666  $level = $thislevel;
    67  
     67
    6868  return $toc;
    6969}
     
    8383sub rename_image {
    8484    my ($image_name, $dirname) = @_;
     85
    8586
    8687    if (!-e "$dirname/$image_name") {
     
    110111    } else {
    111112        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        }
    112117    }
    113118    }
Note: See TracChangeset for help on using the changeset viewer.