Apple iPhoto - Web Page Output

Discussion in 'Software' started by hacker 8991, 19 Mar 2005.

  1. hacker 8991

    hacker 8991 What's a Dremel?

    Joined:
    8 Jan 2004
    Posts:
    643
    Likes Received:
    1
    I am trying to create a web page using iPhoto's built in "Web Page" output (from the Share menu). It works fine like that, but when I run it through my Perl script to put in some necessary CSS and HTML, it drops certain important things, like headers and, sometimes, the entire page!

    I thought that someone here might have a clue as to what is happening here. Anyways, here is the suspect code:
    Code:
    #!usr/bin/perl
    
    $chopped = 0;
    while(<>)
    {
         if($chopped == 1)
         {
              print;
              next;
         }
    
         if(/<body/)
         {
              $chopped = 1;
         }
    }
    This code reads from whatever - in this case, another program - and then prints all the text after the string "<body", which, hopefully, all of the iPhoto pages will have. After this is done, I put my header into this, along with the "<body>" statement to make it whole again.

    Sometimes, it doesn't find the string "<body", I think. That would explain why the page doesn't have any content. But why would iPhoto randomly drop a HTML tag?

    Help is appreciated :D
     
  2. hacker 8991

    hacker 8991 What's a Dremel?

    Joined:
    8 Jan 2004
    Posts:
    643
    Likes Received:
    1
    Problem fixed.

    The issue was stemming from another file in the series, and I was reading and writing from the same thing at the same time... :/
     
Tags:

Share This Page