#!/usr/bin/perl -w # # $Revision: 1.5 $ $Date: 2009/09/24 17:05:08 $ # $UUID: 49d0e0ed-9d3d-3f60-bc4a-96dfa181c901 $ # #connect("dbi:SQLite:$dst") or die "connect"; my $sth = $dbh->prepare("$dump"); $sth->execute(); # Read each time and URL. Get today's entries. my @row; while (@row = $sth->fetchrow_array) { # Time is 8-byte floating point, and it includes microseconds, # so zap them by simple division. I'm not sure that's strictly # correct, but answers match a regular dump from "places.sqlite". $d = int($row[0] / 1000000); $date = strftime("%Y-%m-%d %T", localtime($d)); print substr($date, 11), " $row[1]\n" if $today eq substr($date, 0, 10); } unlink($dst) or die "can't remove $dst\n"; exit(0);