make a list of unique HTML directory paths that contain a graphics subdirectory (Unique Html Path With Graphics). This is meant to complement my txts routine which makes lists of (full path) files that contain user-specified text phrase. I can usually quickly read through these files and find what I am looking for. However, in the case of my large collections of html docs, it is ofter useful to be able to view the images (in the ./graphics subfirectories) that are asoociated with such docs. This routine takes each line in a txts output list and makes the path to the unique resident directory:
An example of what this code does: If I start with a file like: /home/sco/scohtm/scocodes/ds9_view_markII/index.html I first determine the directory path: /home/sco/scohtm/scocodes/ds9_view_markII/The emphasis on the word "unique" just referes to the fact that I list only unique paths to the output file. A webpage directory might have many *.html files, and many of these could be listed in the output list from txts. When I use a code like display_image_list I want to view the images associated with this unique path only once. So, uhpwg makes sue only unique paths are written to the output only once.
It should be noted that this should really not be an official OTW (One Thing Well) code. After the unique paths are established by the uhpwg.f code, the the driver bash script (uhpwg.sh) uses a variety of other scripts to process this list and establish the list of image (graphics) files. Hence, what comes out of running uhpwg.sh is a file that can be fed directly to a display codes like display_image_list. In fact, the last thing displayed to the user is the command for doing this. Since a key compoeent of this type of search starts with using txts I am placing a full example of the method in that webdoc as well as below.
Here is how I might search for a web document, where I also view the images associated them. Suppose I have a web document where I may have used a phrase like "acm biass". Here is what I might do.
WEB SEARCH EXAMPLE: % txts $scohtm/scocodes "acm bias" 0 Number of files with the text phrase = 30 1 Number of files with the text phrase using case-insentive search = 35 2 Number of files/line with the text phrase search = 79 3 Number of files/line with the text phrase using case-insentive search = 84 I read trhough the most extensive file (SEARCH3) and I still can not find what I am looking for. Ica look at the figures in all of the html docs using the following steps. % uhpwg.sh SEARCH0 Number of unique paths found = 18 The number of images file located = 84 View them with: display_image_list uhpwg.out_images So I run the suggested command: % display_image_list uhpwg.out_imagesIn this example, I viewed 84 images in just a few minutes.