blob: 33cf7f0f6f674a61e950d79260b79d5c5bdd34a8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
#!/bin/bash
TMPDIR="$(mktemp -d "/tmp/${0##*/}.XXXXXX")"
trap "rm -rf '${TMPDIR}'" EXIT TERM
cp -n ~/.mozilla/firefox/*.default/places.sqlite* "$TMPDIR"
sqlite3 "$TMPDIR/places.sqlite" "SELECT datetime(visit_date/1000000,'unixepoch', 'localtime') AS visit_date, url, title
FROM moz_places, moz_historyvisits
WHERE moz_places.id = moz_historyvisits.place_id AND visit_date/1000000 > $(date +%s -d "${1:-2 months ago}") AND visit_date/1000000 < $(date +%s -d "${2:-now}")
ORDER BY visit_date"
|