mirror of
https://github.com/FliegendeWurst/ripgrep-all.git
synced 2024-11-24 12:24:56 +00:00
add adapters list to readme
This commit is contained in:
parent
05835c1c42
commit
f6d44bd1da
58
README.md
58
README.md
@ -28,6 +28,64 @@ demo/
|
|||||||
|
|
||||||
![rga output](doc/demodir.png)
|
![rga output](doc/demodir.png)
|
||||||
|
|
||||||
|
## Available Adapters
|
||||||
|
|
||||||
|
```
|
||||||
|
rga --rga-list-adapters
|
||||||
|
```
|
||||||
|
|
||||||
|
Adapters:
|
||||||
|
|
||||||
|
- ffmpeg
|
||||||
|
|
||||||
|
Uses ffmpeg to extract video metadata/chapters and subtitles
|
||||||
|
|
||||||
|
Extensions: .mkv, .mp4, .avi
|
||||||
|
|
||||||
|
- pandoc
|
||||||
|
|
||||||
|
Uses pandoc to convert binary/unreadable text documents to plain markdown-like text
|
||||||
|
|
||||||
|
Extensions: .epub, .odt, .docx, .fb2, .ipynb
|
||||||
|
|
||||||
|
- poppler
|
||||||
|
|
||||||
|
Uses pdftotext (from poppler-utils) to extract plain text from PDF files
|
||||||
|
|
||||||
|
Extensions: .pdf
|
||||||
|
|
||||||
|
- zip
|
||||||
|
|
||||||
|
Reads a zip file as a stream and recurses down into its contents
|
||||||
|
|
||||||
|
Extensions: .zip
|
||||||
|
|
||||||
|
- tar
|
||||||
|
|
||||||
|
Reads a tar file as a stream and recurses down into its contents
|
||||||
|
|
||||||
|
Extensions: .tar, .tar.gz, .tar.bz2, .tar.xz, .tar.zst
|
||||||
|
|
||||||
|
- sqlite
|
||||||
|
|
||||||
|
Uses sqlite bindings to convert sqlite databases into a simple plain text format
|
||||||
|
|
||||||
|
Extensions: .db, .db3, .sqlite, .sqlite3
|
||||||
|
|
||||||
|
Mime Types: application/x-sqlite3
|
||||||
|
|
||||||
|
The following adapters are disabled by default, and can be enabled using `--rga-adapters=+pdfpages,tesseract`:
|
||||||
|
|
||||||
|
- pdfpages
|
||||||
|
Converts a pdf to it's individual pages as png files. Only useful in combination with tesseract
|
||||||
|
|
||||||
|
Extensions: .pdf
|
||||||
|
|
||||||
|
- tesseract
|
||||||
|
Uses tesseract to run OCR on images to make them searchable. May need -j1 to prevent overloading the system. Make sure you have tesseract installed.
|
||||||
|
|
||||||
|
Extensions: .jpg, .png
|
||||||
|
|
||||||
## USAGE:
|
## USAGE:
|
||||||
|
|
||||||
> rga \[FLAGS\] \[OPTIONS\] PATTERN \[PATH ...\]
|
> rga \[FLAGS\] \[OPTIONS\] PATTERN \[PATH ...\]
|
||||||
|
@ -27,9 +27,28 @@ fn main() -> Fallible<()> {
|
|||||||
})
|
})
|
||||||
.collect::<Vec<_>>()
|
.collect::<Vec<_>>()
|
||||||
.join(", ");
|
.join(", ");
|
||||||
|
let slow_matchers = meta
|
||||||
|
.slow_matchers
|
||||||
|
.as_ref()
|
||||||
|
.unwrap_or(&vec![])
|
||||||
|
.iter()
|
||||||
|
.filter_map(|m| match m {
|
||||||
|
SlowMatcher::MimeType(x) => Some(format!("{}", x)),
|
||||||
|
SlowMatcher::Fast(_) => None,
|
||||||
|
})
|
||||||
|
.collect::<Vec<_>>()
|
||||||
|
.join(", ");
|
||||||
|
let mime_text = if slow_matchers.is_empty() {
|
||||||
|
"".to_owned()
|
||||||
|
} else {
|
||||||
|
format!("Mime Types: {}", slow_matchers)
|
||||||
|
};
|
||||||
print!(
|
print!(
|
||||||
" - {}\n {}\n Extensions: {}\n",
|
" - {name}\n {desc}\n Extensions: {matchers}\n {mime}\n",
|
||||||
meta.name, meta.description, matchers
|
name = meta.name,
|
||||||
|
desc = meta.description,
|
||||||
|
matchers = matchers,
|
||||||
|
mime = mime_text
|
||||||
);
|
);
|
||||||
println!("");
|
println!("");
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user