Expanding KRunner Functionality

Is it possible to make krunner find specific text within pdf/writer/etc documents and then open the document to the specific location of that documnent? or at least have krunner show a “quote” with that search term so i could copy/paste and look for it in the document manually?

In addition, how do I make krunner present search results directly in krunner?

I believe this will greatly expand krunner functionality and put KDE so much further ahead of windows.

PS: Would also be great to have krunner show top 5 search engine results for a query directly in krunner. Would that be difficult to implement?

1 Like

I’m not working on KRunner (for now at least), but I think that’s a great idea! Would be really neat to have “deep linking” of some sort. Also not straightforward to implement probably, but it could be a medium-term project.

As in, show the text around the search result as it appears in the matched document? Also very useful.

I was thinking that the “Web Search Keyword” plugin does this. But you’re right, it only invokes the browser with the search result page, rather than showing any results inline. To do this correctly, one would have to know what the search result HTML will look like and extract page titles from it. That’s fragile and can break if search providers change their results pages. A better alternative would be to use an API with stability guarantees, although I’m not sure if search providers generally offer APIs that let the user bypass their precious results page with ads and whatnot.

So, perhaps not so easy to implement. But I might also just be missing something obvious.

1 Like

Hello, pardon the late reply. Kmail doesn’t seem to be receiving messages properly for me at the moment.

Thank you for your reply!

I am glad you like the idea! I think that having the ability to search “within” documents would make the search more accurate, kind of how google is able to search “within” pages for relevant results

I am not a programmer (unfortunately), so I may not understand or know some things so apologies in advance if this sounds ridiculous. However, I was thinking actually have krunner “scrape” kind of like google does or other search engines but present only top 5 results. That way there is no reliance on api’s that can break and its much more dynamic. Not sure how feasible it is.

I have submitted two feature requests as per the rules to this regard where I expand on this idea some more. Unfortunately, I can’t seem to include the links on this forum.

That might be a good project for google summer of code: to extend baloo to provide snippets for the searched terms and then integrate it to krunner.

I don’t want to pressure anyone, I am very thankful already for what KDE devs do. I can’t imagine how much work it is to develop a DE.

How likely is it that the proposed feature/features will get worked on in the future? And is there a way I could contribute with testing (since I have zero programming knowledge) if it is planned?