Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Link html files

Reply
Thread Tools

Link html files

 
 
Michael Laplante
Guest
Posts: n/a
 
      07-27-2006
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


 
Reply With Quote
 
 
 
 
Beauregard T. Shagnasty
Guest
Posts: n/a
 
      07-27-2006
In alt.html, Michael Laplante wrote:

> [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.

--
-bts
-Warning: I brake for lawn deer
 
Reply With Quote
 
 
 
 
Michael Laplante
Guest
Posts: n/a
 
      07-28-2006
"Beauregard T. Shagnasty" <(E-Mail Removed)> wrote in message
news:Z9byg.486321$(E-Mail Removed)...
> In alt.html, Michael Laplante wrote:
> 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.


Should have mentioned that this archive will exist only on my hard drive and
CDs / DVDs.

Your idea is sound though. I have looked at using OpenOffice and / or Word /
Excel's mail merge function as a means of doing it.
Essentially, a table where each record (row) represents a page with all the
code. One column would contain the links and this is the column I would
adjust as needs dictate.

Using Word's mail merge to new document feature, I could do this. I may have
to revert to this eventually but I was hoping for sumpin' easier.

M


 
Reply With Quote
 
Andy Dingley
Guest
Posts: n/a
 
      07-28-2006

Michael Laplante wrote:

> 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.

 
Reply With Quote
 
Frank Bohan
Guest
Posts: n/a
 
      07-28-2006

"Michael Laplante" <(E-Mail Removed)> wrote in message
news:Efayg.169873$S61.21718@edtnps90...
>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.


 
Reply With Quote
 
Michael Laplante
Guest
Posts: n/a
 
      07-28-2006
"Frank Bohan" <(E-Mail Removed)> wrote in message
news:44ca7f52$(E-Mail Removed)...

>> (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.)


> 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


 
Reply With Quote
 
feed_sheep
Guest
Posts: n/a
 
      07-29-2006
"Michael Laplante" <(E-Mail Removed)> wrote in message
news:iywyg.170543$S61.127655@edtnps90...

> 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


 
Reply With Quote
 
Craig
Guest
Posts: n/a
 
      07-29-2006
Michael;

Have you looked at coppermine? It's php-based and may do what you want.
http://coppermine-gallery.net/index.php

hth,
-Craig
 
Reply With Quote
 
Susan Bugher
Guest
Posts: n/a
 
      07-30-2006
Michael Laplante wrote:

> 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....comp.freeware
Pricelessware & ACF: http://www.pricelesswarehome.org
Pricelessware: http://www.pricelessware.org (not maintained)



 
Reply With Quote
 
Michael Laplante
Guest
Posts: n/a
 
      07-30-2006
"Susan Bugher" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
firefox html, my downloaded html and firebug html different? Adam Akhtar Ruby 9 08-16-2008 07:55 PM
Howto Listen html link clicks and change them in STATIC HTML pages..... Aykut Canturk ASP .Net 2 06-04-2008 11:31 AM
somebody know why every time what published it changes the namedlls and aspx files has link to its files. Alejandro Pombo ASP .Net 0 01-25-2006 01:54 PM
RE: Link Link Link =?Utf-8?B?REw=?= Windows 64bit 0 05-17-2005 12:15 PM
Re: Link Link Link DANGER WILL ROBINSON!!! Kevin Spencer ASP .Net 0 05-17-2005 10:41 AM



Advertisments