mirror of
https://github.com/FliegendeWurst/ripgrep-all.git
synced 2024-11-09 14:30:37 +00:00
rename crate
This commit is contained in:
parent
69b566d8e4
commit
8353c68f79
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -903,7 +903,7 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rga"
|
||||
name = "ripgrep_all"
|
||||
version = "0.5.1"
|
||||
dependencies = [
|
||||
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
[package]
|
||||
name = "rga"
|
||||
name = "ripgrep_all"
|
||||
description = "ripgrep but search in PDFs, E-Books, Office documents, etc, and also in archives"
|
||||
license = "AGPL-3.0-or-later"
|
||||
version = "0.5.1"
|
||||
@ -39,5 +39,5 @@ encoding_rs = "0.8.17"
|
||||
encoding_rs_io = "0.1.6"
|
||||
rusqlite = { version = "0.18.0", features=["vtab"] } # "bundled"
|
||||
size_format = "1.0.2"
|
||||
structopt = "0.2.17"
|
||||
structopt = "0.2.16"
|
||||
paste = "0.1.5"
|
||||
|
13
README.md
13
README.md
@ -1,16 +1,17 @@
|
||||
similar:
|
||||
|
||||
- pdfgrep
|
||||
- https://gist.github.com/ColonolBuendia/314826e37ec35c616d70506c38dc65aa
|
||||
- pdfgrep
|
||||
- https://gist.github.com/ColonolBuendia/314826e37ec35c616d70506c38dc65aa
|
||||
|
||||
# todo
|
||||
|
||||
- jpg adapter (based on object classification / detection (yolo?)) for fun
|
||||
- jpg adapter (based on object classification / detection (yolo?)) for fun
|
||||
- 7z adapter (couldn't find a nice to use rust library)
|
||||
|
||||
# considerations
|
||||
|
||||
- matching on mime (magic bytes) instead of filename
|
||||
- allow per-adapter configuration options
|
||||
- matching on mime (magic bytes) instead of filename
|
||||
- allow per-adapter configuration options
|
||||
|
||||
# Development
|
||||
|
||||
@ -20,3 +21,5 @@ To enable debug logging:
|
||||
export RUST_LOG=rga=debug
|
||||
export RUST_BACKTRACE=1
|
||||
```
|
||||
|
||||
Also rember to disable caching with `--rga-no-cache` or clear the cache in `~/.cache/rga` to debug the adapters.
|
||||
|
BIN
exampledir/test.tar.bz2
Normal file
BIN
exampledir/test.tar.bz2
Normal file
Binary file not shown.
Binary file not shown.
@ -68,14 +68,14 @@ impl FileAdapter for TarAdapter {
|
||||
let mut archive = ::tar::Archive::new(decompress);
|
||||
for entry in archive.entries()? {
|
||||
let mut file = entry.unwrap();
|
||||
let path = PathBuf::from(file.path()?.to_owned());
|
||||
eprintln!(
|
||||
"{}|{}: {} bytes",
|
||||
filepath_hint.display(),
|
||||
path.display(),
|
||||
file.header().size()?,
|
||||
);
|
||||
if Regular == file.header().entry_type() {
|
||||
let path = PathBuf::from(file.path()?.to_owned());
|
||||
eprintln!(
|
||||
"{}|{}: {} bytes",
|
||||
filepath_hint.display(),
|
||||
path.display(),
|
||||
file.header().size()?,
|
||||
);
|
||||
let line_prefix = &format!("{}{}: ", line_prefix, path.display());
|
||||
let ai2: AdaptInfo = AdaptInfo {
|
||||
filepath_hint: &path,
|
||||
|
@ -1,7 +1,7 @@
|
||||
use failure::{format_err, Fallible};
|
||||
|
||||
use rga::adapters::*;
|
||||
use rga::preproc::*;
|
||||
use ripgrep_all as rga;
|
||||
|
||||
use std::fs::File;
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
use failure::Fallible;
|
||||
|
||||
use rga::adapters::spawning::map_exe_error;
|
||||
use rga::adapters::*;
|
||||
use rga::args::*;
|
||||
use ripgrep_all as rga;
|
||||
|
||||
use std::process::Command;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user