Live data from Hacker News

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

phiresky.github.io

61–70 of 144 posts

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

#61
post #51
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…

FZF + ripgrep is really killer for me. I don't even bother organizing my notes anymore, I just throw everything markdown files in a flat directory and then I have a script that uses FZF + ripgrep to search through it when I need it. I search by "last modified first" so unless I'm digging for something very old the results are instant. Code snippets, finances, TODO lists, cake recipes... It's all in there. I use the s…

I couldn't agree more with that. I wrapped a bash function to search through my notes folder with fzf + rg and it works perfectly.

Also, I have a specific pattern to write some tags inside files that I can parse with ripgrep.

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

#62

This is great. I have 100+ ebooks/pdfs of programming and textbooks of which I've been extracting the index pages of. My intention was to always make some sort of search index out of them. I will definitely be trialing this (initial few searches seem promising!)

Great idea. Please update on whether this use case works or not! And other tips, examples, etc.

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

#63

Earlier quoted context omitted.

Can't tell if this is sarcasm.

not being sarcastic if god wanted me to access my files in less than 15 seconds, they wouldn't have commanded google to package the search bar as a separate JS bundle that only gets downloaded when you focus the search bar I'm no frontend dev but I know a thing or two about HTML + there's no built-in way to input text into a box -- this is the best we can do and we'll just have to wait for 5G + moore's law to solve t…

Laugh all you want but try looking for a Fullstack/Frontend role in today's job market. What do they want? AnGuLaRr with oBsErVaBlEs! Why do they want it? Because Google can't be wrong.

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

#64

thanks but it's way faster to have my stuff in G drive that way I can open a browser tab, wait 5 seconds for it to load, locate the new screen location of the search bar, click it, wait for javascript to finish loading so I can click the search bar, click it for real this time, mistype because there's some kind of contenteditable event jank, wait 5 seconds for my results to come up, fix the typo, and just have my res…

If you use Chrome, this might help: https://www.androidpolice.com/2019/12/04/chrome-omnibox-will...

For GSuite/Workspace this needs to be enabled by an admin: https://support.google.com/a/answer/9121487?hl=en

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

#65
post #51
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…

FZF + ripgrep is really killer for me. I don't even bother organizing my notes anymore, I just throw everything markdown files in a flat directory and then I have a script that uses FZF + ripgrep to search through it when I need it. I search by "last modified first" so unless I'm digging for something very old the results are instant. Code snippets, finances, TODO lists, cake recipes... It's all in there. I use the s…

Can you share your script.

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

#66
post #52

NOTE: ripgrep already has --pre. (No pre-built indexing, of course.)

That's exactly what ripgrep-all uses to implement this. There's a lot of integration work required to make this nice. The --pre flag is just a small hook. More info on it here: https://github.com/BurntSushi/ripgrep/blob/master/GUIDE.md#p...

Yup.

Something perhaps more helpful but so far unmentioned (and somewhat OS-specific) is that statically linked executables usually fork & exec (especially exec) much faster than dynamically linked ones. This difference is usually only like 50..150 us vs 500..3000 us but can multiply up over thousands of files.

This only matters on the first run of `rga`, of course. While the dispatched-to decoder is likely mostly out of one's linking control, this overhead can be saved for the dispatcher, at least. So, I would suggest `rga-preproc` should have a static linking option/suggestion, at least on Linux.

Of course, this overhead may also fall below the noise of PDF/ebook/etc. parsing, but maybe not the decompression of small files in some dark horse format. :-)

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

#67

Earlier quoted context omitted.

Can't tell if this is sarcasm.

not being sarcastic if god wanted me to access my files in less than 15 seconds, they wouldn't have commanded google to package the search bar as a separate JS bundle that only gets downloaded when you focus the search bar I'm no frontend dev but I know a thing or two about HTML + there's no built-in way to input text into a box -- this is the best we can do and we'll just have to wait for 5G + moore's law to solve t…

> "I'm no frontend dev but I know a thing or two about HTML + there's no built-in way to input text into a box"

hahaha, nice one (continued)

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

#68

Earlier quoted context omitted.

not being sarcastic if god wanted me to access my files in less than 15 seconds, they wouldn't have commanded google to package the search bar as a separate JS bundle that only gets downloaded when you focus the search bar I'm no frontend dev but I know a thing or two about HTML + there's no built-in way to input text into a box -- this is the best we can do and we'll just have to wait for 5G + moore's law to solve t…

Laugh all you want but try looking for a Fullstack/Frontend role in today's job market. What do they want? AnGuLaRr with oBsErVaBlEs! Why do they want it? Because Google can't be wrong.

wait actually? my sense is that react is leading

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

#69

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.

For mlocate you can edit /etc/updatedb.conf to specify what to index. One trick I use is "locate -Ai" that lets you search for multiple patterns and makes it case insensitive. So you can use "locate -Ai linux .pdf" to search for all pdf files related to Linux.

Also for gnome there is tracker which does search and indexing built into the system. I think by default its set for minimal use but it can be configured by the settings/search panel to index many locations. I haven't played with is much recently though.

Post reply on HN