Bug 422876 - webshortcuts: use firefox bookmarks with keywords
Summary: webshortcuts: use firefox bookmarks with keywords
Status: RESOLVED INTENTIONAL
Alias: None
Product: krunner
Classification: Plasma
Component: webshortcuts (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR wishlist
Target Milestone: ---
Assignee: Alexander Lohnau
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-12 14:18 UTC by Daniel
Modified: 2020-10-03 14:32 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
firefox: adding a search as a bookmark with keyword (56.92 KB, image/png)
2020-06-12 22:23 UTC, Daniel
Details
firefox: it is possible to run a search using the given keyboard in the address bar (5.14 KB, image/png)
2020-06-12 22:24 UTC, Daniel
Details
properties of a bookmark with the replacement of %s to search string (47.58 KB, image/png)
2020-06-13 11:28 UTC, Daniel
Details
properties of a bookmark without %s, the search string just gets appended to the url (44.21 KB, image/png)
2020-06-13 11:30 UTC, Daniel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel 2020-06-12 14:18:36 UTC
SUMMARY
In firefox, bookmarks can have keywords, for example "@enwiki". With this it is possible to search in the url bar with "@enwiki some term". Then "%s" of the bookmark gets replaced with "some term" and opened, very similar to kde's webshortcuts.

It would be useful, if kde would detect such bookmarks from firefox and recognize them as webshortcuts.
Comment 1 Alexander Lohnau 2020-06-12 22:00:51 UTC
I am not sure what you mean. Bookmarks can have keywords, but they are currently ignored.

Search engines can also have keywords, but they are stored in a weird file :/

https://www.reddit.com/r/firefox/comments/fb3ykm/why_is_searchjsonmozlz4_in_the_lz4_format/
Comment 2 Daniel 2020-06-12 22:23:41 UTC
Created attachment 129284 [details]
firefox: adding a search as a bookmark with keyword
Comment 3 Daniel 2020-06-12 22:24:01 UTC
Okay, let me try to describe it better.

In Firefox it is possible to assign keywords to bookmarks. Especially it is possible to save searches (e.g. from Wikipedia, Duden, Google) as such a bookmark with a keyword. If you then enter the keyword followed by a search term in the address bar, Firefox will suggest to search for the keyword in the corresponding search.

This functionality of Firefox is equivalent to that of KDE's Web Shortcuts.

So it would make sense to make those bookmarks from Firefox that contain a keyword and have "%s" in the URL (where the search word will be inserted later) a Web Shortcut in KDE; only the "%s" would have to be replaced by \{@}.

Is it clear now?
Comment 4 Daniel 2020-06-12 22:24:41 UTC
Created attachment 129285 [details]
firefox: it is possible to run a search using the given keyboard in the address bar
Comment 5 Alexander Lohnau 2020-06-13 11:11:24 UTC
Could you please make a screenshot of the properties of the bookmark?
Comment 6 Daniel 2020-06-13 11:28:25 UTC
Created attachment 129304 [details]
properties of a bookmark with the replacement of %s to search string
Comment 7 Daniel 2020-06-13 11:30:28 UTC
Created attachment 129305 [details]
properties of a bookmark without %s, the search string just gets appended to the url
Comment 8 Alexander Lohnau 2020-06-13 11:41:03 UTC
Thanks, now I can reproduce the usecase.

But I am not sure about implementing this.

1: This seems a niche usecase, although cool :D.
2: This has the functionality of the webshortcuts, but uses the bookmarks.
And implementing it on the webshortcuts side would result in duplicate code.

Also we cant be sure if a keyword is intended as a keyword or webshortcut. I can assign any keyword, for instance I could just call it "baum".

Maybe someone else has opinions on this.
Comment 9 Daniel 2020-06-13 11:45:16 UTC
Here is the mozillazine KB page for this: http://kb.mozillazine.org/Using_keyword_searches#Creating_bookmarks_with_keywords
Comment 10 Alexander Lohnau 2020-06-27 16:10:26 UTC
Having thought about it I would honestly close this bug.
Webshortcuts can do the same thing and implementing this feature would only make the codebase more complex. Hopefully you can understand this :-).

What do you think @ngraham.
Comment 11 Nate Graham 2020-10-03 14:32:28 UTC
Yeah, I think web shortcuts already cover this use case. No need to re-invent the wheel. Sorry. :)