Bogrep下載並以明文為您的書籤,而無需圖像或視頻。在全文搜索中,使用Bogrep CLI通過緩存的書籤進行抓取。
bogrep -i " reed-solomon code " 
# Build and install bogrep binary to ~/.cargo/bin
cargo install bogrep要將Bogrep更新為新版本,請再次運行cargo install bogrep 。版本0.x不會向後兼容,並且預期破壞了變化。如果您在運行Bogrep時遇到問題,請刪除Bogrep的配置目錄(請參閱支持的操作系統)。
git clone [email protected]:quambene/bogrep.git
cd bogrep
# Build and install bogrep binary to ~/.cargo/bin
cargo install --path . 在Bogrep首次運行後,將設置和緩存安裝到配置路徑上。配置路徑取決於您的操作系統(請參閱支持的操作系統)。
# Initialize bookmark sources
bogrep init
# Import bookmarks from selected sources
bogrep import
# Fetch and cache bookmarks
bogrep fetch
# Search your bookmarks in full-text search
bogrep < pattern >要模擬書籤的導入,請使用bogrep import --dry-run 。
bogrep [OPTIONS] [PATTERN]Options:
-v, --verbose...
-m, --mode <MODE> Search the cached bookmarks in HTML or plaintext format [possible values: html, text]
-i, --ignore-case Ignore case distinctions in patterns
-l, --files-with-matches Print only URLs of bookmarks with matched lines
-h, --help Print help
-V, --version Print version # Check version
bogrep --version
# Print help
bogrep --help
# Print help for subcommands
bogrep config --help
bogrep import --help
bogrep fetch --help從以下瀏覽器中支持書籤的導入:
.json和.jsonlz4格式).json格式).json格式).json格式).plist格式)如果bogrep import未檢測到書籤文件,則可以使用以下方式手動配置它們:
bogrep config --source ~ /path/to/bookmarks/file過濾哪個書籤文件夾已導入。多個文件夾被白色空間分開:
bogrep config --source " my/path/to/bookmarks_file.json " --folders dev science articles忽略特定的URL。這些URL的內容不會被獲取和緩存。
忽略通常不包含與GREP相關文本的視頻或音樂平台的URL可能很有用。
# Ignore one or more urls
bogrep config --ignore < url 1> < url 2> ...獲取支持網站的基礎網址:
bogrep config --underlying < url 1> < url 2> ...例如,如果將特定的URL(例如https://news.ycombinator.com/item?id=00000000 )添加為書籤,則基礎文章將被獲取和緩存。
受支持的域是:
用於多個URL的緩存和獲取網站之間的差異,並顯示更改:
bogrep fetch --diff < url 1> < url 2> ...如果您需要在搜索索引中添加特定的URL,請使用bogrep add子命令。
# Add URLs to search index
bogrep add < url 1> < url 2> ...
# Remove URLs from search index
bogrep remove < url 1> < url 2> ...
# Add URLs to search index and fetch content from URLs
bogrep fetch < url 1> < url 2> ...從同一主機中獲取書籤是保守的,但也可以在settings.json中配置。 JSON通常位於主目錄中的~/.config/bogrep :
{
"cache_mode" : " text " ,
"max_concurrent_requests" : 100 ,
"request_timeout" : 60000 ,
"request_throttling" : 3000 ,
"max_idle_connections_per_host" : 10 ,
"idle_connections_timeout" : 5000
} request_throttling是毫秒中同一主機的請求之間的等待時間。
太速度提取了,將max_concurrent_requests設置為例如1000。可用套接字的最大數量取決於您的操作系統。運行ulimit -n以顯示系統上允許的最大插座數。
有關可用的設置,請參見https://docs.rs/bogrep/latest/bogrep/sonstruct.settings.html。
Bogrep假設並創建了一個配置路徑
$HOME/.config/bogrep for Linux,$HOME/Library/Application Support/bogrep ,C:Users<Username>AppDataRoaming/bogrep ,在您的主目錄中cache settings.json bookmarks.json
您可以通過環境變量BOGREP_HOME配置配置路徑。
如果Bogrep缺少文件權限,請允許CLI應用程序訪問系統首選項中的文件系統。
默認的Bogrep搜索對病例敏感。嘗試bogrep -i進行病例不敏感的搜索。
# Run unit tests and integration tests
cargo test
# Run unit tests
cargo test --lib
# Run integration tests
cargo test --test ' * '