Using the tools
to build a webpage
The following is a sketch of steps I
might take to develop my next set of pictures pages, say for project
2007/Spring. In this case I
will use gendirs and will generate files like those from Peru
and Ecuador. It is
gendirs that requires the two templates, template.tpl and frame.tpl.
Genhtml uses the template pictd.tpl
1. Upload all pictures from camera
to C:\pictures\Originals\2007\Spring. I
treat Originals\... as Insert/Read-only; uploaded pictures are neither
deleted nor
edited. Instead I copy selected and edited versions to another
directory. (Backslashes are for Windows file names. When giving
commands through cygwin, I use forward slashes.)
2. Create directory
C:\pictures\Digested\2007\Spring\ for the selected pictures. With
Picasa, visit C:\pictures\Originals\2007\Spring and select the useful
pictures. Crop, recolor, adapt them. Export
them to C:\pictures\Digested\2007\Spring. (When you edit with Picasa,
it
shows the results, but the pictures remain unchanged.
The exported images DO reflect the edits. However, if you "save
changes" with Picasa, the originals are moved to a subdirectory called
"originals" and the picture is replaced with the processed picture.)
3. The webpage will be part of my PICSRC tree. So (with a Cygwin
command window) create directory
$PICSRC/annals/2007/Spring/pix. This directory, .../pix/, will have
only control
and HTML files; the pictures will remain in Digested. From there they
will be processed to make smaller versions in the staging area,
4. In a Cygqin window, change directory to
c:/pictures/Digested/2007/Spring run gencaps:
gencaps
$PICSRC/annals/2007/Spring/pic/captions.cap
This creates .../pix/captions.cap with each picture represented by one
line with the picture's file name.
5. Edit .../pix/captions.cap to have captions following the file names.
Rearrange lines to reorder
the display sequence. Insert segment headers
(file: ...) to break up the set of images into smaller segments. Delete
caption lines for pictures no longer
seeming
worthy. (I'm not sufficiently ruthless when selecting pictures with
Picasa.)
6. To turn .../pix/ into a webpage we need to add at least a Makefile,
an index.hin
file, and two template
files:
template.tpl and frame.tpl. I usually start by grabbing
these files
from some earlier project. You can start with copying and revising the
ones distributed in pictools/.
7. Edit the index.hin file in .../pix/ to show off your pictures as you
like. Somewhere in it put $include(captions-titles.txt).
This will put in links to the index.html files for the individual
segments of pictures.
8. Generate the site into the local staging area:
cd .../pix
make build
This creates in $PICSTAGE/annals/2007/Spring/pix/ a website that
behaves much like the final released site.
9. Review the new pages by browsing to
$PICSTAGE/annals/2007/Spring/pix/index.html. Note the changes you want
to make
and
edit the files in .../pix/. If it is not yet midnight,
return to
step 7.
10. If you selected pictures with Picasa and then omited them from
captions.cap, you can make another cpations page just listing those
almost-good-enough pages. Go to .../pix/ and say
make
newpix
This command generates newpix.cap. Rename it immediately, say
call it recentpix.cap. Change the segment
name after file:
in its first line. I
usually do not put captions in recentpix.cap. To incorporate this new
set of captions, add to index.hin a line
$include(recentpix-titles.txt)
and add to Makefile the line
$(DEST)/index.html:
recentpix-titles.txt
Return to step 7.
11. When you are happy with the web pages in the staging area, upload
them to the server:
cd .../pix/
make upload
Be sure to review the actual website and check every link.
|