Live data from Hacker News

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

github.com

31–40 of 59 posts

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

#33
post #28

How does this compare with ugrep? I know that does many of these things while sticking with C++.

Ugrep seems to be a completely new codebase, whereas RGA is a layer on top of ripgrep. Based on the benchmarks on the ripgrep github repo, rg is a bit better than 7x faster than ugrep.

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

#36
Anyone know how it handles ligatures? Depending on font and tooling the word "fish" may end up in various docs as the glyphs [fi, s, h] or [f, i, s, h].

According to a quick check against /usr/share/dict/words "fi" occurs in about 1.5% of words and "fl" occurs in about 1%. There are other ligatures that sometimes occur but those are the most common in English I believe.

I don't have any sense of how common ligature usage is anymore (I notice that the word "Office" in the title of this article is not rendered with a ligature by Chrome) but it might be insanity inducing to end up on the wrong side of a failed search where ligatures were not normalized.

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

#37

Earlier quoted context omitted.

None of them really execute "code". Pandoc has a pretty good write up of the security implications or running it, which I think applies just as much to the other ones, with the added caveat of zip bombs. https://pandoc.org/MANUAL.html#a-note-on-security It's just text, this isn't ripgrepping through your excel macros, just the data that's actually in the excel file.

I don't think there's a default excel adapter in rga. (I wanted one somewhat recently, and then doing a find for xls on the linked page returns 0 results)

You are correct that rga doesn't ship with an Excel adapter out of the box. I have an open PR [1] to allow users to process XLS and XLSX files like any other Zip archive.

[1]: https://github.com/phiresky/ripgrep-all/pull/247

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

#39

it would be great if support xlsx.

I have an open PR [1] that's relevant. The proposed changes would allow users to process XLS and XLSX files like any other Zip archive.

[1]: https://github.com/phiresky/ripgrep-all/pull/247

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

#40

What dependencies does it install and does it create a bunch of caches, indices that clog up storage and/or memory? (Besides rip grep)

> What dependencies does it install

For all of the built-in adapters to work, you'll need ffmpeg, pandoc, and poppler-utils. See the Scoop package [1] for a specific example of this.

> does it create a bunch of caches, that clog up storage and/or memory?

YMMV, but in my opinion ripgrep-all is pretty conservative in its caching. The cache files are all isolated to a single directory (whose location respects OS convention) and their contents are limited to plaintext that required processing to extract.

[1]: https://github.com/ScoopInstaller/Main/blob/master/bucket/rg...

Post reply on HN