Skip to content

Instantly share code, notes, and snippets.

Last active December 27, 2019 15:59
What would you like to do?
chrome history fetcher
# requires sqlite3 with json1 compiled in
# `brew edit sqlite3` add '--with-json1' to install args
# `brew reinstall sqlite3 -s`
cp -f "$HOME/Library/Application Support/Google/Chrome/Default/History" "$h"
sqlite3 "$h" "SELECT json_object('url', url, 'title', title) from urls where last_visit_time/1000000-11644473600 between strftime('%s','now')-86400 and strftime('%s','now') order by last_visit_time desc;" | jq -s '.' | less
rm -f "$h"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment