How I Use/Used Linux to Create/Maintain this Website

by David S.Lawyer mailto:davylawyer1@gmail.com

May 2001

1. Writen in Linuxdoc SGML using the vim editor

2. Keeping this site up-to-date


1. Writen in Linuxdoc SGML using the vim editor

This site was both created in about 2000, and updated by free Linux software running on a old 486 PC. The free vim editor (a powerful modal editor) was used to type the files. To create html (many files are plain text), a sgml (Standard Generalized Markup Language) of type Linuxdoc was used. Most Linuxdoc tags were entered using only a couple of keystrokes using vim's mapping feature. Then it was converted to html using sgml2html. I do it this way since Linuxdoc is a lot simpler to type than HTML. The Linuxdoc files can also be automatically converted to other formats including plain text. A makefile (see below) automatically generates the html files from the source sgml files when needed using an implicit rule (in makefile) that I wrote to replace the builtin rules.

In 2017, 17 years later, I'm still updating my website with the same tools including Linuxdoc. I've looked at other more recent tools like reStructuredText and find Linuxdoc to be easier to remember. The tragedy is that Linuxdoc was much used by the Linux Documentation Project which is unfortunately sort of in a state of limbo today. While Linuxdoc is still being maintained it's not adding more modern features like making it easy to put images on ones website. So I believe that the Linuxdoc would be superior in many situations to all the wide range of markup languages available today if only someone would modernize it, for example by adding support for unicode utf-8.

2. Keeping this site up-to-date

This is how it was done before losing my website at Los-Angles-Freenet due to closure. A master copy of the site is kept on my PC in the /website tree. This is used to update my site. To update the site I type "web" which runs the "web" function I defined in /etc/profile:

#Funct to update my website (should be connected to net)

web () { cd /home/dave/website; mk --no-print-directory ;\
 command /usr/bin/sitecopy --update lafn ; cd - ; }

This will first go to various folders and run the "make" command (abbreviated as "mk") in each folder. See makefile. Then it contacts my website by ftp and copies to it any updated files that have changed since the last time I updated my site. The configuration file ~/.sitecopyrc tells it what the state of my site at lafn is and what files not to upload (* is a wildcard). Here's a copy of ~/.sitecopyrc:

#Configuration for my (now dead) www.lafn.org/~dave website updating using
#sitecopy
  
  site lafn server www.lafn.org url http://www.lafn.org/~dave username
  dave local ~/website/ remote ~/ safe symlinks follow nodelete
# exclude "*.sgml" (backup) exclude makefile (stored on site as a backup)
  exclude "*.bak" exclude type_web_to_update 
>


# Makefile for David S. Lawyer's website.  Run from the ~/website
# directory.  To aviod the overhead of builtin-rules use "mk" command,
# a function I defined in etc/profile with flag --no-builtin-rules.
# Easiest way to run is to type "web", defined in /etc/profile.

# Here's a list of targets (the .html files I want to make from .sgml
# files).  Note the use of the variable i.
i = index.html
index = ./$(i) trans/$(i) trans/energy/$(i) trans/econ/$(i) throop/$(i) uu/$(i) uu/throop/$(i) linux/$(i) bak/$(i)
htmls = ./linux/site_details.html
# all is a phony target (No file is named "all").  Since all is by
# default the first target, one may just type "mk" to run this
# makefile.
#trans/rail/$(i) 
all: $(index) $(htmls) subsystem
.PHONY: all

# Below are user-defined implicit rules.  For example, each target
# $(index) depends on %.html (itself) which in turn depends on %.sgml.
# % is a wildcard.  The next line (indented)  shows how to make it:

$(index) : %.html : %.sgml
        cd $(*D) ; /usr/bin/sgml2html --split=0 $(<F)
# Use of tidy resulted in removal of <p> tags enclosing list which
# eliminated the blank line before the start of the list.
        -tidy -quiet -modify $@
$(htmls) : %.html : %.sgml
        cd $(*D) ; /usr/bin/sgml2html --split=0 --toc=2 $(<F)
#use tidy to clean up files
        -tidy -quiet -modify $@

# $(*D) is the Directory part of the stem of a match made by the
# implicit rule.  It's just the directory defined by $index (such as
# trans/).  The $(<F) is the File name part of the dependent .sgml
# file such as index.sgml.  cding back to this directory at the end of
# each command line is automatic

# Below, the makefiles in other directories are run
subsystem:
        cd /home/dave/throop/history && $(MAKE)
        cd /home/dave/throop/univ-hist && $(MAKE)
        cd /home/dave/throop/prop && $(MAKE)
        cd /home/dave/rail && $(MAKE)
        cd /home/dave/tenergy && $(MAKE)