X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=hotexplode.pl;fp=hotexplode.pl;h=0000000000000000000000000000000000000000;hb=e437b7f33312b1c3dd93f6350b7a7c94a10a2b63;hp=8cf2dd4f282fd503c7fb38fa894409d256f5c4a8;hpb=ad631937dfb8a912310002a643a8d2e3954e2b3b;p=bookmarks_db.git diff --git a/hotexplode.pl b/hotexplode.pl deleted file mode 100755 index 8cf2dd4..0000000 --- a/hotexplode.pl +++ /dev/null @@ -1,186 +0,0 @@ -#!/usr/bin/perl - -# hotexplode -- a program for "exploding" a xmosaic hotlist or Netscape -# bookmark file into a hierarchial multi-page structure. -# acb 60 Chs 3162 - -# revision history: -# v1.0: 1-3-1996: initial version - -$date = `date`; - -# customise below - -# header: some arbitrary HTML text which is appended below the title and -# above the hotlist data - -$header = < -
-This hotlist was generated with -hotexplode -on $date. -

-WARNING: The inclusion of a link to a page on -this hotlist is not an indication of the maintainer's -approval of or agreement with its content. -

-
-
-Please DO NOT bookmark this page. Bookmark the -main page instead. -Any other page in the hierarchy can be renamed, moved or removed at any time. -
-FOO - -$footer = < -FOO - -# which directory shall contain the hotlist? - -$outdir = "hotlist"; - - -# end of customisable portion - -require "getopts.pl"; - -&Getopts("o:t:v"); - -$outdir = $opt_o if $opt_o; - - -# seek forward to the title -while (<>) { - if (/([^\<\>]*)<\/TITLE>/) { - $title = $1; - last; - } -} - -$title = $opt_t if $opt_t; - -# seek forward to the start of the list - - -while (<>) { - if(/<UL>/) { warn "Detected xmosaic hotlist format\n" if $opt_v; - &parse_mosaic_hotlist($outdir, $title); last; } - if(/<DL>/) { warn "Detected Netscape bookmark format\n" if $opt_v; - &parse_netscape_bookmarks($outdir, $title); last; } -} - -# parse an xmosaic hotlist -# exit when we meet a </UL> -# arguments: pathname of directory in which output is to be placed, -# title - -sub parse_mosaic_hotlist { - # we write the file at the very end, because (I think) filehandles do - # not have local scope, and this is recursive - local($prefix, $title) = @_; - local($result) = "<HTML><HEAD>\ -<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=koi8-r\">\ -<TITLE>$title\ -\ -\n

$title

\n $header \n
\n