{"id":13596028,"url":"https://github.com/quambene/bogrep","last_synced_at":"2025-04-10T01:13:34.409Z","repository":{"id":184312133,"uuid":"669831017","full_name":"quambene/bogrep","owner":"quambene","description":"Grep your bookmarks","archived":false,"fork":false,"pushed_at":"2024-12-23T13:07:59.000Z","size":536,"stargazers_count":104,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-10T01:13:28.724Z","etag":null,"topics":["bookmarks","cli","full-text-search","grep"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/quambene.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-07-23T15:12:35.000Z","updated_at":"2025-03-06T15:01:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"51b4d775-2be1-44f3-bef7-743b9c3cb552","html_url":"https://github.com/quambene/bogrep","commit_stats":null,"previous_names":["quambene/bogrep"],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quambene%2Fbogrep","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quambene%2Fbogrep/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quambene%2Fbogrep/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quambene%2Fbogrep/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/quambene","download_url":"https://codeload.github.com/quambene/bogrep/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248137891,"owners_count":21053775,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bookmarks","cli","full-text-search","grep"],"created_at":"2024-08-01T16:02:05.001Z","updated_at":"2025-04-10T01:13:34.391Z","avatar_url":"https://github.com/quambene.png","language":"Rust","funding_links":[],"categories":["cli","Rust"],"sub_categories":[],"readme":"# Bogrep – Grep your bookmarks\n\n[![Latest Version](https://img.shields.io/crates/v/bogrep.svg)](https://crates.io/crates/bogrep)\n[![Build Status](https://github.com/quambene/bogrep/actions/workflows/rust-ci.yml/badge.svg)](https://github.com/quambene/bogrep/actions/workflows/rust-ci.yml)\n[![codecov](https://codecov.io/gh/quambene/bogrep/graph/badge.svg)](https://codecov.io/gh/quambene/bogrep)\n[![dependency status](https://deps.rs/repo/github/quambene/bogrep/status.svg)](https://deps.rs/repo/github/quambene/bogrep)\n\nBogrep downloads and caches your bookmarks in plaintext without images or\nvideos. Use the Bogrep CLI to grep through your cached bookmarks in full-text\nsearch.\n\n``` bash\nbogrep -i \"reed-solomon code\"\n```\n\n![Bogrep mockup](/assets/mockup.png)\n\n- [Install Bogrep](#install-bogrep)\n  - [Install Bogrep from crates.io](#install-bogrep-from-cratesio)\n  - [Install Bogrep from github.com](#install-bogrep-from-githubcom)\n- [Usage](#usage)\n  - [Search](#search)\n- [Getting help](#getting-help)\n- [Import bookmarks](#import-bookmarks)\n- [Filter bookmark folders](#filter-bookmark-folders)\n- [Ignore URLs](#ignore-urls)\n- [Fetch underlying urls](#fetch-underlying-urls)\n- [Diff websites](#diff-websites)\n- [Manage internal bookmarks](#manage-internal-bookmarks)\n- [Request throttling](#request-throttling)\n- [Supported operating systems](#supported-operating-systems)\n- [Troubleshooting](#troubleshooting)\n- [Testing](#testing)\n\n## Install Bogrep\n\n### Install Bogrep from [crates.io](https://crates.io/crates/bogrep)\n\n``` bash\n# Build and install bogrep binary to ~/.cargo/bin\ncargo install bogrep\n```\n\nTo update bogrep to a new version, run `cargo install bogrep` again. Versions\n0.x will not be backwards compatible and breaking changes are expected. Remove\nBogrep's configuration directory (see [Supported operating\nsystems](#supported-operating-systems)) if you experience an issue when running\nBogrep.\n\n### Install Bogrep from [github.com](https://github.com/quambene/bogrep)\n\n``` bash\ngit clone git@github.com:quambene/bogrep.git\ncd bogrep\n\n# Build and install bogrep binary to ~/.cargo/bin\ncargo install --path .\n```\n\n## Usage\n\nSettings and cache are installed to the configuration path, after Bogrep has\nbeen run for the first time. The configuration path depends on your operating\nsystem (see [Supported operating systems](#supported-operating-systems)).\n\n``` bash\n# Initialize bookmark sources\nbogrep init\n\n# Import bookmarks from selected sources\nbogrep import\n\n# Fetch and cache bookmarks\nbogrep fetch\n\n# Search your bookmarks in full-text search\nbogrep \u003cpattern\u003e\n```\n\nTo simulate the import of bookmarks, use `bogrep import --dry-run`.\n\n### Search\n\n``` bash\nbogrep [OPTIONS] [PATTERN]\n```\n\n``` properties\nOptions:\n  -v, --verbose...          \n  -m, --mode \u003cMODE\u003e         Search the cached bookmarks in HTML or plaintext format [possible values: html, text]\n  -i, --ignore-case         Ignore case distinctions in patterns\n  -l, --files-with-matches  Print only URLs of bookmarks with matched lines\n  -h, --help                Print help\n  -V, --version             Print version\n```\n\n## Getting help\n\n``` bash\n# Check version\nbogrep --version\n\n# Print help\nbogrep --help\n\n# Print help for subcommands\nbogrep config --help\nbogrep import --help\nbogrep fetch --help\n```\n\n## Import bookmarks\n\nImport of bookmarks is supported from the following browsers:\n\n- Firefox (in `.json` and `.jsonlz4` format)\n- Chromium (in `.json` format)\n- Chrome (in `.json` format)\n- Edge (in `.json` format)\n- Safari (in `.plist` format)\n\nIf bookmark files are not detected by `bogrep import`, you can configure them\nmanually using:\n\n``` bash\nbogrep config --source ~/path/to/bookmarks/file\n```\n\n## Filter bookmark folders\n\nFilter which bookmark folders are imported. Multiple folders are separated by whitespaces:\n\n``` bash\nbogrep config --source \"my/path/to/bookmarks_file.json\" --folders dev science articles\n```\n\n## Ignore urls\n\nIgnore specific urls. The content for these urls will not be fetched and cached.\n\nIt can be useful to ignore urls for video or music platforms which\nusually don't include relevant text to grep.\n\n``` bash\n# Ignore one or more urls\nbogrep config --ignore \u003curl1\u003e \u003curl2\u003e ...\n```\n\n## Fetch underlying urls\n\nFetch the underlying urls of supported websites:\n\n``` bash\nbogrep config --underlying \u003curl1\u003e \u003curl2\u003e ...\n```\n\nFor example, if a specific url like\n`https://news.ycombinator.com/item?id=00000000` is bookmarked, the underlying\narticle will be fetched and cached.\n\nSupported domains are:\n\n- news.ycombinator.com\n- reddit.com\n\n## Diff websites\n\nFetch difference between cached and fetched website for multiple urls, and display changes:\n\n``` bash\nbogrep fetch --diff \u003curl1\u003e \u003curl2\u003e ...\n```\n\n## Manage internal bookmarks\n\nIf you need to add specific URLs to the search index, use the `bogrep add` subcommand.\n\n``` bash\n# Add URLs to search index\nbogrep add \u003curl1\u003e \u003curl2\u003e ...\n\n# Remove URLs from search index\nbogrep remove \u003curl1\u003e \u003curl2\u003e ...\n\n# Add URLs to search index and fetch content from URLs\nbogrep fetch \u003curl1\u003e \u003curl2\u003e ...\n```\n\n## Request throttling\n\nFetching of bookmarks from the same host is conservatively throttled, but can\nalso be configured in the `settings.json` usually\nplaced at `~/.config/bogrep` in your home directory:\n\n``` json\n{\n    \"cache_mode\": \"text\",\n    \"max_concurrent_requests\": 100,\n    \"request_timeout\": 60000,\n    \"request_throttling\": 3000,\n    \"max_idle_connections_per_host\": 10,\n    \"idle_connections_timeout\": 5000\n}\n```\n\nwhere `request_throttling` is the waiting time between requests for the same\nhost in milliseconds.\n\nToo speed up fetching, set `max_concurrent_requests` to e.g. 1000. The maximum\nnumber of available sockets depends on your operating system. Run `ulimit -n` to\nshow the maximum number of open sockets allowed on your system.\n\nFor the available settings see \u003chttps://docs.rs/bogrep/latest/bogrep/struct.Settings.html\u003e.\n\n## Supported operating systems\n\nBogrep assumes and creates a configuration path at\n\n- `$HOME/.config/bogrep` for Linux,\n- `$HOME/Library/Application Support/bogrep` for macOS,\n- `C:\\Users\\\u003cUsername\u003e\\AppData\\Roaming/bogrep` for Windows,\n\nin your home directory for storing the `settings.json`, `bookmarks.json`, and\n`cache` folder.\n\nYou can configure the configuration path via the environment variable\n`BOGREP_HOME`.\n\n## Troubleshooting\n\n### Missing file permissions on macOS\n\nIf file permissions are missing for Bogrep, allow CLI applications to access the\nfilesystem in the System Preferences.\n\n### Missing search results\n\nThe default bogrep search is case-sensitive. Try `bogrep -i` for\ncase-insensitive search.\n\n## Testing\n\n``` bash\n# Run unit tests and integration tests\ncargo test\n\n# Run unit tests\ncargo test --lib\n\n# Run integration tests\ncargo test --test '*'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquambene%2Fbogrep","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquambene%2Fbogrep","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquambene%2Fbogrep/lists"}