Commits

shl...@cec68495-dca5-4e2b-845c-11fdaaa4f967  committed 978dffa

Branching homepage trunk to the 2009-restyling branch for restyling

  • Participants
  • Parent commits cb7a344
  • Branches css-zen

Comments (0)

Files changed (891)

File 2009-restyling/.hgtags

+6533c74c8d70428d98595914f8b9718c7f9dbfdf after-restore-2003-10-09
+5f092af7d3159a72e80d249270ff07d6daf093bc before-w2l-banner-removal

File 2009-restyling/INSTALL

+Follow the following steps to build the homesite:
+
+1. Install Subversion.
+
+2. Install perl 5.8.x (or later) in case it's not already installed. You
+should have a package for for your system.
+
+3. Install Website Meta Language (version 2.0.12 or later):
+
+http://developer.berlios.de/projects/thewml/
+
+4. Run and configure CPAN (see - http://sial.org/howto/perl/life-with-cpan/ )
+and type:
+
+    $ export PERL_MM_USE_DEFAULT=1
+    $ perl -MCPAN -e 'install Task::Sites::ShlomiFish'
+
+Or if you have CPANPLUS installed:
+
+    $ export PERL_MM_USE_DEFAULT=1
+    $ perl -MCPANPLUS -e 'install Task::Sites::ShlomiFish'
+
+5. Install Latemp:
+
+    $ svn co http://svn.berlios.de/svnroot/repos/web-cpan/latemp/trunk/
+    $ cd trunk/installer
+    $ mkdir -p "$HOME/apps/latemp"
+    $ scons PREFIX="$HOME/apps/latemp/" install
+    $ cd ../support-headers
+    $ perl install.pl
+
+6. Add Latemp to the beginning of your path:
+
+    $ PATH="$HOME/apps/latemp/bin:$PATH"
+
+7. 
+    $ svn co http://opensvn.csie.org/shlomif/wml-affiliations/trunk/
+    $ cd trunk/wml
+    $ bash Install.bash
+
+8.
+    $ svn co http://svn.berlios.de/svnroot/repos/thewml/extended-apis/trunk/
+    $ cd trunk/xhtml/1.x/
+    $ bash Install.bash
+
+9. Do the following to build the site, after all dependencies were installed:
+
+    $ svn co http://opensvn.csie.org/shlomif/homepage/trunk/
+    $ cd trunk
+    $ ./gen-helpers.pl
+        ( Ignore the make warning. )
+    $ make

File 2009-restyling/Makefile

+LATEMP_WML_FLAGS =$(shell latemp-config --wml-flags)
+
+COMMON_PREPROC_FLAGS = -I $$HOME/conf/wml/Latemp/lib 
+WML_FLAGS += --passoption=2,-X3074 --passoption=3,-I../lib/ \
+	--passoption=3,-w -I../lib/ $(LATEMP_WML_FLAGS) \
+	-DROOT~. -DLATEMP_THEME=better-scm \
+	-I $${HOME}/apps/wml
+
+TTML_FLAGS += $(COMMON_PREPROC_FLAGS) -I lib
+WML_FLAGS += $(COMMON_PREPROC_FLAGS)
+
+ALL_DEST_BASE = dest
+
+
+DOCS_COMMON_DEPS = template.wml lib/MyNavData.pm
+
+all: make-dirs docbook_targets fortunes-target latemp_targets sitemap_targets copy_fortunes site-source-install
+
+include lib/make/gmsl/gmsl
+
+include include.mak
+include rules.mak
+include deps.mak
+
+make-dirs: $(T2_DIRS_DEST) 
+
+FORTUNES_DIR = humour/fortunes
+T2_FORTUNES_DIR = t2/$(FORTUNES_DIR)
+
+include $(T2_FORTUNES_DIR)/arcs-list.mak
+include $(T2_FORTUNES_DIR)/fortunes-list.mak
+
+SITE_SOURCE_INSTALL_TARGET = $(T2_DEST)/meta/site-source/INSTALL
+FORTUNES_TARGET =  $(T2_DEST)/$(FORTUNES_DIR)/index.html
+
+site-source-install: $(SITE_SOURCE_INSTALL_TARGET)
+
+fortunes-target: $(FORTUNES_TARGET) fortunes-compile-xmls
+
+# t2 macros
+
+RSYNC = rsync --progress --verbose --rsh=ssh
+
+T2_DEST_FORTUNES = $(patsubst %,$(T2_DEST)/$(FORTUNES_DIR)/%,$(FORTUNES_ARCS_LIST))
+
+copy_fortunes: $(T2_DEST_FORTUNES)
+
+upload_deps: all
+
+upload_local: upload_deps
+	( cd $(T2_DEST) && $(RSYNC) -a * $${HOMEPAGE_SSH_PATH}/ )
+
+upload_backup: upload_deps
+	( cd $(T2_DEST) && $(RSYNC) -r * shlomif@alberni.textdrive.com:domains/www-backup.shlomifish.org/web/public )
+
+upload: upload_remote
+
+upload_remote: upload_local upload_remote_only
+
+upload_remote_only: upload_deps
+	( cd $(T2_DEST) && $(RSYNC) -a * $${__HOMEPAGE_REMOTE_PATH}/ )
+
+clean:
+	rm -fr $(T2_DEST)/*
+	rm -fr $(VIPE_DEST)/*
+
+t2/SFresume.html.wml : lib/SFresume_base.wml
+	touch $@
+
+t2/SFresume_detailed.html.wml : lib/SFresume_base.wml
+	touch $@
+
+SECTION_MENU_DEPS = lib/Shlomif/Homepage/SectionMenu.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
+HUMOUR_DEPS = $(SECTION_MENU_DEPS) lib/Shlomif/Homepage/SectionMenu/Sects/Humour.pm
+PUZZLES_DEPS = $(SECTION_MENU_DEPS) lib/Shlomif/Homepage/SectionMenu/Sects/Puzzles.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 $@
+
+$(FORTUNES_TARGET): $(T2_FORTUNES_DIR)/index.html.wml $(DOCS_COMMON_DEPS) $(HUMOUR_DEPS) $(T2_FORTUNES_DIR)/Makefile
+	WML_LATEMP_PATH="$$(perl -MFile::Spec -e 'print File::Spec->rel2abs(shift)' '$@')" ; ( cd $(T2_SRC_DIR) && wml -o "$${WML_LATEMP_PATH}" $(T2_WML_FLAGS) -DLATEMP_FILENAME=$(patsubst $(T2_DEST)/%,%,$(patsubst %.wml,%,$@)) -DPACKAGE_BASE="$$( unset MAKELEVEL ; cd $(FORTUNES_DIR) && make print_package_base )" $(patsubst $(T2_SRC_DIR)/%,%,$<) )
+
+
+T2_DOCS_SRC = $(patsubst $(T2_DEST)/%,$(T2_SRC_DIR)/%.wml,$(T2_DOCS_DEST))
+VIPE_DOCS_SRC = $(patsubst $(VIPE_DEST)/%,$(VIPE_SRC_DIR)/%.wml,$(VIPE_DOCS_DEST))
+
+T2_PHILOSOPHY_DOCS_SRC = $(filter-out $(T2_SRC_DIR)/philosophy/books-recommends/%,$(filter-out $(T2_SRC_DIR)/philosophy/Index/%,$(filter $(T2_SRC_DIR)/philosophy/%,$(T2_DOCS_SRC))) $(filter $(T2_SRC_DIR)/prog-evolution/%,$(T2_DOCS_SRC)))
+
+T2_PHILOSOPHY_DOCS = $(patsubst $(T2_SRC_DIR)/%.wml,$(T2_DEST)/%,$(T2_PHILOSOPHY_DOCS_SRC))
+
+$(T2_PHILOSOPHY_DOCS): %: $(PHILOSOPHY_DEPS)
+
+T2_LECTURES_DOCS_SRC = $(filter $(T2_SRC_DIR)/lecture/%,$(T2_DOCS_SRC))
+
+$(T2_LECTURES_DOCS_SRC): $(T2_SRC_DIR)/lecture/%.wml: $(LECTURES_DEPS)
+	touch $@
+
+VIPE_LECTURES_DOCS_SRC = $(filter $(VIPE_SRC_DIR)/lecture/%,$(VIPE_DOCS_SRC))
+
+$(VIPE_LECTURES_DOCS_SRC): $(VIPE_SRC_DIR)/lecture/%.wml: $(LECTURES_DEPS)
+	touch $@
+
+COMMON_LECTURES_DOCS_SRC = $(patsubst %,common/%.wml,$(filter lecture/%,$(COMMON_DOCS)))
+
+$(COMMON_LECTURES_DOCS_SRC): common/lecture/%.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)) \
+					   $(filter $(T2_SRC_DIR)/no-ie/%,$(T2_DOCS_SRC)) \
+					   $(filter $(T2_SRC_DIR)/rindolf/%,$(T2_DOCS_SRC))
+
+$(T2_SOFTWARE_DOCS_SRC): $(T2_SRC_DIR)/%.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)/%.wml: $(SOFTWARE_DEPS)
+	touch $@
+
+
+#### Humour thing
+
+T2_HUMOUR_DOCS_SRC = $(filter-out $(T2_SRC_DIR)/humour/recommendations/%,$(filter $(T2_SRC_DIR)/humour/%,$(T2_DOCS_SRC))) \
+					 $(filter $(T2_SRC_DIR)/humour.html.wml,$(T2_DOCS_SRC)) \
+					 $(filter $(T2_SRC_DIR)/wysiwyt.html.wml,$(T2_DOCS_SRC)) \
+					 $(filter $(T2_SRC_DIR)/wonderous.html.wml,$(T2_DOCS_SRC))
+
+$(T2_HUMOUR_DOCS_SRC): $(T2_SRC_DIR)/%.wml: $(HUMOUR_DEPS)
+	touch $@
+
+VIPE_HUMOUR_DOCS_SRC = $(filter $(VIPE_SRC_DIR)/humour/%,$(VIPE_DOCS_SRC))
+
+$(VIPE_HUMOUR_DOCS_SRC): $(VIPE_SRC_DIR)/%.wml: $(HUMOUR_DEPS)
+	touch $@
+
+
+T2_PUZZLES_DOCS_SRC = $(filter $(T2_SRC_DIR)/puzzles/%,$(T2_DOCS_SRC)) $(filter $(T2_SRC_DIR)/MathVentures/%,$(T2_DOCS_SRC))
+
+$(T2_PUZZLES_DOCS_SRC): $(T2_SRC_DIR)/%.wml: $(PUZZLES_DEPS)
+	touch $@
+
+rss:
+	perl ./bin/fetch-shlomif_hsite-feed.pl
+	touch t2/index.html.wml
+	touch t2/old-news.html.wml
+
+T2_SITEMAP_FILE = $(T2_DEST)/sitemap.xml.gz
+
+sitemap_targets: $(T2_SITEMAP_FILE)
+
+$(T2_SITEMAP_FILE): bin/gen-google-site-map.pl
+	perl $<
+
+PROD_SYND_MUSIC_DIR = lib/prod-synd/music
+PROD_SYND_MUSIC_INC = $(PROD_SYND_MUSIC_DIR)/include-me.html
+
+PROD_SYND_NON_FICTION_BOOKS_DIR = lib/prod-synd/non-fiction-books
+PROD_SYND_NON_FICTION_BOOKS_INC = $(PROD_SYND_NON_FICTION_BOOKS_DIR)/include-me.html
+
+PROD_SYND_FILMS_DIR = lib/prod-synd/films
+PROD_SYND_FILMS_INC = $(PROD_SYND_FILMS_DIR)/include-me.html
+
+$(T2_SRC_DIR)/art/recommendations/music/index.html.wml : $(PROD_SYND_MUSIC_INC)
+	touch $@
+
+$(PROD_SYND_MUSIC_INC) : $(PROD_SYND_MUSIC_DIR)/gen-prod-synd.pl $(T2_SRC_DIR)/art/recommendations/music/shlomi-fish-music-recommendations.xml
+	perl $<
+	./gen-helpers.pl
+	$(MAKE)
+
+$(T2_SRC_DIR)/philosophy/books-recommends/index.html.wml : $(PROD_SYND_NON_FICTION_BOOKS_INC)
+	touch $@
+
+$(PROD_SYND_NON_FICTION_BOOKS_INC) : $(PROD_SYND_NON_FICTION_BOOKS_DIR)/gen-prod-synd.pl $(T2_SRC_DIR)/philosophy/books-recommends/shlomi-fish-non-fiction-books-recommendations.xml
+	perl $<
+	./gen-helpers.pl
+	$(MAKE)
+
+$(T2_SRC_DIR)/humour/recommendations/films/index.html.wml: $(PROD_SYND_FILMS_INC)
+	touch $@
+
+$(PROD_SYND_FILMS_INC) : $(PROD_SYND_FILMS_DIR)/gen-prod-synd.pl $(T2_SRC_DIR)/humour/recommendations/films/shlomi-fish-films-recommendations.xml
+	perl $<
+	./gen-helpers.pl
+	$(MAKE)
+
+
+$(SITE_SOURCE_INSTALL_TARGET): INSTALL
+	cp -f $< $@
+
+SCREENPLAY_DOCS = \
+	Humanity-Movie \
+	ae-interview \
+	star-trek--we-the-living-dead \
+	sussman-interview \
+	TOW_Fountainhead_1  \
+	TOW_Fountainhead_2
+
+include lib/make/docbook/sf-homepage-docbooks-generated.mak
+
+DOCBOOK_INSTALLED_INDIVIDUAL_XHTMLS_CSS = $(patsubst %,%/style.css,$(DOCBOOK_INDIVIDUAL_XHTMLS))
+DOCBOOK_INSTALLED_CSS_DIRS = $(foreach doc,$(DOCBOOK_DOCS),$(T2_DEST)/$(call get,DOCBOOK_DIRS_MAP,$(doc))/docbook-css)
+DOCMAKE_STYLE_CSS = $(DOCMAKE_XSLT_PATH)/style.css
+
+DOCBOOK_RENDERED_DIR = lib/docbook/rendered
+DOCBOOK_ALL_IN_ONE_XHTML_DIR = lib/docbook/essays
+
+SCREENPLAY_XML_BASE_DIR = lib/screenplay-xml
+SCREENPLAY_XML_XML_DIR = $(SCREENPLAY_XML_BASE_DIR)/xml
+SCREENPLAY_XML_TXT_DIR = $(SCREENPLAY_XML_BASE_DIR)/txt
+SCREENPLAY_XML_HTML_DIR = $(SCREENPLAY_XML_BASE_DIR)/html
+SCREENPLAY_XML_RENDERED_HTML_DIR = $(SCREENPLAY_XML_BASE_DIR)/rendered-html
+
+DOCBOOK_TARGETS = $(patsubst %,$(DOCBOOK_RENDERED_DIR)/%.html,$(DOCBOOK_DOCS))
+DOCBOOK_XMLS = $(patsubst %,$(DOCBOOK_XML_DIR)/%.xml,$(DOCBOOK_DOCS))
+
+SCREENPLAY_XMLS = $(patsubst %,$(SCREENPLAY_XML_XML_DIR)/%.xml,$(SCREENPLAY_DOCS))
+SCREENPLAY_HTMLS = $(patsubst %,$(SCREENPLAY_XML_HTML_DIR)/%.html,$(SCREENPLAY_DOCS))
+
+DOCBOOK_FOS = $(patsubst %,$(DOCBOOK_FO_DIR)/%.fo,$(DOCBOOK_DOCS))
+
+DOCBOOK_PDFS = $(patsubst %,$(DOCBOOK_PDF_DIR)/%.pdf,$(DOCBOOK_DOCS))
+
+DOCBOOK_RTFS = $(patsubst %,$(DOCBOOK_RTF_DIR)/%.rtf,$(DOCBOOK_DOCS))
+
+DOCBOOK_INDIVIDUAL_XHTMLS = $(patsubst %,$(DOCBOOK_INDIVIDUAL_XHTML_DIR)/%,$(DOCBOOK_DOCS))
+
+DOCBOOK_ALL_IN_ONE_XHTMLS = $(patsubst %,$(DOCBOOK_ALL_IN_ONE_XHTML_DIR)/%/all-in-one.html,$(DOCBOOK_DOCS))
+
+DOCBOOK_ALL_IN_ONE_XHTMLS_CSS = $(patsubst %/all-in-one.html,%/style.css,$(DOCBOOK_ALL_IN_ONE_XHTMLS))
+
+SCREENPLAY_RENDERED_HTMLS = $(patsubst %,$(SCREENPLAY_XML_RENDERED_HTML_DIR)/%.html,$(SCREENPLAY_DOCS))
+
+$(SCREENPLAY_XML_HTML_DIR)/%.html: $(SCREENPLAY_XML_XML_DIR)/%.xml
+	perl -MXML::Grammar::Screenplay::App::ToHTML -e 'run()' -- \
+	-o $@ $<
+
+$(SCREENPLAY_XML_RENDERED_HTML_DIR)/%.html: $(SCREENPLAY_XML_HTML_DIR)/%.html
+	./bin/extract-screenplay-xml-html.pl -o $@ $<
+
+$(SCREENPLAY_XML_XML_DIR)/%.xml: $(SCREENPLAY_XML_TXT_DIR)/%.txt
+	perl -MXML::Grammar::Screenplay::App::FromProto -e 'run()' -- \
+	-o $@ $<
+
+SCREENPLAY_TARGETS = $(patsubst %,$(DOCBOOK_RENDERED_DIR)/%.html,$(SCREEPLAY_DOCS))
+
+SCREENPLAY_SOURCES_ON_DEST = $(T2_DEST)/humour/TOWTF/TOW_Fountainhead_1.txt $(T2_DEST)/humour/TOWTF/TOW_Fountainhead_2.txt $(T2_DEST)/humour/humanity/Humanity-Movie.txt $(T2_DEST)/humour/Star-Trek/We-the-Living-Dead/star-trek--we-the-living-dead.txt $(T2_DEST)/open-source/interviews/ae-interview.txt $(T2_DEST)/open-source/interviews/sussman-interview.txt
+
+docbook_extended: $(DOCBOOK_FOS) $(DOCBOOK_PDFS) install_docbook_pdfs install_docbook_rtfs 
+
+docbook_indiv: $(DOCBOOK_INDIVIDUAL_XHTMLS)
+
+docbook_targets: $(DOCBOOK_TARGETS) $(DOCBOOK_ALL_IN_ONE_XHTMLS) $(DOCBOOK_ALL_IN_ONE_XHTMLS_CSS) $(ST_WTLD_TEXT_IN_TREE) $(SCREENPLAY_RENDERED_HTMLS) $(SCREENPLAY_SOURCES_ON_DEST) install_docbook_xmls install_docbook_individual_xhtmls install_docbook_css_dirs
+
+$(DOCBOOK_RENDERED_DIR)/%.html: $(DOCBOOK_ALL_IN_ONE_XHTML_DIR)/%/all-in-one.html
+	./bin/clean-up-docbook-xsl-xhtml.pl -o $@ $<
+
+$(DOCBOOK_FO_DIR)/%.fo: $(DOCBOOK_XML_DIR)/%.xml
+	$(DOCMAKE_WITH_PARAMS) -o $@ --stringparam "docmake.output.format=fo" -x $(FO_XSLT_SS) fo $<
+
+$(DOCBOOK_PDF_DIR)/%.pdf: $(DOCBOOK_FO_DIR)/%.fo
+	fop -fo $< -pdf $@
+
+$(DOCBOOK_RTF_DIR)/%.rtf: $(DOCBOOK_FO_DIR)/%.fo
+	fop -fo $< -rtf $@
+
+DOCMAKE_SGML_PATH = lib/sgml/shlomif-docbook
+DOCBOOK_MAK_MAKEFILES_PATH = lib/make/docbook
+
+include $(DOCBOOK_MAK_MAKEFILES_PATH)/docbook-render.mak
+
+DOCMAKE_PARAMS = -v
+
+$(DOCBOOK_ALL_IN_ONE_XHTML_DIR)/%/all-in-one.html: $(DOCBOOK_XML_DIR)/%.xml
+	$(DOCMAKE) --stringparam "docmake.output.format=xhtml" -x $(XHTML_ONE_CHUNK_XSLT_SS) -o $(patsubst $(DOCBOOK_ALL_IN_ONE_XHTML_DIR)/%/all-in-one.html,$(DOCBOOK_ALL_IN_ONE_XHTML_DIR)/%,$@) xhtml $<
+	mv $(patsubst %/all-in-one.html,%/index.html,$@) $@
+
+$(T2_DEST)/humour/TOWTF/TOW_Fountainhead_1.txt: $(SCREENPLAY_XML_TXT_DIR)/TOW_Fountainhead_1.txt
+	cp -f $< $@
+
+$(T2_DEST)/humour/TOWTF/TOW_Fountainhead_2.txt: $(SCREENPLAY_XML_TXT_DIR)/TOW_Fountainhead_2.txt
+	cp -f $< $@
+
+$(T2_DEST)/humour/humanity/Humanity-Movie.txt: $(SCREENPLAY_XML_TXT_DIR)/Humanity-Movie.txt
+	cp -f $< $@
+
+$(T2_DEST)/humour/Star-Trek/We-the-Living-Dead/star-trek--we-the-living-dead.txt: $(SCREENPLAY_XML_TXT_DIR)/star-trek--we-the-living-dead.txt
+	cp -f $< $@
+
+$(T2_DEST)/open-source/interviews/ae-interview.txt: $(SCREENPLAY_XML_TXT_DIR)/ae-interview.txt
+	cp -f $< $@
+
+$(T2_DEST)/open-source/interviews/sussman-interview.txt: $(SCREENPLAY_XML_TXT_DIR)/sussman-interview.txt
+	cp -f $< $@
+
+%.show:
+	@echo "$* = $($*)"
+
+tidy: all
+	perl bin/run-tidy.pl
+
+.PHONY: install_docbook_pdfs install_docbook_xmls install_docbook_rtfs install_docbook_individual_xhtmls install_docbook_css_dirs
+
+install_docbook_pdfs: make-dirs $(DOCBOOK_INSTALLED_PDFS)
+
+install_docbook_xmls: make-dirs $(DOCBOOK_INSTALLED_XMLS)
+
+install_docbook_rtfs: make-dirs  $(DOCBOOK_INSTALLED_RTFS)
+
+install_docbook_individual_xhtmls: make-dirs $(DOCBOOK_INSTALLED_INDIVIDUAL_XHTMLS) $(DOCBOOK_INSTALLED_INDIVIDUAL_XHTMLS_CSS)
+
+install_docbook_css_dirs: make-dirs $(DOCBOOK_INSTALLED_CSS_DIRS)
+
+# This copies all the .pdf's at once - not ideal, but still
+# working.
+
+$(DOCBOOK_INSTALLED_CSS_DIRS) : lib/sgml/docbook-css/docbook-css-0.4/
+	rsync -r -v $< $@
+	find $@ -name '.svn' -print0 | xargs -0 rm -fr
+
+FORTUNES_XHTMLS_DIR = lib/fortunes/xhtmls
+
+FORTUNES_XMLS_BASE = $(addsuffix .xml,$(FORTUNES_FILES_BASE))
+FORTUNES_XMLS_SRC = $(patsubst %,$(T2_FORTUNES_DIR)/%,$(FORTUNES_XMLS_BASE))
+FORTUNES_XHTMLS = $(patsubst $(T2_FORTUNES_DIR)/%.xml,$(FORTUNES_XHTMLS_DIR)/%.xhtml,$(FORTUNES_XMLS_SRC))
+FORTUNES_TEXTS = $(patsubst %.xml,%,$(FORTUNES_XMLS_SRC))
+FORTUNES_ATOM_FEED = $(T2_FORTUNES_DIR)/fortunes-shlomif-all.atom
+FORTUNES_RSS_FEED = $(T2_FORTUNES_DIR)/fortunes-shlomif-all.rss
+
+fortunes-compile-xmls: $(FORTUNES_XHTMLS) $(FORTUNES_TEXTS) $(FORTUNES_ATOM_FEED) $(FORTUNES_RSS_FEED) 
+
+# The touch is to make sure we compile the .html.wml again.
+
+$(FORTUNES_XHTMLS): $(FORTUNES_XHTMLS_DIR)/%.xhtml : $(T2_FORTUNES_DIR)/%.xml
+	bash $(T2_FORTUNES_DIR)/run-validator.bash $< && \
+	perl $(T2_FORTUNES_DIR)/convert-to-xhtml.pl $< $@ && \
+	touch $(patsubst %.xml,%.html.wml,$<)
+
+$(FORTUNES_TEXTS): $(T2_FORTUNES_DIR)/%: $(T2_FORTUNES_DIR)/%.xml
+	bash $(T2_FORTUNES_DIR)/run-validator.bash $< && \
+	perl $(T2_FORTUNES_DIR)/convert-to-plaintext.pl $< $@
+
+$(FORTUNES_ATOM_FEED) $(FORTUNES_RSS_FEED): $(T2_FORTUNES_DIR)/generate-web-feeds.pl $(FORTUNES_XMLS_SRC)
+	perl $< --atom $(FORTUNES_ATOM_FEED) --rss $(FORTUNES_RSS_FEED) --dir $(T2_FORTUNES_DIR)
+
+$(DOCBOOK_INSTALLED_INDIVIDUAL_XHTMLS_CSS): %: $(DOCMAKE_STYLE_CSS)
+	cp -f $< $@
+
+$(DOCBOOK_ALL_IN_ONE_XHTMLS_CSS): %: $(DOCMAKE_STYLE_CSS)
+	cp -f $< $@

File 2009-restyling/TODO

+* Fortunes Atom Feed:
+    - Make it validate
+    - Syndicate it into the rest.
+
+* File-Dir-Dumper:
+    - add the Freshmeat.net record.
+    - link to the similar projects.
+
+* Upload the non-Quad-Pres presentations source.
+
+* Make the purpose of the site clearly understood from each and every
+page (at the moment no one knows it's my page.
+
+* Add a page collecting the links to all the files under humour/fortunes/ .
+
+* Deprecate the gringotts-shlomif patch in favour of gringotts.berlios.de .
+
+Minor Problems:
+---------------
+
+* Fix the fact that the "Private Tutor HTML Ad" goes beyond the right 
+margins.
+
+* Go over the pages of the individual presentations and add meaningful 
+descriptions.
+    - link to the new presentation in "Linux for the Technion student".
+
+* Add to the external FOSS contributions:
+    - Mandriva
+    - MikMod
+    - Adopted CPAN Modules
+    - Wikipedia and related sites.
+
+* Investigate the following subversion scenario:
+    - svn rm myfile.
+    - svn cp ../../IP/myfile myfile.
+    - svn revert -R .
+    - change myfile.
+    - commit.
+
+Long Term:
+----------
+
+* Add more essays I wrote to the Essays Index.
+
+* Revamp the Math-Ventures site and re-write the formulae in TeX, MathML 
+etc.
+
+* Put more meaningful descriptions in the place holders for all the
+presentations.
+
+* Style the .prod_set's on the CD recommendations page.
+
+* Style the section navigation menus better.
+
+* Generate the DocBook/XML makefile rules using a Perl script.
+    - Check for more possible stuff.
+
+* Link the Hebrew Errors Page to the main one.
+
+* Add Recommendations:
+    - Movies
+    - Fiction Books
+
+* Add <rellink's (relevant links) to:
+    - Book recommendations.
+    - Music recommendations.

File 2009-restyling/bin/Serve/ShlomifServe.pm

+package ShlomifServe;
+
+use strict;
+use warnings;
+
+use CGI;
+use MIME::Types;
+
+sub serve
+{
+    my (%args) = (@_);
+    my $dir_to_serve = $args{'dir_to_serve'};
+    
+    my $cgi = CGI->new();
+    my $mimetypes = MIME::Types->new();
+    my $path = $cgi->path_info();
+
+    if (grep { ($_ eq ".") || ($_ eq "..") } (split /\//, $path))
+    {
+        print $cgi->header();
+        print "<html><body>You suck! Don't use .. or . as
+        path components</body></html>";
+        exit(0);
+    }
+
+    if ($path =~ m{/$})
+    {
+        if (-f $dir_to_serve.$path."index.html")
+        {
+            $path .= "index.html";
+        }
+        else
+        {
+            opendir D, $dir_to_serve.$path;
+            my @files = (sort { $a cmp $b } grep { $_ ne "." } readdir(D));
+            closedir(D);
+            print $cgi->header();
+            my $title = "Listing for " . CGI::escapeHTML($path);
+            my $files_string = join("", 
+                map { 
+                    my $fn = CGI::escapeHTML($_) . 
+                        ((-d $dir_to_serve.$path."/".$_)?"/":"");
+                    qq{<li><a href=\"$fn\">$fn</a></li>\n} 
+                } @files);
+            $files_string = @files ? "<ol>\n$files_string\n</ol>" : "";
+            print <<"EOF";
+<!DOCTYPE
+    html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html>
+<head>
+<title>$title</title>
+</head>
+<body style="background-color:white">
+<h1>$title</h1>
+$files_string
+</body>
+</html>
+EOF
+            exit(0);
+        }
+    }
+
+    my $file_full_path = $dir_to_serve.$path;
+    my $text;
+    do {
+        local $/;
+        open my $in, "<", $file_full_path;
+        $text = <$in>;
+        close($in);
+    };
+    my $mime_type = $mimetypes->mimeTypeOf($file_full_path);
+    if ($mime_type eq "text/html")
+    {
+        $text =~ s!http://www\.shlomifish\.org/!http://localhost/sites/hp/shlomif/!g;
+        $text =~ s!http://vipe\.technion\.ac\.il/\~shlomif/!http://localhost/sites/hp/vipe/!g;
+    }
+    print "Content-Type: $mime_type\n\n";
+    print $text;
+
+    exit(0);
+}
+
+1;
+

File 2009-restyling/bin/Serve/serve-shlomifish.org.pl

+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use File::Spec;
+
+use ShlomifServe;
+
+ShlomifServe::serve(
+     'dir_to_serve' => 
+        # File::Spec->rel2abs("../../dest/t2-homepage/"),
+        "../../dest/t2-homepage/",
+    );

File 2009-restyling/bin/Test/first-page-of-section-nav-menu.pl

+#!/usr/bin/perl 
+
+use strict;
+use warnings;
+
+use MySectNavData;
+
+use vars (qw($section_nav_menu));
+
+sub init_section_nav_menu
+{
+    if (defined($section_nav_menu))
+    {
+        return;
+    }
+my $filename = "puzzles/";
+$filename = "/$filename";
+
+$section_nav_menu = MySectNavData::get_nav_menu(
+    'path_info' => $filename,
+    'current_host' => "t2",
+    'root' => "/",
+    );
+}
+
+init_section_nav_menu();
+print $section_nav_menu->get_html();
+

File 2009-restyling/bin/Test/render-breadcrumbs-trail.pl

+#!/usr/bin/perl 
+
+use strict;
+use warnings;
+use MyNavData;
+use HTML::Widgets::NavMenu;
+use CGI qw();
+use MyNavLinks;
+
+my $my_THE_filename = "puzzles/situation/book-under-rock.html";
+{
+my $filename = $my_THE_filename;
+$filename =~ s{index\.html$}{};
+$filename = "/$filename";
+
+use vars qw($nav_bar);
+
+$nav_bar = HTML::Widgets::NavMenu->new(
+    'path_info' => $filename,
+    'current_host' => "t2",
+    MyNavData::get_params(),
+    'ul_classes' => [ "navbarmain", ("navbarnested") x 10 ],
+    );
+
+my $rendered_results = $nav_bar->render();
+
+use vars qw($nav_links);
+
+$nav_links = $rendered_results->{nav_links};
+
+use vars qw($nav_links_obj);
+
+$nav_links_obj = $rendered_results->{nav_links_obj};
+
+use vars qw($nav_html);
+
+$nav_html = $rendered_results->{html};
+
+use vars qw($leading_path);
+$leading_path = $rendered_results->{leading_path};
+
+my $render_leading_path_component = sub {
+    my $component = shift;
+    my $title = $component->title();
+    my $title_attr = defined($title) ? " title=\"$title\"" : "";
+    return "<a href=\"" . CGI::escapeHTML($component->direct_url()) .
+        "\"$title_attr>" .
+        $component->label() . "</a>";
+};
+
+use vars qw($leading_path_string);
+
+$leading_path_string =
+    join(" &rarr; ",
+        (map
+        { $render_leading_path_component->($_) }
+        @$leading_path
+        ));
+
+use vars qw($nav_links_renderer);
+
+$nav_links_renderer = MyNavLinks->new(
+        'nav_links' => $nav_links,
+        'nav_links_obj' => $nav_links_obj,
+        'root' => "../..",
+        );
+    }
+
+    use MySectNavData;
+
+    use vars (qw($section_nav_menu));
+
+    sub init_section_nav_menu
+    {
+        if (defined($section_nav_menu))
+        {
+            return;
+        }
+    my $filename = $my_THE_filename;
+    $filename =~ s{index\.html$}{};
+    $filename = "/$filename";
+
+    $section_nav_menu = MySectNavData::get_nav_menu(
+        'path_info' => $filename,
+        'current_host' => "t2",
+        'root' => "../..",
+        );
+
+return;
+    }
+
+    init_section_nav_menu();
+    my $total_leading_path = $section_nav_menu->total_leading_path(
+        {
+            main_leading_path => $leading_path,
+        }
+    );
+
+    my $render_leading_path_component = sub {
+        my $component = shift;
+        my $title = $component->title();
+        my $title_attr = defined($title) ? " title=\"$title\"" : "";
+        return "<a href=\"" . CGI::escapeHTML($component->direct_url()) .
+            "\"$title_attr>" .
+            $component->label() . "</a>";
+    };
+
+    print join(" &rarr; ",
+        (map
+        { $render_leading_path_component->($_) }
+        @$total_leading_path
+        ));

File 2009-restyling/bin/add-sponsored-ads.pl

+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use IO::All;
+
+foreach my $ad (grep { /\.html$/ } io("Ads-for-Homepage")->all_files())
+{
+    my $contents = $ad->slurp();
+
+    if ($contents !~ m{\Ahttp://www.shlomifish.org/(\S+)})
+    {
+        die "No line found in $ad!";
+    }
+
+    my $path = $1;
+
+    if ($path =~ /\/$/)
+    {
+        $path .= "index.html.wml";
+    }