Live data from Hacker News

Rga: Ripgrep, but also search in PDFs, E-Books, Office documents, zip, tar.gz

phiresky.github.io

31–40 of 144 posts

Re: Rga: Ripgrep, but also search in PDFs, E-Books, Office documents, zip, tar.gz

#31

One a related note there is one program that I absolutely miss on Linux called everything (on windows). The closest I can find is mlocate but it does not have a GUI but more importantly it does not index my Windows or NTFS drives. Would appreciate any suggestions if someone knows something like 'everything' for Ubuntu.

Everything is great on Windows to pick files/folders.

From the linux command-line, I like fzf ( https://github.com/junegunn/fzf ), that you can instruct to use the faster fd ( https://github.com/junegunn/fzf#environment-variables ). Fzf even offers keybindings for your shell. For example, it binds Alt+C to fuzzy-finding a directory, and Enter cds to it ( https://github.com/junegunn/fzf#key-bindings-for-command-lin... ).

Fzf is great for other things too; here is a fish function to bing Alt+G to fuzzy-pick a Git branch and jump to it:

   function fish_user_key_bindings
     bind \eg 'test -d .git; or git rev-parse --git-dir > /dev/null 2>&1; and git checkout (string trim -- (git branch | fzf)); and commandline -f repaint'
     bind \eG 'test -d .git; or git rev-parse --git-dir > /dev/null 2>&1; and git checkout (string trim -- (git branch --all | fzf)); and commandline -f repaint'
   end

Re: Rga: Ripgrep, but also search in PDFs, E-Books, Office documents, zip, tar.gz

#32
post #27

One a related note there is one program that I absolutely miss on Linux called everything (on windows). The closest I can find is mlocate but it does not have a GUI but more importantly it does not index my Windows or NTFS drives. Would appreciate any suggestions if someone knows something like 'everything' for Ubuntu.

Haven't used this, but heard of it years ago, and it aims to be similar. https://github.com/dotheevo/angrysearch/

Thanks! That's super nice and very close to what I was looking for all this time.

I just learned how to mount all my Windows drive under /mnt using (using the `disks` software), so hopefully this should index those files too.

Re: Rga: Ripgrep, but also search in PDFs, E-Books, Office documents, zip, tar.gz

#33

I noticed that you can use Tesseract as an OCR adapter for rga. Tesseract is written in python, IIRC, and in the OP it comes with a warning that it’s slow and not enabled by default. Are there any other fast, reliable OCR libs out there? Or any rust OCR backends?

I don't think the problem necessarily is that Tesseract is slow, but that the whole process of rendering a PDF to a series of PNGs on which you can then run OCR is slow (which is what it does in the background).

Re: Rga: Ripgrep, but also search in PDFs, E-Books, Office documents, zip, tar.gz

#34

Curious why this isn't a pull request to ripgrep? Maybe it was, and rejected? It'd be nice to just have one tool, and this doesn't feel like it's a stretch to add to ripgrep.

It's a stretch. A big one.

I answered this a while back: https://old.reddit.com/r/rust/comments/c1bjw4/rga_ripgrep_bu...

Re: Rga: Ripgrep, but also search in PDFs, E-Books, Office documents, zip, tar.gz

#35

No ripgrep-all through the package manager: $ sudo dnf install -y ripgrep-all [...] No match for argument: ripgrep-all Error: Unable to find a match: ripgrep-all Rust's package manager fails: $ cargo install ripgrep_all [...] failed to select a version for the requirement `cachedir = "^0.1.1"` candidate versions found which didn't match: 0.2.0 location searched: crates.io index required by package `ripgrep_all v0.9.6…

It looks like cachedir yanked version 0.1.1. This is usually only done when a very serious issue is discovered, though I don't know what the reason is in this case.

https://crates.io/crates/cachedir

Re: Rga: Ripgrep, but also search in PDFs, E-Books, Office documents, zip, tar.gz

#36
post #5
post #2

I love that we’re seeing fast & flexible solutions for personal search. I’ve recently been playing with Recoll for full-text-search on content. Since it indexes content up front, the search is pretty fast. It can also easily accommodate tag metadata on files. It would be interesting to consider how ripgrep based tools can fit into generically broad “search your database of content” workflows (as opposed to remember o…

rga also indexes them when you search. To be honest I like that approach a lot more since it saves space and I generally know where I'm looking for things ls -sh ~/.cache/rga/ total 336M 336M data.mdb 4.0K lock.mdb

That kind of caching is an interesting solution to incrementally building a database instead of spending hours up-front indexing. So the tool is ready for immediate use. Quite nifty :-)

Re: Rga: Ripgrep, but also search in PDFs, E-Books, Office documents, zip, tar.gz

#37

Any advantages to this over something like Agent Ransack? https://www.mythicsoft.com/agentransack/

Works on non-Windows. ripgrep is notoriously fast. Command line interface. Not comically priced at 59.95 USD.

Why is there an expectation that every application should be free or cheap? IMHO $60 is very reasonable for a program that can save a lot of time for the user. And developers also have to eat, and might want to some day retire.

Re: Rga: Ripgrep, but also search in PDFs, E-Books, Office documents, zip, tar.gz

#39
post #20

It would be nice to have a direct comparison with ugrep. In the case of rg the benchmarks are already enough to switch. Why should I use rga instead of ugrep?

I've called the ugrep benchmarks into question, and I elaborated on it here (and this includes a frustrating exchange between myself and the ugrep author): https://old.reddit.com/r/rust/comments/i6pfb2/ugrep_new_ultr...

I've also re-run my original set of benchmarks[1] with ugrep included: https://github.com/BurntSushi/ripgrep/blob/master/benchsuite...

[1] - https://blog.burntsushi.net/ripgrep/

Re: Rga: Ripgrep, but also search in PDFs, E-Books, Office documents, zip, tar.gz

#40
post #6

Big fan of rga! I use it almost every day for the academic part of my life, when I want to know the location of some specific keywords in my lecture slides, books or papers I've been reading. Even for single ebooks, it is often more useful than the search in Acrobat Reader.

> search in Acrobat Reader The search in PDF viewers is an anti-feature in terms of UI and performance. Their advantage is that they allow to scroll to and highlight the found phrase back in the document.

The search in most application is an anti-feature.
Post reply on HN