goal: export my history into a JSON blob that can be imported into a web service.
exporting bookmarks in FF is very easy, but history is a bit harder.
- find your profile
this sumo page suggests that you go to about:support
and click on the 'show in finder' button to find your profile
- extract history from the places.sqlite sqlite3 database
This blog suggests the following SQL query:
SELECT
datetime(moz_historyvisits.visit_date/1000000,’unixepoch’),
moz_places.url,
moz_places.title
FROM
moz_places,
moz_historyvisits
WHERE
moz_places.id = moz_historyvisits.place_id;
Or, as a one-liner, SELECT datetime(moz_historyvisits.visit_date/1000000,’unixepoch’), moz_places.url, moz_places.title FROM moz_places, moz_historyvisits WHERE moz_places.id = moz_historyvisits.place_id;
.
However, I'm stuck on this step, having trouble exporting the timestamp in a pretty format. To be continued.
There's also a forensics blog with a bunch of similar FF history/places database queries. Interesting stuff.