![]() h shows a concise overview, -help shows more detail andĪll other options not shown here are passed directly to rg, especially Maximum nestedness of archives to recurse into LongerĪdapter outputs will not be cached and recomputed every time. Longest byte length (after compression) to store in cache. Use all default adapters and also bar and baz. Use all default adapters except for bar and baz. "foo,bar" means use only adapters foo and bar. If you pass this flag, allĬhange which adapters to use and in which priority order (descending) ![]() The same set of files will be much faster. Or C:\Users\username\AppData\Local\rga (on Windows). To a database in ~/Library/Caches/rga on macOS, To the `file` utility), and use that to choose the adapter.ĭetection is only done on the first 8KiB of the file, since we can'tīy default, rga caches the extracted text, if it is small enough, To detect the mime type of input files using the magic bytes (similar Sometimes use any or no extension at all. Such as sqlite3, don't care about the file extension at all, so users Use more accurate but slower matching by mime typeīy default, rga will match files using file extensions. May need -j1 to prevent overloading the system. Uses tesseract to run OCR on images to make them searchable. Only useful in combination with tesseract The following adapters are disabled by default, and can be enabled using '-rga-adapters=+pdfpages,tesseract':Ĭonverts a pdf to it's individual pages as png files. Uses sqlite bindings to convert sqlite databases into a simple plain text format Reads a tar file as a stream and recurses down into its contents Mime Types: application/gzip, application/x-bzip, application/x-xz, application/zstd Reads compressed file as a stream and runs a different extractor on the contents.Įxtensions. Reads a zip file as a stream and recurses down into its contents Uses pdftotext (from poppler-utils) to extract plain text from PDF files Uses pandoc to convert binary/unreadable text documents to plain markdown-like textĮxtensions. Uses ffmpeg to extract video metadata/chapters and subtitles ![]() To build it, run the following (or the equivalent in your OS): ~$ apt install build-essential pandoc poppler-utils ffmpeg ripgrep cargoĪvailable Adapters rga -rga-list-adapters Rga should compile with stable Rust (v1.36.0+, check with rustc -version). To install the dependencies that are each not strictly necessary but very useful:īrew install pandoc poppler tesseract ffmpeg Compile from source If you get an error like VCRUNTIME140.DLL could not be found, you need to install vc_redist.圆4.exe. Install ripgrep-all via Chocolatey: choco install ripgrep-all Rga will search for all binaries it calls in $PATH and the directory itself is in. If ripgrep is not included in your package sources, get it from here. On Debian-based distributions you can download the rga binary and get the dependencies like this:Īpt install ripgrep pandoc poppler-utils ffmpeg cargo On Arch Linux, you can simply install from AUR: yay -S ripgrep-all. Linux 圆4, macOS and Windows binaries are available in GitHub Releases. Here is an example directory with different file types: demo/ Rga will recursively descend into archives and match text in every file type it knows. rga wraps the awesome ripgrep and enables it to search in pdf, docx, sqlite, jpg, movie subtitles (mkv, mp4), etc.įor more detail, see this introductory blogpost: Rga is a line-oriented search tool that allows you to look for a regex in a multitude of file types. Rga: ripgrep, but also search in PDFs, E-Books, Office documents, zip, tar.gz, etc.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |