Last active
December 27, 2019 15:59
-
-
Save stuart-warren/b6d7cdd0d5addf841d415a91147c98e8 to your computer and use it in GitHub Desktop.
chrome history fetcher
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # requires sqlite3 with json1 compiled in | |
| # `brew edit sqlite3` add '--with-json1' to install args | |
| # `brew reinstall sqlite3 -s` | |
| h=$(mktemp) | |
| 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