Browsers usually keep their history in a sqlite database, and it’s trivial to extract it. This package allows you to search through your browser history by URL and the Page Title.
browser-hist-db-paths
is an association list with paths to browser DBs. It needs to be set! The package currently doesn’t have a way for discovering these paths, so this step has to be done manually.example:
(setq browser-hist-db-paths '((chrome . "$HOME/Library/Application Support/Google/Chrome/Default/History") (brave . "$HOME/Library/Application Support/BraveSoftware/Brave-Browser/Default/History") (firefox . "$HOME/Library/Application Support/Firefox/Profiles/rmgcr4hw.default-release/places.sqlite")))
You may ignore the browsers you don’t use; right now the package works only with a single browser. Retrieving data for multiple browsers will be added at some point.
browser-hist-default-browser
- set this var, the package doesn’t know yet how to resolve the default browser automaticallyexample:
(setq browser-hist-default-browser 'chrome)
There’s only one command browser-hist-search
, try it and see if it works.
I just created it, and it has many rough edges. It’s been tested only on a Mac with Chrome, Brave and Firefox.
- It’s convenient and a bit faster to bind the command to a key.
- And then, using an Embark Action you can open the link in EWW, in XWidget, or any other browser (not necessarily the history origin one).
- You can also narrow the search and export the results into a separate buffer using Embark Collect.
- It opens some other possibilities like sending a link to a browser but forcing it to find the tab (if there’s an open one already, e.g., why open another GMail tab?) I’ll share an example of how this could be done using Applescript. Or maybe open the link in a private tab of a chosen browser.
- I’m also hoping at some point to collect data from multiple browsers.
see: agzam#7