Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: ChangeLog at sunsite.dk



Oliver Kiddle wrote:
> It was me who updated it in May 2000 and to be honest, I'd completely
> forgotten about it since. It's also linked from the news page for the
> 3.0.8 and 3.1.7 releases. The other files in the same directory are
> also out of date but they may not be linked in at all. I'm not sure how
> much value there is in having the detailed changelogs on the web. I'm
> not too keen on updating them manually so if you want to write a script,
> that'd be great and if not, they can be removed.

Here's a script, but I'm not logged into sunsite.dk from here so I
haven't altered anything.

Index: Etc/changelog2html.pl
===================================================================
RCS file: Etc/changelog2html.pl
diff -N Etc/changelog2html.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Etc/changelog2html.pl	20 Jun 2003 10:38:14 -0000
@@ -0,0 +1,69 @@
+#!/usr/bin/perl -w
+
+# This programme turns the ChangeLog into changelog.html for display
+# on the website.  That lives at http://zsh.sunsite.dk/Etc/changelog.html.
+
+my $out = "changelog.html";
+
+open CL, "ChangeLog" or die "No ChangeLog --- run in top level directory.\n";
+
+if (-f $out) {
+    die "Will not overwrite existing $out.  Delete by hand.\n";
+}
+
+my $version;
+my $changes = 0;
+
+while (<CL>) {
+    /^\d+/  and  $changes++;
+    if (/version\.mk.*version\s+(\d+(\.\d+)*(-\S+)?)/i) {
+	$version = $1;
+	$version =~ s/\.$//;
+	last;
+    }
+}
+
+if (defined $version) {
+    warn "Outputting changelog.html for version \"$version\".\n";
+    if ($changes) {
+	warn "WARNING: there are changes since this version.\n";
+    }
+} else {
+    $version = "X.X.X";
+    warn "WARNING: no version found.  Set by hand\n";
+}
+
+seek CL, 0, 0;
+
+open NEW, ">changelog.html";
+
+select NEW;
+
+print <<"EOH";
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd";>
+<html>
+<head>
+<title>ChangeLog for zsh version $version</title>
+</head>
+<body>
+<h1>ChangeLog for zsh version $version</h1>
+<pre>
+EOH
+
+while (<CL>) {
+    s/&/&amp;/g;
+    s/</&lt;/g;
+    s/>/&gt;/g;
+
+    print;
+}
+
+my $now = gmtime(time);
+
+print <<"EOH";
+</pre>
+<hr>
+Automatically generated from ChangeLog at $now
+</body>
+</html>
+EOH

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 692070


**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
prohibited.  
If you received this in error, please contact the sender and 
delete the material from any computer.
**********************************************************************



Messages sorted by: Reverse Date, Date, Thread, Author