rename crate

This commit is contained in:
phiresky 2019-06-11 20:35:20 +02:00
parent 69b566d8e4
commit 8353c68f79
8 changed files with 20 additions and 17 deletions

2
Cargo.lock generated
View File

@ -903,7 +903,7 @@ dependencies = [
] ]
[[package]] [[package]]
name = "rga" name = "ripgrep_all"
version = "0.5.1" version = "0.5.1"
dependencies = [ dependencies = [
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",

View File

@ -1,6 +1,6 @@
[package] [package]
name = "rga" name = "ripgrep_all"
description = "ripgrep but search in PDFs, E-Books, Office documents, etc, and also in archives" description = "ripgrep but search in PDFs, E-Books, Office documents, etc, and also in archives"
license = "AGPL-3.0-or-later" license = "AGPL-3.0-or-later"
version = "0.5.1" version = "0.5.1"
@ -39,5 +39,5 @@ encoding_rs = "0.8.17"
encoding_rs_io = "0.1.6" encoding_rs_io = "0.1.6"
rusqlite = { version = "0.18.0", features=["vtab"] } # "bundled" rusqlite = { version = "0.18.0", features=["vtab"] } # "bundled"
size_format = "1.0.2" size_format = "1.0.2"
structopt = "0.2.17" structopt = "0.2.16"
paste = "0.1.5" paste = "0.1.5"

View File

@ -1,16 +1,17 @@
similar: similar:
- pdfgrep - pdfgrep
- https://gist.github.com/ColonolBuendia/314826e37ec35c616d70506c38dc65aa - https://gist.github.com/ColonolBuendia/314826e37ec35c616d70506c38dc65aa
# todo # 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 # considerations
- matching on mime (magic bytes) instead of filename - matching on mime (magic bytes) instead of filename
- allow per-adapter configuration options - allow per-adapter configuration options
# Development # Development
@ -20,3 +21,5 @@ To enable debug logging:
export RUST_LOG=rga=debug export RUST_LOG=rga=debug
export RUST_BACKTRACE=1 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

Binary file not shown.

Binary file not shown.

View File

@ -68,14 +68,14 @@ impl FileAdapter for TarAdapter {
let mut archive = ::tar::Archive::new(decompress); let mut archive = ::tar::Archive::new(decompress);
for entry in archive.entries()? { for entry in archive.entries()? {
let mut file = entry.unwrap(); 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() { 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 line_prefix = &format!("{}{}: ", line_prefix, path.display());
let ai2: AdaptInfo = AdaptInfo { let ai2: AdaptInfo = AdaptInfo {
filepath_hint: &path, filepath_hint: &path,

View File

@ -1,7 +1,7 @@
use failure::{format_err, Fallible}; use failure::{format_err, Fallible};
use rga::adapters::*; use rga::adapters::*;
use rga::preproc::*; use rga::preproc::*;
use ripgrep_all as rga;
use std::fs::File; use std::fs::File;

View File

@ -1,8 +1,8 @@
use failure::Fallible; use failure::Fallible;
use rga::adapters::spawning::map_exe_error; use rga::adapters::spawning::map_exe_error;
use rga::adapters::*; use rga::adapters::*;
use rga::args::*; use rga::args::*;
use ripgrep_all as rga;
use std::process::Command; use std::process::Command;