Bogrep – Grep your bookmarks
Bogrep downloads and caches your bookmarks in plaintext without images or videos. Use the Bogrep CLI to grep through your cached bookmarks in full-text search.
- Install Bogrep
- Usage
- Getting help
- Import bookmarks
- Filter bookmark folders
- Ignore URLs
- Fetch underlying urls
- Diff websites
- Manage internal bookmarks
- Request throttling
- Supported operating systems
- Testing
Install Bogrep
Install Bogrep from crates.io
# Build and install bogrep binary to ~/.cargo/bin
To update bogrep to a new version, run cargo install bogrep
again. Versions
0.x will not be backwards compatible and breaking changes are expected. Remove
Bogrep's configuration directory (see Supported operating
systems) if you experience an issue when running
Bogrep.
Install Bogrep from github.com
# Build and install bogrep binary to ~/.cargo/bin
Usage
Settings and cache are installed to the configuration path, after Bogrep has been run for the first time. The configuration path depends on your operating system (see Supported operating systems).
# Import bookmarks from selected sources
# Fetch and cache bookmarks
# Search your bookmarks in full-text search
To simulate the import of bookmarks, use bogrep import --dry-run
.
Search
Getting help
# Check version
# Print help
# Print help for subcommands
Import bookmarks
Import of bookmarks is supported from the following browsers:
- Firefox (in
.json
and.jsonlz4
format) - Chromium (in
.json
format) - Chrome (in
.json
format) - Edge (in
.json
format) - Safari (in
.plist
format)
If bookmark files are not detected by bogrep import
, you can configure them
manually using:
Filter bookmark folders
Filter which bookmark folders are imported. Multiple folders are separated by comma:
Ignore urls
Ignore specific urls. The content for these urls will not be fetched and cached.
It can be useful to ignore urls for video or music platforms which usually don't include relevant text to grep.
# Ignore one or more urls
Fetch underlying urls
Fetch the underlying urls of supported websites:
For example, if a specific url like
https://news.ycombinator.com/item?id=00000000
is bookmarked, the underlying
article will be fetched and cached.
Supported domains are:
- news.ycombinator.com
- reddit.com
Diff websites
Fetch difference between cached and fetched website for multiple urls, and display changes:
Manage internal bookmarks
If you need to add specific URLs to the search index, use the bogrep add
subcommand.
# Add URLs to search index
# Remove URLs from search index
# Add URLs to search index and fetch content from URLs
Request throttling
Fetching of bookmarks from the same host is conservatively throttled, but can
also be configured in the settings.json
usually
placed at ~/.config/bogrep
in your home directory:
where request_throttling
is the waiting time between requests for the same
host in milliseconds.
Too speed up fetching, set max_concurrent_requests
to e.g. 1000. The maximum
number of available sockets depends on your operating system. Run ulimit -n
to
show the maximum number of open sockets allowed on your system.
For the available settings see https://docs.rs/bogrep/latest/bogrep/struct.Settings.html.
Supported operating systems
Bogrep assumes and creates a configuration path at
$HOME/.config/bogrep
for Linux,$HOME/Library/Application Support/bogrep
for macOS,C:\Users\<Username>\AppData\Roaming/bogrep
for Windows,
in your home directory for storing the settings.json
, bookmarks.json
, and
cache
folder.
You can configure the configuration path via the environment variable
BOGREP_HOME
.
Testing
# Run unit tests and integration tests
# Run unit tests
# Run integration tests