tridactyl / tridactyl

A Vim-like interface for Firefox, inspired by Vimperator/Pentadactyl.

Home Page:https://tridactyl.xyz

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use bookmarks with keywords as search providers

lericah opened this issue · comments

would love to see the ability to use search keywords set in the firefox config ie. "t g panda bears" to search panda bears on google.

We want this too, but we don't get access to the search keyword list in firefox or in the bookmarks.

We'll make the search provider map configurable soon...

I know this isn't THE solution but a workaround would be to add the possibility to have parameters in the search engine. Actually, we can set a search engine like so :

searchsetkeyword esa http://www.esa.int/esasearch?q=

As you can see there's no %s. So when we type : open [searchengine] [my search] the second part is only append to the search url. But with a variable we can do stuff like.

https://%s.example.com/ or https://example.com/?search=%s&var=test etc...

In other word, it emulate the functionnality of bookmark's keywords.

@dannycolin is that necessary for anything? Nobody has mentioned it being missing yet so I didn't bother adding it.

As an aside: we could potentially have an import wizard that gets all bookmark URLs with %s in them and allow people to assign keywords to them.

@bovine3dom As an aside: we could potentially have an import wizard that gets all bookmark URLs with %s in them and allow people to assign keywords to them.

Could be nice.

is that necessary for anything?

For example, I use a bookmark for reddit.com with the keyword "r" and the url : "https://reddit.com/%s". So if I type "r" it goes straight to the main page but if I type "r r/linux" it goes to that specific sub.

I do the same with an other website but where I need to add the second part in the middle of the URL. So when I type "u moodle" it goes to the moodle instance of my university (https://moodle.myuniurl.com).

As you can see, the actual code doesn't support my second example. The result is "https://.myuniurl.com/moodle". That's why I think adding support for the %s would be nice. :)

Cool, I've made a new issue for it: #253.

Is there any progress on this?

I have a few (~100) keyword searches that I've grown dependant on. The advantage of having these as bookmarks with keywords, is that they are synced between browsers, and are importable/exportable from the bookmarks menu.

I personally use "keywords" (i.e. those strings one can add to a bookmark, e.g. using the -keyword option in Vimperator after pressing 'a') a lot.

I don't exlusively use them for searches (like wp foo would translate to https://en.wikipedia.org/wiki/foo), though, but also for lots of sites without a placeholder/%s in the bookmark URL (e.g. just t for https://www.twitter.com, so t t<Enter> would open Twitter in a new tab in Vimperator).

I might be mixing some things up, but as I understand it, keywords are not necessarily coupled to searches/search providers/search engines.

So yeah, it would be great (for me: almost essential) to get keywords working in Tridactyl as well.

Bug opened with Mozilla for this functionality:

https://bugzilla.mozilla.org/show_bug.cgi?id=1435466

@cmcaine Mozilla have closed your bug in favour of a different closed bug which was resolved, essentially, as WONTFIX because bookmark keywords are going to get the chop. (I could have sworn I had linked to that bug and said that Mozilla weren't going to do it somewhere, maybe it was on Matrix...)

Yeah, bugzilla search is terrible.

I don't know if they are getting rid of keywords or not, there are active bugs about changing the keywords internal API and I don't know why they'd do that if they were going to cut them soon.

Worst case, someone can write a thing to extract existing keyword bookmarks and import them to tridactyl.

Closing as this is WONTFIX'd by Mozilla.

Firefox can export/import all bookmarks to/from a JSON file, which contain bookmarks' keyword. How about provide a command to export/import firefox's bookmark json?

Can Tridactyl trigger the export with our permissions? If not, this sounds like a good candidate for a quick and dirty script with jq or your favourite programming language to generate a file that you'd then source from your .tridactylrc or whatever?

Currently, I just manually export bookmarks, and I did not find any api. Maybe I can post my script in the wiki.