generating browseable web albums with Graphicconverter
This is the process I use to generate web albums:
- To start you need the ’smart’ banner & nav includes. links to samples here or something.
- reuse same banner for all ozzie stuff
- create new nav bar for each trip
- Generate the html pages from the organized picture folders. Use Graphicconverter File->Catalog->html:
- rename images folder to imagepages. doesn’t really matter anymore, actually.
- Paste this into the ‘Addition to the head tag’:
<style>
@import url(../../../../mainstyles.css);
</style> - Text after <body>:
<!--#include virtual="../../../smallozziebanner.shtml" -->
<!--#include virtual="../../alicenavbar.shtml"-->
<div id="main"> - Text before </body>:
</div> - then generate catalog, choosing the correct subfolder as the target
- edit the index file(s), and remove one level from the header includes (3x).
Could find a way to automatically substitute ../../../ with ../../ in index.shtml,index2.shtml..etc files?
find . -regex '.*index[0-9]*.shtml' -exec sed -i bak -E -e 's/(../){2}/..//g' {} ;BBedit will do this. just replace the following with 1 less ‘../’
../../../../mainstyles.css../../../smallozziebanner.shtml../../xxxnavbar.shtml - rename all the imagepages from 1.html to 1.shtml:
using this shell command (if you’re all in one directory):~/perlstuff/ren-regexp 's/html$/shtml/' *.html
or, for multiple files/directories, try this, without the ‘-t’ option. These seems to choke if the find command doesn’t match any files. Maybe the perl script doesn’t like null input?:
~/perlstuff/ren-regexp -t 's/html$/shtml/' `find . -regex '.*/[0-9]*.html'`ren-regexp is a non-standard perl script which comes from the following post (I had to download the perl script to use the above commands, obviously):I wrote an extremely useful Perl
script to rename many files
simultaneously using Perl regular expressions as opposed to shell
globs. For instance, to rename all files ending in “tiff” to “tif” (as
shown above), one would execute:ren-regexp 's/tiff$/tif/' *tiffMore than one regular expression can be applied serially to each file:
ren-regexp 's/tiff$/tif/' "s/^DCS/Vacation-/i" "s/_/-/g" DCS*tiffIt’s vastly more powerful than a glob-based rename function; provides
100% compatibility with Perl regular expressions; prints output (which
can be suppressed) showing each regular expression as it’s applied; and
has a test flag (”-t”) to see the result without actually performing
the operation. Advanced command-line users and sysadmins will find this
particularly useful. I use it myself several times a day.You can download ren-regexp here.
Let me know what you think. - search through all files and replace .html with .shtml (using bbedit is pretty easy; grep?)
- *fixed* (add the g) problem with this is that it only replaces on occurence per line. working on that…
- if any non- .shtml files, search through and rename them (smallbanner.html)
find . -name "*.shtml" -exec sed -i .bak -e 's/[.]html/.shtml/g' {} ;
