Sam Ruby
It's just data



 

 

tidyblosxom

#!/usr/bin/perl
use File::stat;

foreach $file (<@ARGV>) {
  print STDERR "$file\n";

  open TXT, "<$file";
  ($title,@body) = <TXT>;
  close TXT;

  open HTML, ">$file.html";
  print HTML "<title>$title</title><body>@body</body>";
  close HTML;

  open TIDY, "tidy -quiet -asxhtml $file.html |";
  $tidy = join("", <TIDY>);
  ($title) = ($tidy =~ m!<title>(.*)</title>!s);
  ($body)  = ($tidy =~ m!<body>(.*)</body>!s);

  $mtime = stat($file)->mtime;

  open TXT, ">$file";
  print TXT "$title$body";
  close TXT;

  utime $mtime, $mtime, $file;
  unlink "$file.html";
}


Click here to visit the Radio UserLand website.
Click to see the XML version of this web page.
Click here to send an email to the editor of this weblog.
© Copyright 2002 Sam Ruby .
Last update: 9/1/2002; 6:53:17 PM .
This theme is based on the SoundWaves (blue) Manila theme.