Link html files

  • Thread starter Thread starter Michael Laplante
  • Start date Start date
M

Michael Laplante

I creating an html archive of photos. At this point, the photos have yet to
be sorted -- it will take months if not a couple of years to get through
them and they aren't in any order yet, some may arrive later, etc.

Assuming for a second that I create one html "wrapper" for each image, at
some later date I want to sequentially link the files AFTER they have been
created. (Makes sense I hope).

Is there a tool or a technique that will let me do this easily in one fell
swoop rather than hand code each file? Preferably the program / technique
would let me "insert" a file between two others at some later date (or redo
the whole batch again in one swoop).

(Note: This is not the same trick as those html directory programs. They
create an OUTSIDE file that lists links to each file in the directory. Not
what I want in this case.)

M
 
[archive of photos]
Is there a tool or a technique that will let me do this easily in one
fell swoop rather than hand code each file? Preferably the program /
technique would let me "insert" a file between two others at some
later date (or redo the whole batch again in one swoop).

If there are as many as your post seems to imply, I would be looking for
a server-side auto-generating process, perhaps using PHP and a database.
Add a new photo file and a database record, and bingo, a new page is
"inserted."

Careful planning needed, of course.
 
Michael said:
I creating an html archive of photos.

RSS 1.0 document that describes the list of photos and all the metadata
you want to capture. XSLT transforms afterwards to send it every which
way you could want.
 
Michael Laplante said:
I creating an html archive of photos. At this point, the photos have yet to
be sorted -- it will take months if not a couple of years to get through
them and they aren't in any order yet, some may arrive later, etc.

Assuming for a second that I create one html "wrapper" for each image, at
some later date I want to sequentially link the files AFTER they have been
created. (Makes sense I hope).

Is there a tool or a technique that will let me do this easily in one fell
swoop rather than hand code each file? Preferably the program / technique
would let me "insert" a file between two others at some later date (or
redo the whole batch again in one swoop).

(Note: This is not the same trick as those html directory programs. They
create an OUTSIDE file that lists links to each file in the directory. Not
what I want in this case.)

M

Not sure whether it's what you are looking for, but have a look at:

Easy Text To HTML Converter http://www.easyhtools.com/download.html

I've just produced an HTML document with some 2000 URL links from a Wordpad
document. It also works from text files. I can see no reason why the links
should not be to images. Incredibly quick.

===

Frank Bohan
¶ Mobius strippers never show you their back side.
 
I've just produced an HTML document with some 2000 URL links from a
Wordpad document. It also works from text files. I can see no reason why
the links should not be to images. Incredibly quick.

Don't think this is the ticket. I want multiple HTML files -- one per
image -- with a link at the bottom of each that takes me to the next one in
the series. There are web photo album programs that do this, but they assume
that all your photos are in order and ready to go. I may have to add photos
in the middle of the list at a later date which would throw all the
sequential links out of whack.

M
 
Don't think this is the ticket. I want multiple HTML files -- one per
image -- with a link at the bottom of each that takes me to the next one
in the series. There are web photo album programs that do this, but they
assume that all your photos are in order and ready to go. I may have to
add photos in the middle of the list at a later date which would throw all
the sequential links out of whack.


It seems like a lot of work and potential maintenance to create multiple
HTML files. If you have a web server with PHP installed (and pics inside
the web root), you might try this script I wrote. (Please note that I'm an
amateur at PHP; I'm sure this could be optimized and cleaned up a lot.)

Name the file gallery.php. Edit the $dir value to the proper location.

<?php
$dir = "path/to/pics/";
if ($dh = opendir($dir)) {
while (($file = readdir($dh)) !== false) {
if ($file != "." && $file != "..") {
$file_list[] = $file;
}
}
closedir($dh);
if ($_GET['pic'] != '') {
$key = array_search($_GET['pic'], $file_list);
$image = "<img src='$dir$file_list[$key]' alt='$file_list[$key]'>";
$next_key = $key + 1;
$next = "<a href='gallery.php?pic=$file_list[$next_key]'>Next</a>";
$prev_key = $key - 1;
$previous = "<a
href='gallery.php?pic=$file_list[$prev_key]'>Previous</a>";
$pic = $_GET['pic'];
} else {
$image = "<img src='$dir$file_list[0]'>";
$key++;
$next = "<a href='gallery.php?pic=$file_list[$key]'>Next</a>";
$previous = '';
$pic = $file_list[0];
}

}

echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 //EN\"
\"http://www.w3.org/TR/html4/strict.dtd\">
<html>
<head>
<title>$pic</title>
</head>
<body>
<div style='width: 90%; margin: 0 auto; text-align: center;'>
$image
<h1>$pic</h1>
<p>$previous $next</p>
</div>
</body>
</html>";
?>

David
 
Michael said:
I creating an html archive of photos. At this point, the photos have yet to
be sorted -- it will take months if not a couple of years to get through
them and they aren't in any order yet, some may arrive later, etc.

That sounds somewhat like my family photo project. I had masses of
photos - a lot of them weren't dated and the date order changed as I
pieced the "jigsaw puzzle" together.
Assuming for a second that I create one html "wrapper" for each image, at
some later date I want to sequentially link the files AFTER they have been
created. (Makes sense I hope).

Is there a tool or a technique that will let me do this easily in one fell
swoop rather than hand code each file? Preferably the program / technique
would let me "insert" a file between two others at some later date (or redo
the whole batch again in one swoop).

Warning! I'm a spreadsheet junkie. . . ;)

I have ALL the info about my family photos in a spreadsheet - including
the order of the photos - and generate all new HTML pages when needed
(about 10 photos and descriptions per page rather than just one). The
process is spreadsheet data to .csv file, import the .csv file to
Treepad and save, import the Treepad file to Keynote, export from
Keynote to individual text files, rename the file extensions from .txt
to .htm. Despite the number of steps its a fast process. FWIW - I create
dated ordered sets of all the photos AND date ordered sets for
individual family members.

If you're comfortable with spreadsheets I think that would give you
maximum flexibility and be fastest in the long run.

OTOH. . .

If you don't anticipate a lot of changes you could start with Keynote -
create each of your HTML "wrapper" files on a separate node and export
them/rename the file extension to .htm as above (the node name becomes
the name of the text file when you export). When you know the order of
the files add lines that link each HTML file to the next HTML file and
export/rename the files again. Inserting new files would be easy -> add
the new HTML file and change the link in the file that precedes it.

dunno if the above is enlightening or confusing. . . feel free to ask
questions if any of it sounds at all interesting. . .

Susan
--
Posted to alt.comp.freeware
Search alt.comp.freeware (or read it online):
http://www.google.com/advanced_group_search?q=+group:alt.comp.freeware
Pricelessware & ACF: http://www.pricelesswarehome.org
Pricelessware: http://www.pricelessware.org (not maintained)
 
Susan Bugher said:
Michael Laplante wrote:
I have ALL the info about my family photos in a spreadsheet - including
the order of the photos - and generate all new HTML pages when needed
(about 10 photos and descriptions per page rather than just one). The
process is spreadsheet data to .csv file, import the .csv file to Treepad
and save, import the Treepad file to Keynote, export from Keynote to
individual text files, rename the file extensions from .txt to .htm.
Despite the number of steps its a fast process. FWIW - I create dated
ordered sets of all the photos AND date ordered sets for individual family
members.

Whew! That's quite a process. I had experimented with a similar technique
using MS Excel combined with Word's mail merge to separate document process,
but I ran into problems with that.

I've just discovered a program call TextWedge which will split up a text
file into smaller text files. Haven't tried it yet, but that may be the
ticket for me. Will let you know. . .

M
 
Whew! That's quite a process. I had experimented with a similar technique
using MS Excel combined with Word's mail merge to separate document process,
but I ran into problems with that.

The method I use to create the HTML files sounds more complicated than
it is - several programs are used but only a few steps are required in
each - probably 10-20 steps total (copy, open, paste, save etc.).
I've just discovered a program call TextWedge which will split up a text
file into smaller text files. Haven't tried it yet, but that may be the
ticket for me. Will let you know. . .

Thanks Michael. If you find a good solution I'm all ears. :)

Susan
--
Posted to alt.comp.freeware
Search alt.comp.freeware (or read it online):
http://www.google.com/advanced_group_search?q=+group:alt.comp.freeware
Pricelessware & ACF: http://www.pricelesswarehome.org
Pricelessware: http://www.pricelessware.org (not maintained)
 
Back
Top