Jump to content

Search and add bookmarks to Raindrop.io


Recommended Posts

This is a workflow for searching and adding bookmarks to Raindrop.io.

 

  • To search your Raindrop.io bookmarks, open Alfred, type r, space, and then your search query, and the results will show directly in Alfred so that you can select one and press enter to open it in your browser.
    • Raindrop.io collections and tags will also show in the search results together with bookmarks, and you can select them to browse or search their content.
    • Before you have started to type a search query, you also have the option to browse your collections instead of starting with a search.
    • If a web browser is the frontmost app when you open a bookmark from this workflow, it will open in that browser.
    • If you are working in another app, the bookmark will open in your default browser.
    • Hold the cmd-key to view the URL for a bookmark.
    • Hold the ctrl-key to view the description for a bookmark.
    • Hold the option-key and press enter, or use cmd+c to copy the URL instead of opening it in a browser.
    • Hold the shift-key and press enter to open the permanent copy that is stored at Raindrop.io (Requires a Raindrop.io Pro subscription to work)
    • Press enter before you have started typing a search query, and Raindrop.io itself will open in your active web browser.
  • To add a new bookmark to Raindrop.io, there are two ways to get the actual bookmark you want to add into the workflow.
    • The primary way is to first make sure that you have the webpage you want to add opened in a browser and that it is the frontmost window, and then open Alfred and type ra followed by a space.
    • The alternative way, which only works if the frontmost application is not one of the supported browsers (as the primary method will be used then), is that you first copy an address that you wnant to add as a bookmark, and then open Alfred and type ra followed by a space.
    • In the second step you get to change the title that the bookmark is saved with. Hold the cmd-key to save and skip the tag adding step.
    • In the third step you get to add tags to your new bookmark. You can either simply type them out, or select from a list of tags that matches what you have started to type. Separate multiple tags with comma. Hold the cmd-key to save when selecting a tag in the list, and skip the option of adding more tags.
    • The Firefox support for adding bookmarks was made possible with the help of deanishe's great workflow Firefox Assistant, which needs to be installed in Alfred for the Firefox support to function. Get it here: https://github.com/deanishe/alfred-firefox
  • If the workflow is not authenticated with Raindrop.io when you initiate it, you will be taken to the authentication process.
  • To set keyboard shortcuts, go to the "Search Raindrop.io" workflow in the Alfred preferences and look in the top left corner, where you can set keyboard shortcuts for searching Raindrop.io, or for adding bookmarks.
  • To change other settings, go to the "Search Raindrop.io" workflow in the Alfred preferences, and click the [𝒙] button in the top right corner, where you get descriptions of the options in the information view to the left, and set the options by changing the value of the variables to the right.

 

One special thing with this workflow is that it detects if the topmost window is a browser window, and then opens the search results in that browser.

So, if you are currently working in Firefox, your bookmark will open in a new tab there, and if you are currently working in Safari, or in Chrome, the bookmark will open there instead.

If the topmost application is not a browser, the bookmark will be opened in your default browser.

 

This makes this extension perfect for those who use more than one browser. You can always open bookmarks in the exact same way, and still have them displayed in the browser you are currently using.

 

The supported browsers are: Safari, Chrome, Firefox, Edge, Brave, Vivaldi, Opera, Chromium, Chrome Canary, Safari Technology Preview, NAVER Whale (and SeaMonkey and SigmaOS, but only for opening bookmarks)

 

This workflow is compatible with macOS 10.13 High Sierra and newer, and doesn't have any other external requirements (other than for Firefox bookmark adding support, which the workflow will tell you about if you need it).
The reason for not supporting older versions than High Sierra is that Go 1.17 doesn't support older OS versions.
You can still run version 1.7 of this workflow on older macOS versions if you need to be able to do that, as all versions of this workflow prior to 2.0 is based on PHP and Python rather than Go.

 

Download from GitHub

 

Changelog

2.0.4: Bug fix

2.0.3: Bug fix

2.0.2: Adds the ability to directly open Raindrop.io's permanent copy of a bookmark by holding shift and pressing enter while a bookmark is selected in the list. This feature requires a Raindrop.io Pro subscription to work.

2.0.1: Adds the ability to show more and better information if the authentication against Raindrop.io fails.

2.0: Version 2.0 does not really look or behave as different as the version bump might indicate, but almost everything has changed underneath to make this a better workflow:

  • Rewritten in Go, so no dependency on PHP or Python anymore. This is important, as Apple is removing PHP from macOS 12 Monterey, and will also remove Python from macOS in the future.
  • It's faster! Running the backend of the workflow as a compiled binary (Go) instead of a script (PHP) makes it faster, and it is also compiled as a universal binary, so it's running natively on both Apple Silicon and Intel Macs, but there are also some other changes that helps to make it faster and you will probably notice the difference if you used the old version before.
  • Less risk for unexpected behaviour that leads to bugs, both because it can't behave different depending on which PHP or Python version you have anymore, but also because it now for example uses more reliable ways to keep track of information while navigating through the different parts of the workflow.
  • Adding bookmarks from Firefox is now more reliable, and if things still ocationally go wrong, the workflow is better at communication that in a useful way. (I switched from Safari to Firefox myself, so it got som more attention than before)
  • Ability to add a bookmark by copying the address, rather than getting it from the currently active browser window. To use this feature for adding a bookmark from an unsupported browser (or somewhere else), just copy the address and go to the bookmark adding feature of this workflow. It will just work, without you having to do anything more than that! (This is the secondary way to add bookmarks, so if a supported browser is the frontmost application, the workflow will still look there and ignore what you might have copied)

1.7: Some features and fixes:

  • This version adds support for macOS Monterey!
    When you have updated to macOS Monterey and installed version 1.7 of this workflow you will also need to install PHP (if you haven't done that already of course), as Apple does not include PHP preinstalled anymore in Monterey. Instructions for the recommended way of doing this is available here.
    If you install PHP in a non default path (other than what is default for Homebrew, MacPorts etc), you might want to add that path to the path environment variable in this workflow.
  • If you have set a bookmark as a favourite, this will now be indicated in search results and lists
  • Bookmarks that are marked as favourites will also now by default be listed first in search results and lists, which you can change by setting the value of the environment variable favourites_first in the workflow, if you prefer the old behaviour for this.
  • You can now browse your Unsorted bookmarks, just like you can browse your other bookmark collections.
  • Many potential problems are also fixed with this update, so if you had problems to make this workflow function properly before, this update might fix that.

1.6.1: Fixed an issue with icon caching.

1.6: Updated to the new Raindrop.io icon, added support for the NAVER Whale browser, fixed a bug with the authentication mechanism.

1.5: Many changes:

  • Tags now display in search results, and you can select them to list or search for bookmarks with that tag
  • When adding a new bookmark, you can now set your own title for it, and add one or more tags
    • While adding tags, you can either simply type them out, or select from a list of tags that matches what you have started to type
    • You can add more than one tag by separating them with a comma: tag1, tag2, tag3
    • If you type out a tag that does not exist yet, it is created when you save the bookmark
    • Hold down the cmd key if you want to save right away when selecting a tag in the list. Just pressing enter leaves the option of adding more tags.
    • If you want to skip the new options while adding a bookmark, hold the cmd key when you select collection or when you set the title, and the options that follow will be skipped and set to default (Title from the webpage, and no tags)
  • When adding bookmarks, the description is now set to what is specified in the webpages meta description tag, if there is one. This means that in most cases you will get the same description for your new bookmark as what is seen as description for that webpage on search engines. If there is no meta description tag, no description is set.
  • In search results, the collection name, tags and domain name of a bookmark is now shown in the subtitle instead of the first words of the description, like before. This is because that is likely more useful in most cases. You can view the description by holding the ctrl key (And there is a setting to change this back if you would want to, see below)
  • There are now settings! You set them by changing Alfred Environment Variables, and there are now two of them for changing what the bookmark subtitles show, and for changing how subcollections are displayed.

1.4.1: Fixed a bug that would make the bookmark adding feature fail in many cases. If that didn't work for you before this, it probably does work now.

1.4: Raindrop.io collections will now also show in the search results together with bookmarks, and you can select them to browse or search their content. Before you have started to type a search query, you also have the option to browse your collections instead of starting with a search.

1.3.1: Fixed a bug that made the collection list not loading under certain conditions. For example the first time you tried to add a bookmark.

1.3: Support for adding new bookmarks to Raindrop.io from the currently active browser.

1.2: Added option to have a keyboard shortcut for direct access to the Raindrop.io search, and added the ability to hold the option key while pressing enter to copy the link instead of opening it in a browser (you could already copy the link with cmd+c before, and that is still possible)

1.1: Implemented a proper authentication mechanism, so that this is now handled in a simple to use way that is initiated directly from the workflow if it senses that you are not authenticated yet.

1.0: Uses Raindrop's new public API to make the search inside Alfred, so that you can open the bookmarks right from Alfred without having to ho through the Raindrop.io website first.

0.9: First version. Could only open the Raindrop.io website to view the results of your query, as Raindrop's public API was not released yet

 

CL8pp9+

 

Edited by andreas.w
New version 2.0.4
Link to comment
  • 3 weeks later...
22 hours ago, tylast said:

I'm sure you've seen that the public API is now available.  ;)

Yes :) 

I'm looking into that, so there might be an update soon for this workflow with the results right in Alfred, so you could select the bookmark you are looking for in Alfred and open that up in a web browser directly.

Don't know how soon it will be done, but I really want it myself, so it probably will happen anyway.

Link to comment
On 2/14/2020 at 1:17 PM, tylast said:

I'm sure you've seen that the public API is now available.  ;)

Didn't expect this to be done this fast when I wrote about it a few hours ago, but there is now a new version with support for Raindrop's new API, and thereby support for doing the actual search inside Alfred and open the bookmark in the web browser instead of opening the Raindrop.io search result page in the browser like before.

 

It's important to read and follow the instructions in the import dialog while importing this new version to Alfred, as this workflow will not work at all otherwise.

Link to comment

Released a new version with proper OAuth authentication built in, so that this is now handled in a simple to use way that is initiated directly from the workflow if it senses that you are not authenticated yet.

No traffic goes anywhere else then to Raindrop.io itself during this process, so everything stays 100% on your device only and when you accept that this workflow gets access to your account, you only accept that this workflow on your computer gets that access, nothing else.

Link to comment
On 3/9/2020 at 2:42 AM, dunkaroo said:

[Feature request]

Add bookmark to Raindrop, for example with keyword "ra button" the drop down list will show all the collection with the keyword "button" and pick the one you want to save to. :)

 

Thanks ! love it.

 

Just released version 1.2 with some smaller changes (check the changelog in the first post), and I think I will go for your suggestion next, probably within a few weeks.

 

I have looked into that a bit, and it seems like it will be possible to implement this really well for Safari and for all the Chromium based browsers (Chrome, Edge, Brave, Opera etc), but sadly not for Firefox, which is because as far as I can tell there is no way of getting the current URL from Firefox from a third party app/script without either doing some really hacky things to Firefox itself (which is bad), implementing a full Firefox extension for it (which seems like overkill for something like this), or automating a selection of the address bar and copying of its content, which would probably make Alfred close while that is happening, as it would lose focus, and still would not be a very nice solution even if it worked.

 

So, this would probably be a feature for practically all browsers except Firefox, but it could still work really well in those browsers, and in Firefox (just like the other browsers) there is always the official Raindrop.io extension for saving bookmarks.

I guess if we go by the statistics, not all that many people use Firefox anymore anyway? :) 

Link to comment
  • 3 weeks later...

Thank you! I love the idea of Raindrop and have wanted to try it for several years. Every time I consider it I get stuck on not having my bookmarks available in Alfred. This will at least justify me trying it out. 

 

On another note: don't write off Firefox - the user base is likely much higher than you think. Many people are switching back specifically because of FF's focus on privacy and security. This means a lot of Firefox users don't show up in publicly available statistics. And even in tools where vanilla FF users would show up, they use other privacy tools that will hide them. I can understand not implementing the feature because of the extra work, but please don't propagate the myth that FF support isn't important.

Link to comment
30 minutes ago, Sirmontegu said:

On another note: don't write off Firefox - the user base is likely much higher than you think. Many people are switching back specifically because of FF's focus on privacy and security. This means a lot of Firefox users don't show up in publicly available statistics. And even in tools where vanilla FF users would show up, they use other privacy tools that will hide them. I can understand not implementing the feature because of the extra work, but please don't propagate the myth that FF support isn't important.

 

I really like Firefox too. I used it for many years as my primary browser, and would probably still do that if I didn't just happen to like Safari even more in recent years.

But anyway, I really do want to support it together with all the other browsers, and because of the information that deanishe provided in an earlier comment here, and his great Firefox integration workflow, I have been able to make that work, and am testing and making the final touches on a version of this workflow that can add new bookmarks to Raindrop from all relevant browsers, including Firefox.

 

I will probably release it within a week or so, but if you want to try it out now, as it is at the moment, you can find the current development version on Github: https://github.com/westerlind/alfred-raindrop-search

Not really all that much information there about adding bookmarks yet, but the feature is there and works :) 

 

And just to make that clear, Firefox is already supported for searching and opening bookmarks. The part that was tricky to do in Firefox was adding bookmarks from it.

Edited by andreas.w
Link to comment
19 minutes ago, Sirmontegu said:

the user base is likely much higher than you think.


Debatable. You don’t need JavaScript analytics to know who’s using which browser.

 

19 minutes ago, Sirmontegu said:

please don't propagate the myth that FF support isn't important.


It’s not that Firefox support doesn’t matter, it’s that Firefox is almost impossible to support.

 

A fairly simple JXA script can get the title and URL of the active tab from any common-ish browser that isn’t Firefox.
 

But getting that info from Firefox is hellishly complicated and hacky because Mozilla doesn’t care about users like us.
 

So if you want workflows that support Firefox, get on Mozilla’s case to make it possible.

Link to comment
48 minutes ago, Zee said:

Oh that's fantastic! I can't see to get it working though. Only pulls up bookmarks for me. Am I missing something? Thanks

 

Sorry, I think I misunderstood you.

I was writing in the last posts, before your question, about the new feature coming any day now (and available on the github dev-version already) that makes it possible to add new bookmarks, and that feature does let you search for collections to add the new bookmark to.

You can't search for collections and list the bookmarks in them. At least not at the moment. I had not even thought of that until right now, but It is not a bad idea :)

I might add it later, but no promises about that right now.

Link to comment
On 4/2/2020 at 8:14 PM, Zee said:

If it's possible to search for specific collections to that would be amazing. Thanks

 

Version 1.4 is now available, and it now shows collections in the search results, and you can select them to browse or search their content.

Before you have started to type a search query, you also now have the option to browse your collections instead of starting with a search.

 

Get the new version here: http://www.packal.org/workflow/search-raindropio

 

On 4/4/2020 at 9:17 PM, alfredpleb said:

Posted to Pacmax, too ;)

 

Thanks :)

I started to put out the releases on GitHub too, which I didn't do at first, as that is needed to make it downloadable from Pacmax.

Pacmax is rather slow at updating it's information from GitHub, so the new version will probably not be visible there until a few hours from now, but it is downloadable from Packal and GitHub right now.

Edited by andreas.w
Corrected spelling
Link to comment
6 hours ago, andreas.w said:

 

Version 1.4 is now available, and it now shows collections in the search results, and you can select them to browse or search their content.

Before you have started to type a search query, you also now have the option to browse your collections instead of starting with a search.

 

Get the new version here: http://www.packal.org/workflow/search-raindropio

 

 

Thanks :)

I started to put out the releases on GitHub too, which I didn't do at first, as that is needed to make it downloadable from Pacmax.

Pacmax is rather slow at updating it's information from GutHub, so the new version will probably not be visible there until a few hours from now, but it is downloadable from Packal and GutHub right now.

 

You've outdone yourself! Thank you! Will give it a try now.

Link to comment

New version again! v1.5 with quite a few changes.

Primarily, you can now set the title to whatever you want and add tags when you create a new bookmark, and you also get tags in the search results so you can view or search bookmarks with that tag.

More info and details in the changelog in the first post

Get it here: https://www.packal.org/workflow/search-raindropio

 

I can't really think of anything that I miss in this workflow anymore now, so there probably won't be as frequent updates anymore going forward.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...