#!/bin/sh ## ## SCRIPT: 00_GEN_imgsDownHTMLpage_4jpggifpngFiles.sh ## ## PURPOSE: Generate an HTML file showing image files down the page. ## ## METHOD: Put this script in a directory of image files. ## ## Run this script which puts the resulting HTML file ## in the directory with the image files. ## ## The script puts the image filenames in ## statements down the HTML text file. ## ## The HTML file will need to be edited to add an ## appropriate title --- and some decorative images ## may need to be added (or the pertinent img-src ## statements should be commented or removed). ## ## The INTRODUCTION and other text sections should be ## edited to change the text appropriately --- or remove ## the text sections which are not needed/wanted. ## ## The HTML file can be edited to change the order of ## the images down the page by moving the img-src statments. ## You may want to change some widths. ## ## And some images may be shown side-by-side --- by ## removing a p-center statement and changing some widths. ## ## You may need to adjust the location of the parent ## directory of the CSS and JS files referenced near ## the top of the HTML file. ## ## The HTML file should be renamed to a more descriptive ## filename. ## ## Started: 2009aug18 ## Changed: 2010jul21 ## Changed: 2020oct12 Added width-percents to img-src statements ## and various other changes --- including ## adding a CSS file and JS file reference ## near the top --- to try to handle ## formatting for mobile devices such as ## cellphones in 'portrait' mode. ## Changed: 2020oct14 Added a few comment statements to appear ## in the HTML file --- to provide hints on ## some things to do when editing the HTML. ## FOR TESTING: # set -v set -x ## ## Initialize the htm output file. ## HTMFILE="00_RENAME_ME.htm" echo " Title Goes Here

Title Goes Here

subtitle goes here

INTRODUCTION :

yada yada yada


How the images are presented :

Each image is shown scaled to a width proportional to the width of your browser window.

Hence by changing the width of your browser window, you can re-size the images.

Each image is a link to a new window (or tab) that shows the image at its natural size. Click on any image to see it in a separate window.

Close (or minimize) the separate window(s) to access this window again.

If you hold the mouse cursor over a photo, a small pop-up "balloon" will provide a brief description of the image, with the pixel-size indicated. (These pop-ups should work in most web browsers.)

Most of the images are medium- to high-resolution --- more than 300 pixels wide.

" > $HTMFILE ## ## Set the filenames list. ## # FILENAMES=`ls | grep '\.jpg$'` FILENAMES=`ls | egrep '\.jpg$|\.gif$|\.png$'` ## FOR TESTING: # echo "$FILENAMES" > $HTMFILE # exit ## ## START THE LOOP on the filenames. ## FILECNT=0 for FILENAME in $FILENAMES do FILECNT=`expr $FILECNT + 1` # FILENAMECROP=`echo "$FILENAME" | sed 's|\.jpg$||'` # FILENAMECROP=`echo "$FILENAME" | sed 's|\.jpg$||' | sed 's|\.gif$||'` ## Write out image-display statement. echo "

" >> $HTMFILE done ## ## END OF FILES LOOP. Write out bottom of htm file. ## echo "

For more images:

Here are some links to WEB SEARCHES for more images related to this subject.

Bottom of this
Title Goes Here page.

To return to a previously visited web page location, click on the Back button of your web browser, a sufficient number of times.

OR, use the History-list option of your web browser.

OR ...

< Go to Start of Images, above. >

< Go to Top of Page, above. >

Or you can scroll up to the top of this page.


Page history:

Page was created 2020 xxx 00.

Page was changed 2020 xxx 00.
(Added ....)

" >> $HTMFILE ## ## SHOW HTML FILE with a web browser. ## # firefox "$HTMFILE" & $HOME/bin/seamonkey64/seamonkey "$HTMFILE" & # palemoon "$HTMFILE" & ## ## EDIT HTML FILE with a GUI editor. ## # kwrite "$HTMFILE" /usr/bin/scite "$HTMFILE" # gedit "$HTMFILE"