Project Specifications
Copyright (C) 2000 by Steve Litt
NO WARRANTEE!
Top Level Functionality
Pictorial
Single Table of Contents Slide/page
show-wide template template
HTML file file file
|_________ | ________|
| | |
V V V
---------------------------------------------------
| htmlslides presentation splitter/formatter |
---------------------------------------------------
| | | | |
V V V V V
Table of 1.html 2.html 3.html ... n.html
Contents
|
Narrative
The htmlslides program uses three input files: the single show-wide HTML
file, the Table of Contents template file, and the page/slide template
file. single show-wide HTML file contains all content. Slides are delineated
by title lines which are enclosed in an <address> </address> tag
pair. The enclosed title appears as the title of the slide and the title
on the Table of Contents (TOC) link.
The TOC template determines the look of the table of contents. It uses
the "zzzCONTENTSzzz" replacement strings to place the TOC links. All other
TOC page materials are defined by the TOC template.
The page/slide template defines the general look of all slides, thereby
keeping a uniform "feel". The following substitution strings place the
title, navigator, page number and slide contents, respectively.
-
zzzTITLEzzz
-
zzzNAVzzz
-
zzzPAGENOzzz
-
zzzSLIDEzzz
Note that each of these can be used in multiple places. It's handy to have
the title at the top of the visible page, and also as the title in the
header. The title is the string between <address> and </address>
in the single show-wide HTML file. The slide contents are everything in
the show-wide HTML file between the title and the next title. The navigator
is a series of left and right angle brackets and carats indicating "go
back", "go up", and "go forward". The program installs the correct HREFs
to make these navigator links accurate. The page numbering starts at 1
for the first non-TOC slide and increments thereafter. At this time there
is no provision to start at a higher number, but that's quite easy to do.
Object Architecture
-
OS object
-
CONFIG object
-
CHOICE object
Almost the entirety of this program is contained in the Wpager class, which
retains all state and presents all methods. Indeed, the main program is
simply a check for correct number of arguments followed by the instantiation
of the Wpager object.
The instantiation calls the doit() method, which in turn repeatedly
calls the doPage() method, which basically writes everything between this
title and the next from the single show-wide HTML file to the slide file,
in the context of the page/slide template. It also makes note of
the slide title and its URL for later use in the TOC page.
The code is quite obvious from there on down.
Show-Wide HTML File Specifications
The single show-wide HTML file contains all tutorial material in the slideshow.
The file is split into slides using titles wrapped in <address> </address>
pairs. Obviously these should be one line titles. The material between
these titles is inserted in place of the "zzzSLIDEzzz" substitution string
in the page/slide template. Therefore all formatting is kept intact. However,
if the page/slide template surrounds the zzzSLIDEzzz substitution string
with tags, those tags can override or interfere with the tags from the
single show-wide HTML file. It's therefore recommended that the template
not surround the "zzzSLIDEzzz" substitution string with any codes.
It's best to use <h1>, <h2>, <h3>, etc for slide headings.
At the presentation, the browser's configuration can be modified to present
these styles in the proper size. It's typically best to disable the "Allow
Scaling" option to prevent "jaggies". While you may be tempted to use proprietary
fonts, please keep in mind that this cuts down on the slideshow's portability.
Page/slide Template File
Specifications
The purpose of the Page/slide template file is to define the "look" of
all the slides, including meta-tags, copyright notice, lines, logos, etc.
Also, it allows pinpoint placement of the title, navigator(s), page number(s),
and the slide material itself via the following substitution strings:
-
zzzTITLEzzz
-
zzzNAVzzz
-
zzzPAGENOzzz
-
zzzSLIDEzzz
TOC Template File Specifications
The purpose of the TOC template file is to define the "look" of the TOC
page, including meta-tags, copyright notice, lines, logos, etc. It allows
pinpoint placement of the slide list (links) within the other material
via the "zzzCONTENTSzzz" substitution string.
htmlslides Command Line Syntax
The syntax is as follows:
./htmlslides infile ptemplate ttemplate
The infile argument is the single show-wide HTML file, which defines the
slideshow's content and its division into individual slides. The ptemplate
argument is the page/slide template defining the look of the slides. The
ttemplate argument is the TOC template which defines the look of the Table
of Contents page.
Other Tips
You must have only one slideshow per directory, as the output filenames
will overwrite each other. You should rerun htmlslides every time you change
any of the three input files. You can delete the slides with the following
command:
rm [0-9]*.html
However, this should only be done if you are sure no important files begin
with a digit. NEVER begin any template or show-wide HTML file with a digit.
You can delete the TOC page with the following:
rm toc.html
If you want to license your slideshow as freely copyable but not modifyable,
be sure to include links on the TOC template and the page/slide template
to a page outside the slideshow (interface.html is a good choice of filename)
to link the reader back to the hosting website, as well as to link to the
TOC page of the presentation. The link text might say something like "exit
slideshow". In this way, the hosting website can give the reader a path
back to his website without placing links inside your slideshow.
Copyright (C) 2000 by Steve Litt
NO WARRANTEE!