/[PLies]/burst.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /burst.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8 by dpavlin, Sat May 5 19:43:52 2001 UTC revision 1.11 by dpavlin, Tue May 8 07:51:54 2001 UTC
# Line 1  Line 1 
1  #!/usr/bin/perl  #!/usr/bin/perl
2  #  #
3  # SLies Copyright 2001 Dobrica Pavlinusic <dpavlin@rot13.org>  # PLies Copyright 2001 Dobrica Pavlinusic <dpavlin@rot13.org>
4  #  #
5  # this tool is based on SlideMaker and XLSies tool  # this tool is based on SlideMaker and XLSies tool
6  # split a all.htm into slide*.htm  # split a all.htm into slide*.htm
# Line 240  my %anchor_on_slide; Line 240  my %anchor_on_slide;
240    
241  ## step 1: record anchors  ## step 1: record anchors
242  for($i=0; $i<$total; $i++) {  for($i=0; $i<$total; $i++) {
243          my $tmp = $table[($i*2)];          my $tmp = $table[($i*2)].$table[($i*2)+1];
244          while ($tmp =~ s,<a +name="*([^>"]+)"*>,,i) {          while ($tmp =~ s,<a +name="*([^>"]+)"*>,,i) {
245                  $anchor_on_slide{$1}=($i+1);                  $anchor_on_slide{$1}=($i+1);
246                  print "\tslide ",($i+1)," anchor: $1\n" if ($debug);                  print "\tslide ",($i+1)," anchor: $1\n" if ($debug);
# Line 412  sub addTitle Line 412  sub addTitle
412          if ($nr % $toc_on_page == 0) {          if ($nr % $toc_on_page == 0) {
413                  my $toc_nr=int($nr/$toc_on_page);                  my $toc_nr=int($nr/$toc_on_page);
414    
415                  %item = (                  $item = {
416                          pre_html => $pre_ul,                          pre_html => $pre_ul,
417                          accesskey => " ",       # space                          accesskey => " ",       # space
418                          href => "index-toc$toc_nr.html",                          href => "index-toc$toc_nr.html",
419                          title => "...",                          title => "...",
420                          post_html => $post_ul,                          post_html => $post_ul,
421                          more => 1,      # use style for more pages link (...)                          more => 1,      # use style for more pages link (...)
422                  )                  };
423  #               push @toc_entries, %item;                  push @toc_entries, $item;
424    
425                  &closeOverview;                  &closeOverview;
426                    undef @toc_entries;
427                  &openOverview("$overview-toc$toc_nr");                  &openOverview("$overview-toc$toc_nr");
428                  $last_toc_title='';                  $last_toc_title='';
429          }          }
430    
431          $pre_ul=$post_ul='';          $pre_ul=$post_ul='';
432          if ($last_toc_title eq $title) {          if ($last_toc_title eq $title && $subtitle) {
433                  $title = $subtitle;                  $title = $subtitle;
434                  $pre_ul='<ul>';                  $pre_ul='<ul>';
435                  $post_ul='</ul>';                  $post_ul='</ul>';
# Line 450  sub addTitle Line 451  sub addTitle
451                  };                  };
452                  push @toc_entries,$item;                  push @toc_entries,$item;
453          } else {          } else {
454                  %item = (                  $item = {
455                          pre_html => $pre_ul,                          pre_html => $pre_ul,
456                          tabindex => "$nr",                          tabindex => "$nr",
457                          href => "slide$nr.html",                          href => "slide$nr.html",
458                          title => $title,                          title => $title,
459                          post_html => $post_ul,                          post_html => $post_ul,
460                  )                  };
461  #               push @toc_entries,\%item;                  push @toc_entries,$item;
462          }          }
463  }  }
464  ##  ##
# Line 627  sub verify_html { Line 628  sub verify_html {
628  # clean the html of the slide  # clean the html of the slide
629  # remove all <div class="comment">blabla</div>  # remove all <div class="comment">blabla</div>
630  sub clean_html {  sub clean_html {
631      $_[0] =~ s/<div\s+class\s*=\s*(?:comment[\s>]|\"comment\").*?<\/div>//igs;          my $tmp=$_[0];
632      return $_[0];          $tmp =~ s/<div\s+class\s*=\s*(?:comment[\s>]|\"comment\").*?<\/div>//igs;
633            $tmp =~ s,</*font[^>]+>,,ig;
634            return $tmp;
635  }  }
636    
637  ##############################################################################  ##############################################################################
# Line 672  sub make_progress_bar { Line 675  sub make_progress_bar {
675  ##############################################################################  ##############################################################################
676  # make slide progress bar  # make slide progress bar
677  sub remove_anchor {  sub remove_anchor {
678          my $foo = $_[0];          my $tmp = $_[0];
679          $foo=~s/(.*)<A[^>]*>(.*)<\/A>(.*)/$1$2$3/ig;          $tmp =~ s/(.*)<A[^>]*>(.*)<\/A>(.*)/$1$2$3/ig;
680          return $foo;          return $tmp;
681  }  }

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.11

  ViewVC Help
Powered by ViewVC 1.1.26