Commits

Anonymous committed 4a75c72

Created the "Software" section nav-menu. Also added a missing file.

  • Participants
  • Parent commits 106c8ef

Comments (0)

Files changed (10)

 	touch $@
 
 SECTION_MENU_DEPS = lib/Shlomif/Homepage/SectionMenu.pm
-PHILOSOPHY_DEPS = $(SECTION_MENU_DEPS) lib/Shlomif/Homepage/SectionMenu/Sects/Essays.pm 
+PHILOSOPHY_DEPS = $(SECTION_MENU_DEPS) lib/Shlomif/Homepage/SectionMenu/Sects/Essays.pm
 LECTURES_DEPS = $(SECTION_MENU_DEPS) lib/Shlomif/Homepage/SectionMenu/Sects/Lectures.pm
+SOFTWARE_DEPS = $(SECTION_MENU_DEPS) lib/Shlomif/Homepage/SectionMenu/Sects/Software.pm
 
 t2/philosophy/Index/index.html.wml : lib/article-index/article-index.dtd lib/article-index/article-index.xml lib/article-index/article-index.xsl $(PHILOSOPHY_DEPS)
 	touch $@
 $(VIPE_LECTURES_DOCS_SRC):: $(VIPE_SRC_DIR)/lecture/%.html.wml: $(LECTURES_DEPS)
 	touch $@
 
+T2_SOFTWARE_DOCS_SRC = $(filter $(T2_SRC_DIR)/open-source/%,$(T2_DOCS_SRC)) \
+					   $(filter $(T2_SRC_DIR)/jmikmod/%,$(T2_DOCS_SRC)) \
+					   $(filter $(T2_SRC_DIR)/grad-fu/%,$(T2_DOCS_SRC))
+
+$(T2_SOFTWARE_DOCS_SRC):: $(T2_SRC_DIR)/%.html.wml: $(SOFTWARE_DEPS)
+	touch $@
+
+VIPE_SOFTWARE_DOCS_SRC = $(filter $(VIPE_SRC_DIR)/rwlock/%,$(VIPE_DOCS_SRC)) \
+						 $(filter $(VIPE_SRC_DIR)/software-tools/%,$(VIPE_DOCS_SRC))
+
+$(VIPE_SOFTWARE_DOCS_SRC):: $(VIPE_SRC_DIR)/%.html.wml: $(SOFTWARE_DEPS)
+	touch $@
+
+* Move the Software Construction Tools from vipe to t2.
+
 * Put more meaningful descriptions in the place holders for all the
 presentations.
 

File lib/MySectNavData.pm

         'regex' => "^/lecture/",
         'class' => "Lectures",
     },
-    
+    {
+        'id' => "software",
+        'regex' => "^/(open-source|jmikmod|grad-fu|rwlock|software-tools)/",
+        'class' => "Software",
+    },    
 );
 
 sub get_nav_menu

File lib/Shlomif/Homepage/SectionMenu.pm

+package Shlomif::Homepage::SectionMenu;
+
+use strict;
+use warnings;
+
+use base 'HTML::Widgets::NavMenu::Object';
+use base 'Class::Accessor';
+
+use HTML::Widgets::NavMenu;
+
+__PACKAGE__->mk_accessors(qw(
+    current_host
+    empty
+    menu
+    nav_menu
+    path_info
+    results
+    sections
+));
+
+sub initialize
+{
+    my $self = shift;
+    my (%args) = @_;
+    $self->sections($args{'sections'});
+    $self->path_info($args{'path_info'});
+    $self->empty(0);
+    $self->current_host($args{current_host});
+
+    my $current_sect;
+    SECTION_LOOP: foreach my $sect (@{$self->sections()})
+    {
+        my $regexp = $sect->{'regex'};
+        if (($regexp eq "") || ($self->path_info() =~ /$regexp/))
+        {
+            $current_sect = $sect;
+            last SECTION_LOOP;
+        }
+    }
+    if (!defined($current_sect))
+    {
+        $self->empty(1);
+    }
+    else
+    {
+        my $class_id= $current_sect->{'class'};
+        my $class = "Shlomif::Homepage::SectionMenu::Sects::$class_id";
+        eval "require $class";
+        my $nav_menu = HTML::Widgets::NavMenu->new(
+            'path_info' => $self->path_info(),
+            current_host => $self->current_host(),
+            (eval "${class}::get_params()"),
+            'ul_classes' => 
+                [ "nm_main", "nm_nested", "nm_subnested", "nm_subsubnested", ],
+            );
+        my $results = $nav_menu->render();
+        $self->nav_menu($nav_menu);
+        $self->results($results);
+    }
+}
+
+sub get_html
+{
+    my $self = shift;
+    if ($self->empty())
+    {
+        return "";
+    }
+    else
+    {
+        return qq{<div class="sub_menu">\n} .
+            join("\n", @{$self->results()->{html}}) .
+            qq{\n</div>\n};
+    }
+}
+
+1;
+
+

File lib/Shlomif/Homepage/SectionMenu/Sects/Software.pm

+package Shlomif::Homepage::SectionMenu::Sects::Software;
+
+use strict;
+use warnings;
+
+use MyNavData;
+
+my $software_tree_contents =
+{
+    'host' => "t2",
+    'text' => "Shlomi Fish' Software",
+    'title' => "Shlomi Fish' Software",
+    'show_always' => 1,
+    'subs' =>
+    [
+        {
+            'text' => "Open Source Software",
+            'url' => "open-source/",
+        },
+        {
+            'text' => "Software Projects",
+            'url' => "open-source/projects/",
+            'subs' =>
+            [
+                {
+                    'text' => "Freecell Solver",
+                    'url' => "open-source/projects/freecell-solver/",
+                    'title' => "A Library and Program to solve Solitaire Games",
+                },
+                {
+                    'text' => "Latemp",
+                    'url' => "open-source/projects/latemp/",
+                    'title' => "A Content Management System for Static HTML",
+                },
+                {
+                    'text' => "MikMod for Java",
+                    'url' => "jmikmod/",
+                    'title' => "MOD Music Files Player for Java",
+                },
+                {
+                    'text' => "Gradient-Fu Patch",
+                    'url' => "grad-fu/",
+                    'title' => "Gradient-Fu Patch for GIMP",
+                },
+                {
+                    'text' => "FCFS RWLock",
+                    'url' => "rwlock/",
+                    'host' => "vipe",
+                    'title' => "A First-Come First-Served Readers/Writers Lock",
+                },
+                {
+                    'text' => "Quad-Pres",
+                    'url' => "open-source/projects/quad-pres/",
+                    'title' => "A Tool for Generating HTML Presenttions",
+                },
+                {
+                    'text' => "Bits and Bobs",
+                    'url' => "open-source/bits.html",
+                    'title' => "Small Open Source Programs",
+                },
+            ],
+        },
+        {
+            'text' => "Contributions to Projects",
+            'url' => "open-source/contributions/",
+            'title' => "Contributions to Open Source Projects I did not Initiate",
+        },
+        {
+            'text' => "Documents and Resources",
+            'url' => "open-source/resources/",
+            'subs' =>
+            [
+                {
+                    'text' => "Favourite OSS",
+                    'url' => "open-source/favourite/",
+                    'title' => "Favourite Open Source Software of Mine",
+                },
+                {
+                    'text' => "Interviews",
+                    'url' => "open-source/interviews/",
+                    'title' => "Interviews with Open Source Figures",
+                },
+                {
+                    'url' => "open-source/portability-libs/",
+                    'text' => "Portability Libraries",
+                    'title' => "Index of Libraries for Portability",
+                },
+                {
+                    'url' => "software-tools/",
+                    'host' => "vipe",
+                    'text' => "Software Building and Management Tools",
+                },
+            ],
+        },
+    ],
+};
+
+sub get_params
+{
+    return
+        (
+            'hosts' => MyNavData::get_hosts(),
+            'tree_contents' => $software_tree_contents,
+        );
+}
+
+1;
+

File t2/open-source/index.html.wml

 #include '../template.wml'
 <latemp_subject "Open Source Software I wrote" />
 
-<define-tag linkto:vipe endtag="required">
-<preserve where />
-<set-var %attributes />
-<a href="http://vipe.technion.ac.il/~shlomif/<get-var where />">%body</a>
-<restore where />
-</define-tag>
-
-<h2><linkto:vipe where="freecell-solver/">Freecell Solver</linkto:vipe></h2>
+<h2><a href="<rellink host="vipe" url="freecell-solver/" />">Freecell 
+Solver</a></h2>
 
 <p>
 A program and a library written in ANSI C that automatically solves games of
 <h2><a href="$(ROOT)/jmikmod/">MikMod for Java</a></h2>
 
 <p>
-A port of the well-known MOD player <a href="http://www.mikmod.org/">MikMod</a>
-(that was originally written in ANSI C) to Java.
+A port of the well-known MOD player 
+<a href="http://mikmod.raphnet.net/">MikMod</a> (that was originally written 
+in ANSI C) to Java.
 </p>
 
 <h2><a href="$(ROOT)/grad-fu/">Gradient-Fu Patch for the GIMP</a></h2>
 and to scripting interfaces.
 </p>
 
-<h2><linkto:vipe where="rwlock/">A First-Come First-Served Readers/Writers Lock</linkto:vipe></h2>
+<h2><a href="<rellink host="vipe" url="rwlock/" />">A
+First-Come First-Served Readers/Writers Lock</a></h2>
 
 <p>
 An implementation of it for POSIX Threads, which can also be used as a 
 reference implementation. 
 </p>
 
-<h2><linkto:vipe where="lm-solve/">LM-Solve</linkto:vipe></h2>
+<h2><a href="<rellink host="vipe" url="lm-solve/" />">LM-Solve</a></h2>
 
 <p>
 An automatic solver for <a href="http://www.logicmazes.com/">Logic Mazes</a> 
 UNIXes as well as on Windows 32-bit easier.
 </p>
 
-<h3><linkto:vipe where="software-tools/">Software Building and Management Tools</linkto:vipe></h3>
+<h3><a href="<rellink host="vipe" url="software-tools/" />">Software Building and Management Tools</a></h3>
 
 <p>
 A small directory of tools for building, configuring and maintaining software.

File t2/open-source/projects/freecell-solver/index.html.wml

 #include '../template.wml'
 <latemp_subject "Freecell Solver" />
 
-<define-tag linkto:vipe endtag="required">
-<preserve where />
-<set-var %attributes />
-<a href="http://vipe.technion.ac.il/~shlomif/<get-var where />">%body</a>
-<restore where />
-</define-tag>
-
 <p>
-<linkto:vipe where="freecell-solver/">Freecell Solver</linkto:vipe> 
+<a href="<rellink host="vipe" url="freecell-solver/" />">Freecell Solver</a> 
 is a framework written in ANSI C to solve deals of 
 <a href="http://en.wikipedia.org/wiki/Freecell">Freecell</a> and similar
 variants of card Solitaire. It is distributed as open-source software

File t2/open-source/projects/index.html.wml

+#include '../template.wml'
+
+<latemp_subject "Shlomi Fish' Open Source Projects" />
+
+<h2><a href="<rellink url="open-source/projects/" />">Freecell Solver</a></h2>
+
+<p>
+A program and a library written in ANSI C that automatically solves games of
+Freecell and similar Solitaire variants.
+</p>
+
+<h2><a href="<rellink url="open-source/latemp/" />">Latemp - a Content 
+Management System for Static HTML Page</a></h2>
+
+<p>
+Latemp is a content management system for generatic sophisticated static HTML
+sites. It is based on the excellent <a href="http://thewml.org/">Website Meta
+Language</a> by Ralf S. Engelschall and Denis Barbier. This site 
+<a href="http://web-cpan.berlios.de/latemp/examples/">and others</a> are
+generated using Latemp.
+</p>
+
+<h2><a href="<rellink "open-source/projects/quad-pres/" />">Quad-Pres</a></h2>
+
+<p>
+Short for Quick-and-Dirty Presentations, this is a tool written in Perl for
+preparing HTML presentations. Based on 
+<a href="http://thewml.org/">WebMetaLanguage</a>.
+</p>
+
+<h2><a href="http://comnet.technion.ac.il/~cn1w02/">IP-Noise Simulator</a></h2>
+
+<p>
+A simulator for IP-Noise for Linux systems based on the Linux Kernel version
+2.4.x or above.
+</p>
+
+<h2><a href="$(ROOT)/jmikmod/">MikMod for Java</a></h2>
+
+<p>
+A port of the well-known MOD player <a href="http://www.mikmod.org/">MikMod</a>
+(that was originally written in ANSI C) to Java.
+</p>
+
+<h2><a href="$(ROOT)/grad-fu/">Gradient-Fu Patch for the GIMP</a></h2>
+
+<p>
+A patch for Gimp 1.2.x that exposes gradient editing to the procedural database
+and to scripting interfaces.
+</p>
+
+<h2><a href="<rellink host="vipe" url="rwlock/" />">A First-Come First-Served
+Readers/Writers Lock</a></h2>
+
+<p>
+An implementation of it for POSIX Threads, which can also be used as a 
+reference implementation. 
+</p>
+
+<h2><a href="<rellink host="vipe" url="lm-solve/" />">LM-Solve</a></h2>
+
+<p>
+An automatic solver for <a href="http://www.logicmazes.com/">Logic Mazes</a> 
+written in Perl.
+</p>
+
+<h2><a href="http://web-cpan.berlios.de/">Web-CPAN</a></h2>
+
+<p>
+A collection of web-related Perl CPAN modules.
+</p>
+
+<h2><a href="http://search.cpan.org/~shlomif/">My CPAN Modules</a></h2>
+
+<p>
+I wrote several modules for <a href="http://search.cpan.org/">CPAN</a> - the
+Comprehensive Perl Archive Network. 
+</p>
+
+<h2><a href="$(ROOT)/open-source/bits.html">Bits and Bobs</a></h2>
+
+<p>
+A random collection of small programs I created, and are made available to
+the public.
+</p>
+

File t2/open-source/projects/latemp/index.html.wml

+#include '../template.wml'
+<latemp_subject "Latemp - A CMS for Static HTML" />
+
+<p>
+<a href="http://web-cpan.berlios.de/latemp/">Latemp</a> is a content management
+system for static HTML pages based on <a href="http://thewml.org/">Web Meta
+Language</a> and other technologies. I actively use it to maintain this site,
+and <a href="http://web-cpan.berlios.de/latemp/examples/">several other
+sites</a>.
+</p>
+

File t2/open-source/resources/index.html.wml

+#include '../template.wml'
+<latemp_subject "Open Source Software I wrote" />
+
+<h2>Software Resources</h2>
+
+<div class="indent">
+
+<h3><a href="$(ROOT)/open-source/portability-libs/">Cross-Platform Abstraction Libraries for Portability</a></h3>
+
+<p>
+A small directory of libraries that make writing applications that run on 
+UNIXes as well as on Windows 32-bit easier.
+</p>
+
+<h3><a href="<rellink host="vipe" url="software-tools/" />">Software Building and Management Tools</a></h3>
+
+<p>
+A small directory of tools for building, configuring and maintaining software.
+</p>
+
+<h3><a href="http://better-scm.berlios.de/">The "Better SCM" Initiative</a></h3>
+
+<p>
+An initiative meant to advance the projects that aim to create publicly 
+available better tools for revision control.
+</p>
+
+<h3><a href="http://perl-begin.berlios.de/">The Perl Beginners Site</a></h3>
+
+<p>
+A site for Perl Beginners.
+</p>
+
+</div>
+
+<h2><a href="./favourite/">Favourite Free Software</a></h2>
+
+<p>
+This contains a list of some of my favourite free software packages out
+there.
+</p>
+
+<h2><a href="./interviews/">Interviews with Open Source People</a></h2>
+
+<p>
+These are a collection of interviews I conducted with people of the open
+source community.
+</p>
+