---- add-nav-code
Add Navigation Code Worksheet
Add Navigation Code Worksheet
This is a neat heavily used utility, and is used for this section. The facility has now been enhanced, so that there is the option of also creating the htm pages, simultaneously with creating the navigation. To accomplish this, several text files reside in each folder:
- FolderInfo.txt (CSS strings, backlinks; options for sub-indexes, descriptions, and shortcut icons)
- FolderData.txt (the two titles and code for the page body)
- FolderCSS.txt (optional, specific for each htm)
- FolderDesc.txt (optional file that adds a description meta tag to the head section. specific for each htm)
- FolderTopLinks.txt (optional file with backlinks that are put above the regular backlinks. specific for each htm)
There are several options for each path. They apply to both navigation only, and when also creating the files. The options are additive:
- 1 - Create htms for folder, in addition to creating the navigation
- 2 - Process down one level.
- 4 - Use htm files only (don't include sub-folder paths)
- 8 - Strip common beginning of Titles without colon being present (default is navigation titles strip up to a common colon).
Off to the right is a list of strings that we strip from the fronts of title tags, when the tags are used for navigation and for creating the site map.
You have the option of stopping and starting what code in the top file is to be used in the building of the circular navigation links. The strings to embed are in the top right.
The routines are often run by buttons on the dashboard, and not from this page.
This is one of three sheets where a macro on Ctrl-R puts the row number you are on into the Row cell.
If the navigation has changed, the site map for the site will have to be rebuilt.
The module with the VBA Code.
---- find-replace
Find/Replace Worksheet
Find/Replace Worksheet
There are many options here, with numerous buttons to view and edit what you are working with. For a path, the Edit or View will find the index file.
The strings looked for can either be entered as a string, or taken from a file that is pointed to. This allows the inclusion of carriage returns in the search and/or replace strings. Instead of replacing, the facility can insert the second string before or after the first string.
Recursiveness is an option one usually wants turned on.
By default, the find is case sensitive. This can be turned off.
You have a choice as to what filetypes you find and replace in:
- htm
- txt
- htm+txt
- css
- log
- cue
- filenames - This combobox option looks in the filename and not in the file content. File type will be ignored. Searching does not search the path, but does search the file extension. There is no replace. There are two options: 1-string within filename, 2-entire filename.
There is a facility that lets you search and replace on the results of a prior find. You create a TempList.txt file from the displayed results. Enter templist into the "Top Path or File" cell. Then everything works on that list.
The module with the VBA Code.
---- image-utilities
Image Utilities Worksheet
Image Utilities Worksheet
There are many facilities here. All are run from the same path. There is the option to process recursively, but it is never used. There are two path inputs, but only one is in use at a time. This allows one path to remain pointing to a temp folder where scans are put and processed. The second for an ad hoc folder. Pasting and deleting in the input cells toggles the option buttons.
The buttons:
The module with the VBA Code.
---- maintenance
Maintenance Utility
Maintenance Utility
- The Hyperlinks throughout the workbook are to local files. This not recently tested facility changes them all to web links, so someone else using this spreadsheet can open the files.
- A link opens a file listing all the special text characters.
- A facilty to move files between folders based on a filter string.
---- picture-albums
Picture Albums Worksheet
Picture Albums Worksheet
You will need to scroll over a bit to see all.
I bought my first digital camera in September 1999. I put my pictures on PhotoPoint.com. At the time, for picture hosting, they were the one. In December 2001 PhotoPoint abruptly shut down. Their bandwidth costs were too high.
Now I had all the pictures, but I didn't have my captions. For $25 they sold you a CD with your pictures and captions in an HTML slide show format. I used that as the basis in the spring of 2002 to write my own picture album slide show code in APL. Making it my first automation project. (Instagram started in 2010.)
The sheet is complicated, as the over 10,000 are organized into various groupings. And there are another 2,000 travel pictures that have not yet been added.
This is one of three sheets where a macro on Ctrl-R puts the row number you are on into the Row cell.
The module with the VBA Code.
---- site-analysis
Site Analysis Worksheet
Site Analysis Worksheet
There are many utilities here:
- Collecting all the CSS code into one file for easy finding of past code examples. There is a button here to open the file, but having it saved to my Desktop, I click it there. There is a list of folders with CSS code that isn't mine, and I don't want included.
- There is a button that collects all the CSS file usage, and groups the folders that use that CSS file.
- A utility looks for images in a folder that are not used.
- Ampersands no longer need to be escaped. But other than in URLs, it is good practice to still escape them. This looks for the unescaped ones.
- There are three statistics listings that have buttons in the Dashboard. They are repeated here.
- Statistics for each Slide Show:
- Page Count
- Thumbnail Size
- Thumbnails Total KB
- Image Size
- Average Image KB
- Folder Path
- Slide Show Option Usage. Three options are turned on by the presence of files in the show's folder. This lists which folders are using them:
- Captions.txt - has a row for each image.
- Heading.txt - puts a heading on each image's page.
- Subheadings.txt - These are blocks of code that are inserted before a specified thumbnail.
- Find Unused Jamaica Images. Goes through each of the sections.
- Folder Htm Stats. This lists all the various folder data files that are used to create the htms on the AddNav sheet. You can then edit the files from the sheet with Ctrl-R and the cursor on the row.
- For the Picture Albums we have three utilities:
- Listing ai_ files, lists the album information files. Has number of rows (some are optional), the date in the file, and whether the file is a group file.
- Info on Albums. The columns:
- Web-size average
- Web-size maximum
- Original image average size
- Original image maximum size
- Picture Count
- Maximum length of picture data files (pd_ prefix)
- Album name
- Find Unused Data. Lists all the folders, and their file contents, that were found on the hard drive and are not included in any picture albums.
- Various buttons let you analyze and correct the results.
The module with the VBA Code.
---- site-map
Site Map Worksheet
Site Map Worksheet
This was the most difficult code to write. You have to recursively go through every folder and organize the results in nested unordered lists.
It was first written in APL over three weeks. Later it was rewritten on VBA, with optional additional post processing and speedups. The post processing:
- Combining folders into contiguous blocks
- Moving sub-folder calls -- e.g. to PDFs -- to end of folder
- Making sure index file is first in folder
- Bring sub-subfolders to parent
The site map is built in the order it finds the links. Your can add comments to your HTML to disregard code, knowing the links will be found later in a more appropriate position.
A report is returned with statistics and any error messages or warnings.
The module with the VBA Code.
---- slide-shows
Slide Shows Worksheet
Slide Shows Worksheet
The Picture Albums were developed first. But then I needed slide shows to display catalogs and books. The macro creates the individual files, and inserts the thumbnail code into the index page. Arrows in the upper left control movement between pages.
Initially each image was a page from some catalog, and each page needed no specific caption. Captions for each picture are now optional. Sub-heading sections in the thumbnail list are now implemented in two ways. Either blocks of code to insert, or strings are inserted into title containers.
This is one of three sheets where a macro on Ctrl-R puts the row number you are on into the Row cell.
Options available on the sheet in columns:
- Publication Type Options:
- blank is nothing (just folder or heading text name)
- 1- Catalog
- 2- Folder
- 3- Pages
- 4- Photo
- 5- Slide
- Cover Flag:
- A blank is always labeled Cover
- TRUE makes page 1 labeled Cover
- Back Flag:
- Blank the last page has a number
- TRUE the last page is labeled Back
- Options are additive:
- 1- Put border around image on htms.
- 2- Use "-f" files. Default is numbers with prefixes (tp - thumbnail, wp - web-size, p - full fize (optional))
- 4- Put captions on Index page. Captions on Individual pages must exist first.
- 8- Use Captions file for image order.
There is a utility to resize and rename the images. More image processing is on the Images Utilities Sheet.
The module with the VBA Code.