Jump to content
mike_h

firefox bookmark search

Recommended Posts

13 minutes ago, lycopodiopsida said:

I also would like FF to be supported, since the provided ff workflow tries to read the SQL db and is, thus not working when FF is running

 

If a workflow can't read the SQLite database, then Alfred can't either.

 

16 minutes ago, lycopodiopsida said:

I have a feeling, that Safari is somehow falling behind in performance

 

Safari is tuned for battery life, not maximum performance like Chrome, so yes, it is often slower.

 

17 minutes ago, lycopodiopsida said:

the thinking here should be more strategical, since we don't want to ask ourselves in 10 years how we've got there with browser monopoly.

 

Adding bookmark support to Alfred isn't going to save Firefox from Mozilla's mismanagement.

 

There won't be a monopoly. Safari is not going to go away.

Share this post


Link to post
Share on other sites
Posted (edited)
7 minutes ago, deanishe said:

There won't be a monopoly. Safari is not going to go away. 

 

This is not necessary true. People in web development have basically stopped to test websites in other browsers. And if an issue appears, the first question is always "can it be reproduced in chrome", as if anything not appearing in chrome is a browser bug. For a monopoly you don't have to kill other browsers, just render them significantly less useful for users. Safari, too, is not safe anymore, since the webkit !== blink.

Edited by lycopodiopsida

Share this post


Link to post
Share on other sites

I know webdevs are joined at the hip to Chrome these days, but I think Mobile Safari will keep them somewhat honest.

 

At any rate, I think it’s a more significant brake on the Blink monoculture than Firefox: iOS users have to use WebKit.

 

But yeah, I certainly agree in principle that Chrome, and arguably Google, are bad for the Web at this point.

Share this post


Link to post
Share on other sites
4 hours ago, deanishe said:

Safari is tuned for battery life, not maximum performance like Chrome, so yes, it is often slower.

I find Safari more performant than chrome in my experience. Tabs open faster, content renders faster even sometimes. 

 

I only chrome canary for webdev so might be wrong. In any way I can’t imagine using chrome as main browser if you also use ios devices. Chrome on ios is bad.  

Share this post


Link to post
Share on other sites
11 hours ago, Jakub Sypiański said:

@Gareth I don't like the way you present your arguments (also, you have no data to claim that people don't want themes, do you?), but you have a good point: the statistics of active browser users are potentially strongly biased. The impossibility to use the browser of choice due to Alfred's limitations definitely influences statistics. It would be interesting to find out which browsers Alfred users USE, but which they WOULD LIKE to use. However, I don't think that "Firefox: 5%" would suddenly become "People who'd love to use Firefox, but can't: 25%". Just because of the bookmarks?

 

@deanishe Thank you for the answer. I can't wait to learn to make my own workflows, especially after discovering how supportive and dynamic is the the community here. So I will try to forget how great it would be to have my Vivaldi bookmarks accessible through Alfred. ;)


If you're referring to my demeanour, I'm afraid it's a reflection of the attitude of a particular admin on here. Let's just say there's at least one thread that Vero has had to delete because of the way he sometimes talks to customers. And I see no reason to behave like a ray of sunshine with such a person.

With regards to themes, yes you're right. There is 1 guy who asked to be able to edit fonts, back on page 3 of the requested features. So it wasn't quite 0 like I claimed. And this 1 guy must be the Sultan of Brunei to have had his wish granted so quickly, I guess, given that everyone in this thread is so blatantly ignored.

Share this post


Link to post
Share on other sites

To make it clear about how we deal with feature suggestions in general to anyone who is reading this.

 

This forum is a place for friendly interaction and not arguments. It constitutes a single channel of input which helps us paint a much bigger picture of the shape of Alfred's future. We read every single post on here (and all other channels) even if we don't respond to them. When we do respond, the opinion is carefully considered and definitive.

 

In this case, my response to the thread is summarised as:

  1. Firefox provides no official way to integrate with their bookmarks, requiring fudges and hacks of sorts, something which I don't do in Alfred's framework.
  2. The weighting of users wanting this feature is significantly lower than other features which have been added. It's easy for people to spew statistics, but only Vero and I get to see the ACTUAL statistics of both usage and demand within Alfred.

My full response to this thread is here:
https://www.alfredforum.com/topic/11724-firefox-bookmark-search/?do=findComment&comment=63324

 

The closest I can find to being able to read Firefox bookmarks is to activate their legacy bookmarks.html support, with no guarantee that this feature will remain in Firefox in the future, or to manually export a backup json. The info about this is here:

http://kb.mozillazine.org/Bookmarks

 

This is why the feature, for now at least, is better suited to a workflow. Generally if there is high demand for a feature, a workflow is created very quickly by the community, and this is something which hasn't really happened in this case.

 

@Gareth I understand your frustration, but I'd really appreciate if you could dial down your levels of hostility a little. It'd make me much more willing to work with this feature request (perhaps with a 1st party created workflow for now), regardless of the low levels of interest. Could you also link me any of the feature requests you've made with Mozilla regarding official 3rd party integration of bookmarks so I can potentially chime in on them.

 

Thanks,
Andrew

Share this post


Link to post
Share on other sites
4 hours ago, Andrew said:

The closest I can find to being able to read Firefox bookmarks is to activate their legacy bookmarks.html support, with no guarantee that this feature will remain in Firefox in the future, or to manually export a backup json. The info about this is here:

 

Yes, it seems to be the only valid option. Every possibility to work with SQLite db is a rotten apple, even if it is cached by the workflow. In my case, browser is just running sometimes for a week, which means, DB would be locked all the time. I should look in github for older workflows with a working parser of bookmarks.html, the rest should not be that difficult.

Share this post


Link to post
Share on other sites
7 hours ago, Andrew said:

To make it clear about how we deal with feature suggestions in general to anyone who is reading this.

 

This forum is a place for friendly interaction and not arguments. It constitutes a single channel of input which helps us paint a much bigger picture of the shape of Alfred's future. We read every single post on here (and all other channels) even if we don't respond to them. When we do respond, the opinion is carefully considered and definitive.

 

In this case, my response to the thread is summarised as:

  1. Firefox provides no official way to integrate with their bookmarks, requiring fudges and hacks of sorts, something which I don't do in Alfred's framework.
  2. The weighting of users wanting this feature is significantly lower than other features which have been added. It's easy for people to spew statistics, but only Vero and I get to see the ACTUAL statistics of both usage and demand within Alfred.

My full response to this thread is here:
https://www.alfredforum.com/topic/11724-firefox-bookmark-search/?do=findComment&comment=63324

 

The closest I can find to being able to read Firefox bookmarks is to activate their legacy bookmarks.html support, with no guarantee that this feature will remain in Firefox in the future, or to manually export a backup json. The info about this is here:

http://kb.mozillazine.org/Bookmarks

 

This is why the feature, for now at least, is better suited to a workflow. Generally if there is high demand for a feature, a workflow is created very quickly by the community, and this is something which hasn't really happened in this case.

 

@Gareth I understand your frustration, but I'd really appreciate if you could dial down your levels of hostility a little. It'd make me much more willing to work with this feature request (perhaps with a 1st party created workflow for now), regardless of the low levels of interest. Could you also link me any of the feature requests you've made with Mozilla regarding official 3rd party integration of bookmarks so I can potentially chime in on them.

 

Thanks,
Andrew

 

Hi Andrew

Your suggestion would be a welcome one.

 

I realise Mozilla haven't made your life easy with the current bookmark storage implementation they have in place, and I appreciate the reluctance to introduce a workaround into Alfred's codebase. So a workflow that was as smooth as native support, even if it wasn't actually native, would be more than acceptable.

 

My frustration in this thread stems firstly from the friction I've experienced with your admin as you already know, but also from the fact that to date the response to this request was along the lines of "do it yourself and share the results with the community" which was the wrong answer for all kinds of reasons.

 

If you can find the time to put together a workflow, using your obvious advantages as someone who knows the workflow process inside out to produce a solution that works well, then Alfred would literally be perfect as far as I'm concerned.

 

Thanks

Share this post


Link to post
Share on other sites
6 hours ago, lycopodiopsida said:

Yes, it seems to be the only valid option. Every possibility to work with SQLite db is a rotten apple

 

You might be able to read the DB by changing the options when you open it. You can also make a copy and read that, but that’s probably not a great idea here.

 

The bookmarks.html route sounds a lot more straightforward, though.

Share this post


Link to post
Share on other sites
22 minutes ago, deanishe said:

The bookmarks.html route sounds a lot more straightforward, though.

 

So far I've found only code for processing JSON bookmark files:

https://github.com/duanemay/alfred-workflow-chrome-bookmarks

https://github.com/blainesch/alfred-chrome-bookmarks

 

Since I don't want to write the parser from scratch, I need either to grab the most recent of the json backup files, or simply convert a bookmarks.html to json first, which should be not so difficult. Need to play around with it.

 

Share this post


Link to post
Share on other sites
Posted (edited)
3 hours ago, lycopodiopsida said:

simply convert a bookmarks.html to json first

 

You'd have to write a bookmarks.html parser to do that, too…

 

In any case, the parser is pretty trivial if you only want to extract the links (i.e. no folder hierarchy).

 

Here is a simple workflow that searches your Firefox bookmarks.html file. You can filter by bookmark title and domain name.

 

The problem is, Firefox only updates the bookmarks.html file on quit. So any new bookmarks you add aren't found until you restart Firefox :( 

 

It is possible to get an up-to-date list of bookmarks from places.sqlite (even when Firefox has locked it), but there are a few issues that would make that kinda suck, too.

Edited by deanishe

Share this post


Link to post
Share on other sites
Posted (edited)

Unfortunately that workflow doesn't seem to work. My bookmarks.html file is there just fine, but "ff" followed by any bookmark I know is in there yields 0 results and falls through to default handlers. I opened the Python file and uncommented out the error handlers and they didn't return anything, so I think there are just 0 results. "ff <empty space>" does return an error though about how a string cannot be concatenated with a None object.

 

I see you're logging the number of bookmark items but given I have zero Python and zero Alfred workflow experience, where is this log output to?

Edited by Gareth

Share this post


Link to post
Share on other sites
7 hours ago, deanishe said:

The problem is, Firefox only updates the bookmarks.html file on quit. So any new bookmarks you add aren't found until you restart Firefox

 

I think it is a limitation, users can live with. Being up to-date is not such a big deal for bookmarks, which are mostly static.

Share this post


Link to post
Share on other sites
7 hours ago, Gareth said:

I opened the Python file and uncommented out the error handlers and they didn't return anything

 

It’s commented out because it’s unused. It doesn’t really work in the mode the workflow is run in.

Share this post


Link to post
Share on other sites
1 hour ago, lycopodiopsida said:

 

I think it is a limitation, users can live with. Being up to-date is not such a big deal for bookmarks, which are mostly static.

 

The workflow above should suffice, then, assuming it works for you…

Share this post


Link to post
Share on other sites
6 hours ago, deanishe said:

 

It’s commented out because it’s unused. It doesn’t really work in the mode the workflow is run in.

 

Well no, I also re-introduced the usage that you had commented out (the method alone would have been pointless after all) and that's how I got the error that I supplied earlier.

 

I just ran the script with the logger open and this is what I got:

 

[16:44:15.039] Logging Started...
[16:44:19.068] Firefox Bookmarks[Script Filter] Queuing argument '(null)'
[16:44:19.298] Firefox Bookmarks[Script Filter] Script with argument '(null)' finished
[16:44:19.301] ERROR: Firefox Bookmarks[Script Filter] Code 1: .
0.001s ⧗ load profile
profile=Profile(name='default', path='/Users/gareth/Library/Application Support/Firefox/Profiles/4oaj3zyd.default', default=True)
0.083s ⧗ load bookmarks
[ERROR] cannot concatenate 'str' and 'NoneType' objects
-------------------- TRACEBACK --------------------
Traceback (most recent call last):
  File "/Users/gareth/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.457253BC-9A7E-49D9-B6E4-3E4F1AED7AEB/bookmarks.py", line 200, in <module>
    code = main()
  File "/Users/gareth/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.457253BC-9A7E-49D9-B6E4-3E4F1AED7AEB/bookmarks.py", line 186, in main
    match=bm.title + ' ' + urldomain(bm.url),
TypeError: cannot concatenate 'str' and 'NoneType' objects
------------------ END TRACEBACK ------------------

 

The profile location is correct, and the bookmarks.html document is in there as expected.

 

Share this post


Link to post
Share on other sites
Posted (edited)
2 hours ago, deanishe said:

 

You said you didn't get an error earlier, just no results…

 

Try the new version. It's more careful with unusual URLs.

 

Gonna have to disagree with you on that: "ff <empty space>" does return an error though about how a string cannot be concatenated with a None object.

I tried the latest version though and that does seem to work! That's great. Thanks! I am now one happy camper.

Edited by Gareth

Share this post


Link to post
Share on other sites

So, having to use a workflow to search their bookmarks clearly didn't put people off using Chrome.

 

I was using a workflow for Chrome bookmark search before, but after the native search was introduced it fast became my favorite part of Alfred; it would be painful to go back to a workflow after using native bookmark search a few hundred times a day for months..

Share this post


Link to post
Share on other sites
13 hours ago, Justin Aiken said:

So, having to use a workflow to search their bookmarks clearly didn't put people off using Chrome.

 

I was using a workflow for Chrome bookmark search before, but after the native search was introduced it fast became my favorite part of Alfred; it would be painful to go back to a workflow after using native bookmark search a few hundred times a day for months..

 

The Firefox workflow works really well. It's taking a little time to get used to the command (I changed it from "ff" to "bm" for bookmarks so that if I ever switch browsers again I won't have the same problem with muscle memory that I'm having after previously used "ch") but with time that will resolve itself I think.

Share this post


Link to post
Share on other sites

I've created this post on the Mozilla support forums: https://support.mozilla.org/en-US/questions/1261750

 

Would very much appreciate your support in contributing to the thread to help ensure that the developers provide a more robust solution than the current workflow (which requires occasional browser restarts in order to remain current) or at the very least, the safety of the "export bookmarks as HTML" option.

 

Thanks

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...