Link html files

Discussion in 'HTML' started by Michael Laplante, Jul 27, 2006.

  1. 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
    Michael Laplante, Jul 27, 2006
    #1
    1. Advertising

  2. 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
    Beauregard T. Shagnasty, Jul 27, 2006
    #2
    1. Advertising

  3. "Beauregard T. Shagnasty" <> wrote in message
    news:Z9byg.486321$...
    > 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
    Michael Laplante, Jul 28, 2006
    #3
  4. Michael Laplante

    Andy Dingley Guest

    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.
    Andy Dingley, Jul 28, 2006
    #4
  5. Michael Laplante

    Frank Bohan Guest

    "Michael Laplante" <> 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.
    Frank Bohan, Jul 28, 2006
    #5
  6. "Frank Bohan" <> wrote in message
    news:44ca7f52$...

    >> (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
    Michael Laplante, Jul 28, 2006
    #6
  7. Michael Laplante

    feed_sheep Guest

    "Michael Laplante" <> 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
    feed_sheep, Jul 29, 2006
    #7
  8. Michael Laplante

    Craig Guest

    Craig, Jul 29, 2006
    #8
  9. Michael Laplante

    Susan Bugher Guest

    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_search?q= group:alt.comp.freeware
    Pricelessware & ACF: http://www.pricelesswarehome.org
    Pricelessware: http://www.pricelessware.org (not maintained)
    Susan Bugher, Jul 30, 2006
    #9
  10. "Susan Bugher" <> wrote in message
    news:...
    > 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
    Michael Laplante, Jul 30, 2006
    #10
  11. Michael Laplante

    Susan Bugher Guest

    Michael Laplante wrote:
    > "Susan Bugher" <> wrote in message
    > news:...


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


    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)
    Susan Bugher, Jul 30, 2006
    #11
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kevin Spencer

    Re: Link Link Link DANGER WILL ROBINSON!!!

    Kevin Spencer, May 17, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    793
    Kevin Spencer
    May 17, 2005
  2. Graham Thomson
    Replies:
    3
    Views:
    442
    Eki Y. Baskoro
    Dec 18, 2003
  3. Dan M
    Replies:
    5
    Views:
    411
  4. kolesdz
    Replies:
    9
    Views:
    519
    Blinky the Shark
    Aug 22, 2007
  5. Aykut Canturk
    Replies:
    2
    Views:
    480
    Munna
    Jun 4, 2008
Loading...

Share This Page