Cheryl Wheeler Web Site Tools

This page describes a series of programs that I use to maintain Cheryl Wheeler's website. These programs are made available via the Free Software Foundation's GNU copyleft agreement.

These programs can be used to maintain other websites, provided they are organized using the same directory structure.

In addition to source files, the Borland .ide files are also included. These are project files which, if you have Borland C++ Builder 5.0 or better, will allow you to create the executables.

Top

Introduction

These programs are used to maintain a website containing information about singer/songwriter Cheryl Wheeler. The site is organized into a series of topics, where each topic has its own directory. Two text files defines the albums and songs that are to be included within the Discography and Songs pages:
alblist.txt
This file defines all the albums. Albums are grouped into categories. Each album has a code (i.e. abbreviation) and a title.

Category lines begin with an asterisk. Blank lines are ignored. All remaining lines define an album, and contain the title and the code, separated by vertical bars.

For example:

    *Albums by Cheryl
    Newport Songs|newport
    Live and Otherwise|lao
    Cheryl Wheeler|cw
    Half a Book|hab
    Circles & Arrows|cna
    Driving Home|dh
    Mrs. Pinocci's Guitar|mpg
    Sylvia Hotel|sylvia
    
    *Compilations Containing Songs by Cheryl
    All-Ears Review Vol. 3~Singing Out - Songwriters for the 90's|aer
    Ben & Jerry's Newport Folk Festival '88 Live|bnj88
    Ben & Jerry's Newport Folk Festival, Vol. 2|bnjv2
    Ben & Jerry's Newport Folk Festival~Turn of the Decade|bnjtod
    ...
    

songlist.txt
This text file defines all the songs to be considered significant. Song entries contain four fields:
  • title
  • Flag indicating if song clips are present
  • Flag indicating if lyrics are present
  • Code (abbreviation) of the song.
  • Optional comment field about song clip
Note
It is crucial that the Song Title appear in the various files exactly as it appears in this file. Even the slightest variation will cause that particulr entry to be missed (i.e., not considered significant).

Here is a segment of this file:

    75 Septembers|n|y|75s
    Aces|n|y|aces
    Act of Nature|n|y|aon
    Addicted|n|y|addict
    All the Live Long Day|n|n|atlld|
    Almost|n|y|almost
    Arrow|n|y|arrow|from Cheryl Wheeler
    As Soon as Words are All I Need|n|y|asawaain|No recording available
    

Top

Directory Structure

Files are named by using the (song or album) code, followed by an appropriate suffix, usually .txt or .html.

The following directory structure is assumed:

Album Directories
alb
Input directory for album pages. This directory contains descriptions of the various albums. File names are code.html.
tracks
Input directory for album pages. This directory contains the track listings for the album. File names are code.txt. The file format is identical to my albums database program.
discog
Output directory for album pages. File names are code.html. These files are build from files in the alb and tracks.

Songs Directories

sng
Input directory for songs pages. File names are code.html. These files contain the description of the song.
lyrics
Input directory for songs pages. File names are code.txt. These files contain the lyrics for the song.
songs
Output directory for songs pages. File names are code.html.

General Directories

work
Input directory for home pages. File names are code.html.
home
Output directory for home pages. File names are code.html.

Top

Macros

Input .html pages are not pure HTML. Macros may be embedded within the input files. These macros are defined within include files, and are expanded when the output files are created.

To invoke a macro, begin a new line with a greater-than sign (>), followed by the name of the macro. For example:

Actual html code may be inserted anywhere with the input file. The macro definition can contain common formatting instructions. This allows you to easily make global context based formatting changes. In the above example, the macros Normal, NormNext, and NormEnd contain the appearance of "normal" text segments.

Macro definitions begin with a line starting with a greater-than sign (>), followed by the macro name. The macro definition is ended with a line containing only a greater-than sign (>).

The following are sample macro definitions:

Macros are defined within include files which are located in the include directory. There are three separate macro files:

When building album files, albinc.txt will be searched first; when building song files, songinc.txt will be searched first. The include file include.txt is always searched last. This allows you to override generic formatting, or to allow album or song macros to invoke the general macros.

Top

Programs

The following executable programs are included in this package:
Album Programs
bld_alb
This program builds a new Album page. It reads files from the alb and tracks directories and builds the output file in the discog directory. All songs contained within the album tracks that match an entry in the songlist.txt file will contain hyperlinks to the songs page.
bld_discog
This program builds the Discography page, which lists all the albums grouped by categories. Each album entry is a hyperlink to the album page.

Songs Programs

bld_song
This program builds a new Song page. The program reads files from the sng and lyrics directories and creates the output files in the songs directory. One section of the output file lists all the albums where the song is recorded, along with a hyperlink to the albums pages.
bld_songs
This program builds the "table of contents", as it were, for songs. This is analogous to the discography page for albums. The program reads the file songlist.txt and creates the output pages songs.html and songs_links.html in the home directory.

General Page Programs

bld_page
This program reads an .html input file, expands any macros that are encountered, and creates an output .html file. The user may specify the input and output directories, along with a list of file names.
bld_home
This program creates main topic pages stored in the ./home directory. The input file is read, macros are expanded as they are encountered, and the resultant output files are created: the actual data file and a links file. File names are base.html and base_links.html, where the input file is base.html.
make_new
This program examines songs and album files and makes any new files whose input files have changed since they were last created. Such changes might be the main descriptive files as well as tracks or lyrics files.

Albpalm
This program isn't really part of this package. It reads the schedule text files and reformats it for use with my Palm Pilot.

Top