mirror of
https://github.com/FliegendeWurst/ripgrep-all.git
synced 2024-11-14 00:03:04 +00:00
update adapters section in readme automatically
This commit is contained in:
parent
32021c3567
commit
46896f13ac
41
README.md
41
README.md
@ -81,73 +81,53 @@ rga should compile with stable Rust (v1.36.0+, check with `rustc --version`). To
|
|||||||
rga --rga-list-adapters
|
rga --rga-list-adapters
|
||||||
```
|
```
|
||||||
|
|
||||||
Adapters:
|
<!-- this part generated by update-readme.sh -->
|
||||||
|
|
||||||
Adapters:
|
Adapters:
|
||||||
|
|
||||||
- **ffmpeg**
|
- **ffmpeg**
|
||||||
|
|
||||||
Uses ffmpeg to extract video metadata/chapters and subtitles
|
Uses ffmpeg to extract video metadata/chapters and subtitles
|
||||||
|
|
||||||
Extensions: .mkv, .mp4, .avi
|
Extensions: .mkv, .mp4, .avi
|
||||||
|
|
||||||
* **pandoc**
|
* **pandoc**
|
||||||
|
|
||||||
Uses pandoc to convert binary/unreadable text documents to plain markdown-like text
|
Uses pandoc to convert binary/unreadable text documents to plain markdown-like text
|
||||||
|
|
||||||
Extensions: .epub, .odt, .docx, .fb2, .ipynb
|
Extensions: .epub, .odt, .docx, .fb2, .ipynb
|
||||||
|
|
||||||
- **poppler**
|
- **poppler**
|
||||||
|
|
||||||
Uses pdftotext (from poppler-utils) to extract plain text from PDF files
|
Uses pdftotext (from poppler-utils) to extract plain text from PDF files
|
||||||
|
|
||||||
Extensions: .pdf
|
Extensions: .pdf
|
||||||
|
Mime Types: application/pdf
|
||||||
|
|
||||||
* **zip**
|
- **zip**
|
||||||
|
|
||||||
Reads a zip file as a stream and recurses down into its contents
|
Reads a zip file as a stream and recurses down into its contents
|
||||||
|
|
||||||
Extensions: .zip
|
Extensions: .zip
|
||||||
|
|
||||||
Mime Types: application/zip
|
Mime Types: application/zip
|
||||||
|
|
||||||
* **decompress**
|
- **decompress**
|
||||||
|
|
||||||
Reads compressed file as a stream and runs a different extractor on the contents.
|
Reads compressed file as a stream and runs a different extractor on the contents.
|
||||||
|
|
||||||
Extensions: .tgz, .tbz, .tbz2, .gz, .bz2, .xz, .zst
|
Extensions: .tgz, .tbz, .tbz2, .gz, .bz2, .xz, .zst
|
||||||
|
|
||||||
Mime Types: application/gzip, application/x-bzip, application/x-xz, application/zstd
|
Mime Types: application/gzip, application/x-bzip, application/x-xz, application/zstd
|
||||||
|
|
||||||
* **tar**
|
- **tar**
|
||||||
|
|
||||||
Reads a tar file as a stream and recurses down into its contents
|
Reads a tar file as a stream and recurses down into its contents
|
||||||
|
|
||||||
Extensions: .tar
|
Extensions: .tar
|
||||||
|
|
||||||
- **sqlite**
|
* **sqlite**
|
||||||
|
|
||||||
Uses sqlite bindings to convert sqlite databases into a simple plain text format
|
Uses sqlite bindings to convert sqlite databases into a simple plain text format
|
||||||
|
|
||||||
Extensions: .db, .db3, .sqlite, .sqlite3
|
Extensions: .db, .db3, .sqlite, .sqlite3
|
||||||
|
|
||||||
Mime Types: application/x-sqlite3
|
Mime Types: application/x-sqlite3
|
||||||
|
|
||||||
The following adapters are disabled by default, and can be enabled using '--rga-adapters=+pdfpages,tesseract':
|
The following adapters are disabled by default, and can be enabled using '--rga-adapters=+pdfpages,tesseract':
|
||||||
|
|
||||||
- **pdfpages**
|
- **pdfpages**
|
||||||
|
Converts a pdf to its individual pages as png files. Only useful in combination with tesseract
|
||||||
Converts a pdf to it's individual pages as png files. Only useful in combination with tesseract
|
|
||||||
|
|
||||||
Extensions: .pdf
|
Extensions: .pdf
|
||||||
|
Mime Types: application/pdf
|
||||||
|
|
||||||
* **tesseract**
|
- **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.
|
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
|
Extensions: .jpg, .png
|
||||||
|
|
||||||
<!-- this part generated by update-readme.sh -->
|
|
||||||
## USAGE:
|
## USAGE:
|
||||||
|
|
||||||
> rga \[RGA OPTIONS\] \[RG OPTIONS\] PATTERN \[PATH \...\]
|
> rga \[RGA OPTIONS\] \[RG OPTIONS\] PATTERN \[PATH \...\]
|
||||||
@ -179,7 +159,7 @@ The following adapters are disabled by default, and can be enabled using '--rga-
|
|||||||
> Disable caching of results
|
> Disable caching of results
|
||||||
>
|
>
|
||||||
> By default, rga caches the extracted text, if it is small enough, to a
|
> By default, rga caches the extracted text, if it is small enough, to a
|
||||||
> database in \~/.cache/rga on Linux, *\~/Library/Caches/rga* on macOS,
|
> database in \~/.cache/rga on Linux, _\~/Library/Caches/rga_ on macOS,
|
||||||
> or C:\\Users\\username\\AppData\\Local\\rga on Windows. This way,
|
> or C:\\Users\\username\\AppData\\Local\\rga on Windows. This way,
|
||||||
> repeated searches on the same set of files will be much faster. If you
|
> repeated searches on the same set of files will be much faster. If you
|
||||||
> pass this flag, all caching will be disabled.
|
> pass this flag, all caching will be disabled.
|
||||||
@ -230,6 +210,7 @@ advanced options.
|
|||||||
|
|
||||||
All other options not shown here are passed directly to rg, especially
|
All other options not shown here are passed directly to rg, especially
|
||||||
\[PATTERN\] and \[PATH \...\]
|
\[PATTERN\] and \[PATH \...\]
|
||||||
|
|
||||||
<!-- end of part generated by update-readme.sh -->
|
<!-- end of part generated by update-readme.sh -->
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
@ -45,7 +45,7 @@ fn main() -> anyhow::Result<()> {
|
|||||||
format!("Mime Types: {}", slow_matchers)
|
format!("Mime Types: {}", slow_matchers)
|
||||||
};
|
};
|
||||||
print!(
|
print!(
|
||||||
" - {name}\n {desc}\n Extensions: {matchers}\n {mime}\n",
|
" - **{name}**\n {desc}\n Extensions: {matchers}\n {mime}\n",
|
||||||
name = meta.name,
|
name = meta.name,
|
||||||
desc = meta.description,
|
desc = meta.description,
|
||||||
matchers = matchers,
|
matchers = matchers,
|
||||||
|
@ -3,9 +3,12 @@
|
|||||||
content=$(
|
content=$(
|
||||||
cat <<END
|
cat <<END
|
||||||
<!-- this part generated by update-readme.sh -->
|
<!-- this part generated by update-readme.sh -->
|
||||||
|
$(cargo run --bin rga -- --rga-list-adapters)
|
||||||
|
|
||||||
$(help2man -N "cargo run --bin rga --" | pandoc -f man -t markdown --atx-headers | rg --multiline "## USAGE:(.|\n)*")
|
$(help2man -N "cargo run --bin rga --" | pandoc -f man -t markdown --atx-headers | rg --multiline "## USAGE:(.|\n)*")
|
||||||
<!-- end of part generated by update-readme.sh -->
|
<!-- end of part generated by update-readme.sh -->
|
||||||
END
|
END
|
||||||
)
|
)
|
||||||
|
|
||||||
rg --passthrough --multiline '.*update-readme.sh(.|\n)*update-readme.sh.*' README.md --replace "$content" | sponge README.md
|
rg --passthrough --multiline '.*update-readme.sh(.|\n)*update-readme.sh.*' README.md --replace "$content" | sponge README.md
|
||||||
|
prettier --write README.md
|
||||||
|
Loading…
Reference in New Issue
Block a user