]> git.refcnt.org Git - lugs.git/blobdiff - make-html/make-html.pl
make-ical: adapt to encoding fix
[lugs.git] / make-html / make-html.pl
index 74b3371b39c51b646c242e486c2d6d7eb840c8f8..3dcd603caa1779f6537d72f4443eb70fa39c3b1d 100755 (executable)
@@ -2,14 +2,14 @@
 #
 # Konvertiert die LUGS-Terminliste (im ASCII Format) in ein HTML-File
 #
-# (c) 1996-1998               Roland Alder
-# (c) 2007-2008, 2011-2013    Steven Schubiger
+# (c) 1996-1998                     Roland Alder
+# (c) 2007-2008, 2011-2015, 2017    Steven Schubiger
 
 use strict;
 use warnings;
 use lib qw(lib);
 
-my $VERSION = '0.03';
+my $VERSION = '0.07';
 
 #-----------------------
 # Start of configuration
@@ -34,9 +34,11 @@ my $Config = {
        winti         => 'd6d6ce',      # ex http://www.stadt-winterthur.ch/
        innerschweiz  => '8abed7',      # ex http://www.luzern.ch/
        kreuzlingen   => 'f9f9f9',      # ehemals aargau (ex http://www.ag.ch/)
-       uzwil         => 'e2b1a5',      # wie heisst diese Farbe? :)
        stgallen      => 'e2b1a5',      # wie heisst diese Farbe? :)
        gnupingu      => 'ffd133',      # von http://www.gnupingu.ch/
+       debian        => 'ffa500',      # orange
+       hackerfunk    => '99b2cd',      # blau/grau
+       wilhelmtux    => 'ffffbf',      # from https://wilhelmtux.ch/
     },
     ical_dir    => 'ical',
 };
@@ -74,7 +76,7 @@ use constant true => 1;
 
 use File::Copy qw(copy);
 use File::Temp qw(tempfile);
-use LUGS::Events::Parser;
+use LUGS::Events::Parser ();
 
 # Return a new instance of our class.
 sub new
@@ -222,12 +224,13 @@ sub process_events
         my $ics_file = "$anchor.ics";
         my $ics_link = join '/', ($Config->{ical_dir}, $ics_file);
 
-        $self->print_template('ical',
+        $self->print_template('ical/anker',
         {
-            LINK => $ics_link,
+            LINK  => $ics_link,
+            ANKER => $anchor,
         });
 
-        $self->print_raw_html('</td></tr>');
+        $self->print_raw_html('</tr>');
     }
 
     $self->print_template('tabellenende');
@@ -357,9 +360,9 @@ __DATA__
 -
 <br>[% INFORMATIONEN %]
 
-# ical
+# ical/anker
 -
-<td valign=top><a href="[% LINK %]">iCal</a></td>
+<td valign=top><a href="[% LINK %]">iCal</a><br><a href="#[% ANKER %]">#</a></td>
 
 # tabellenende
 -