[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Netscape::History



At 4:41 PM -0800 3/13/99, Chris Seidel wrote:

} Has anyone used the Netscape::History module? I downloaded History.pm and
} HistoryURL.pm and placed them in: MacPerl Ä:lib:Netscape:
}
} when I try the script below, none of the values of seconds returned make
} any sense.
} ---------------------------------------------
} use Netscape::History;
}
} my $history;
} my $url;
}
}    while (defined($url = $history->next_url() )){
}         print "$url :\n";
}         print "    First  : ", $url->first_visit_time();
}         print "    Last   : ", $url->last_visit_time();
}         print "    Count  : ", $url->visit_count(), "\n";
}         print "    Expire : ", $url->expire(), "\n";
}         print "    Title  : ", $url->title(), "\n";
}    }
}    $history->close();
} ---------------------------------------------
} Sample Output:
} http://www.pangloss.com/seidel/MTandem/ :
}     First  : 1179901494    Last   : 24570422    Count  : 1728053248
}     Expire : 16777216
}     Title  : Tandem Story
}
} i.e. I know I visited the link above *today* and none of values of seconds
} make any sense.

The problem is that Netscape counts time in Unix time.  You have to make
the proper conversion in order to get the Mac time right.

I don't have any interest in porting this, but there is a HTTP::Cookies
module that's part of libwww-perl-5 that I did port.  You can see what to
do there (search for "MacOS" and $offset).  It's very straightforward, a
simple offset which can be computed by Time::Local::timelocal(),
complicated only because the Mac zero of time is in the local time while
Unix is GMT.  Go to http://pudge.net/mmp for the location of the port.

}
} Has anyone else used this module and had luck with it? I was thinking of
} writing a script to run at start up that parses my history file and makes a
} small probability tree of links I'm likely to need/go to based on my
} history, which would then be incorporated into my browser start up page.
}
} -Chris Seidel
}
} Dept of Molecular and Cell Biology      "Information wants to be free."
} UC Berkeley  * Kane Lab 614 Barker Hall
}
}



-----
Paul J. Schinder
schinder@pobox.com

===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org