diff options
author | Florian Pritz <bluewind@xinu.at> | 2020-04-01 09:31:45 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2020-04-01 09:31:45 +0200 |
commit | 2ec51a5552cff73c1c5d2ae8caaeeaf543730013 (patch) | |
tree | 81bab30e14028e08b965ab34937730f58056fbf1 /dump-ff-history | |
parent | 779f9ac1d252a704bff612176e5e4ddaff32a940 (diff) | |
download | bin-2ec51a5552cff73c1c5d2ae8caaeeaf543730013.tar.gz bin-2ec51a5552cff73c1c5d2ae8caaeeaf543730013.tar.xz |
Add dump-ff-history
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'dump-ff-history')
-rwxr-xr-x | dump-ff-history | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/dump-ff-history b/dump-ff-history new file mode 100755 index 0000000..5f16837 --- /dev/null +++ b/dump-ff-history @@ -0,0 +1,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') 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" |