Jump to content
vitor

PinPlus — Interact with your Pinboard bookmarks

Recommended Posts

I am executing the workflow like this [1]. Notice the two hotkeys.

 

I have got a hotkey –  cmd + .  – linked to the `pin` filter. So I just click those two keys and start typing. You are of course correct, I see now there is a cache. 

 

I guess you don't face my problem because you type `pin` instead of using a hotkey, so the delay is not noticeable in your case. In my case if you click fast enough you definitely miss some keys. I think this is just the delay in the execution of the script that loads the results; input is not handled while waiting for the initial script results. No way to work around that.

 

I second your suggestion to decrease the update frequency. 

 

[1]

5a01db7f8e5e7_Capturadepantalla2017-11-07alas17_12_29.thumb.png.493ddc7cb8e96cdfcd39b28d56052ceb.png

 

 

Share this post


Link to post
13 minutes ago, Nerian said:

I have got a hotkey –  cmd + .  – linked to the `pin` filter.

 

Are you sure you don't still have a finger on ⌘ when Alfred "ignores" a letter? That's by far the most common cause when that happens.

 

21 minutes ago, Nerian said:

In my case if you click fast enough you definitely miss some keys. I think this is just the delay in the execution of the script that loads the results

 

Again, I don't think it's related to the workflow. Alfred pops up its window, ready for input, and then loads the workflow. If you're sure you're letting go of ⌘, then I think it's most likely that you're trying to enter your query before Alfred's window has taken focus and is accepting input. You can test this by adding sleep 2 to the script. The workflow now takes 2 seconds longer to load, but Alfred doesn't take 2 seconds longer to be responsive.

 

27 minutes ago, Nerian said:

I second your suggestion to decrease the update frequency. 

 

I think a workflow/environment variable would be a good fit for that. 10 minutes is perhaps a great choice for hardcore Pinboarders, but I only add a couple of bookmarks a week, so every few hours would be much more appropriate for me.

 

FWIW, if you don't have a huge number of bookmarks, you could try combining this workflow with my fuzzy search helper. It'd take a bit of wrangling (you'd need to move the main Script Filter into an external script), but that would match "art" to "deviantart". But as noted above, it will be significantly slower than using Alfred's native search, which will become very noticeable if you have over, say, 2000 bookmarks.

 

Share this post


Link to post

Not really relevant to this workflow per say. But I was always curious, why do people use Pinboard?

 

I don't see any value in it because you can do all the same things with a normal bookmark manager, I think. Aside from sharing publicly your bookmarks with other Pinboarders. And that OCR text index that Pinboard provides which is probably useful. Oh and you can already tag bookmarks natively by simply adding the tags after the bookmark name like so : 

 

2VbtAxy.png 

 

What I do is that I expose nearly all my bookmarks through my Alfred Mind workflow so that anyone can tap into into the bookmarks I use at any time. Perhaps there is something I am missing but I tried Pinboard free trial once and didn't get it. 

 

The only thing I appreciate about Pinboard is its popular tab which occasionally has some interesting stuff.

Edited by nikivi

Share this post


Link to post

I use my bookmarks for pages I will visit regularly. Pinboard is for things I that I know I will probably want again at some point, but not regularly.

 

Things like articles about SQL joins or interesting libraries, which I know I won’t remember.

 

It also offers good integration with apps and other tools.

 

I’ve had a Pinboard account for many years, so I don’t pay a subscription for it.

Share this post


Link to post

I rarely use Safari when I have power, but always on battery. Pinboard, especially with an Alfred workflow, is a smooth way to have bookmarks independent of your browser. I assume there are other solutions, but habit and so on.

Share this post


Link to post
12 minutes ago, TheDonk said:

I assume there are other solutions, but habit and so on.

 

I use the BookMacster app to sync bookmarks between browsers, but it's a bit buggy and I still don't really fully understand how to use it (the UI is extremely complicated).

 

Out of interest, how do you handle switching between browsers? Do you just change the default browser so Alfred/the workflow opens URLs in the correct app, or is it some workflow magic?

Share this post


Link to post
18 minutes ago, deanishe said:

 

I use the BookMacster app to sync bookmarks between browsers, but it's a bit buggy and I still don't really fully understand how to use it (the UI is extremely complicated).

 

Out of interest, how do you handle switching between browsers? Do you just change the default browser so Alfred/the workflow opens URLs in the correct app, or is it some workflow magic?

 

I use this one to change default browser, there is also a cli tool "defaultbrowser", so it's possible to use something like Hammerspoon to react to system events (like on AC or not) and call it. In addition, I have a small workflow if I want to keep all my tabs - https://www.dropbox.com/s/w14q8t4vk6utvpu/Switch Browser.alfredworkflow?dl=0 . It just takes all tabs from Vivaldi and opens them in Safari or vice versa

 

Share this post


Link to post

Thanks. That’s really interesting. I had no idea Hammerspoon could do that. I’ll have to look into that, as I currently use ControlPlane for that sort of thing, but I find it terribly clunky.

Share this post


Link to post

Update.


Added minutes_between_checks variable. It defaults to 10 and can never be lower than that. Pinboard’s API documentation says it should never be lower than 5, but it pays to be careful. Maciej seems generally fair, but he’s also ruthless with blocking API abusers (unlikely in regular human usage).

 

Everything else has already been answered (thank you @deanishe!).


To update, download the latest version (same URL) or wait a few days and it’ll prompt you to on next usage, since it uses OneUpdater.
 

Share this post


Link to post

Installed this workflow and I can use the hotkey to add unread bookmarks fine, and I can search for bookmarks fine also. However, when I use "pa", no window pops up for me to add a regular bookmark. In Safari, Develop -> Allow JavaScript from Apple Events, is checked. Safari is not blocking pop-up windows. What else am I missing?

Edited by WyldKard
typo

Share this post


Link to post

I'm also not seeing anything when I do pa

 

debug output:

[2017-11-16 12:06:13][input.keyword] Processing output of 'action.script' with arg ''
[2017-11-16 12:06:13][action.script] Processing output of 'action.script' with arg ''

Interestingly, hotkey trigger does work.

 

I just added this page to pinboard using the hotkey. pa did nothing

 

I'm using Safari 11.0.1 (13604.3.5), macOS 10.13.1 (17B48)

 

Develop "Allow JavaScript" options enabled

Edited by gingerbeardman

Share this post


Link to post

My debug output is the same a gingerbeardman's:

 

[2017-11-16 15:11:23][input.keyword] Processing output of 'action.script' with arg ''
[2017-11-16 15:11:23][action.script] Processing output of 'action.script' with arg ''

 

Share this post


Link to post
2 hours ago, WyldKard said:

Latest version of High Sierra.

 

I suspected as much. I’m not yet on High Sierra, so I can’t test. No ETA yet as to when I’m going to upgrade; I always do a clean install so it requires some planning and free time.

Share this post


Link to post

Back to the discussion of why people use Pinboard....because del.icio.us went yahoo and mag.nol.ia had an irrecoverable data loss....

 

I started using delicious about 12 years ago when I wanted a way to sync my bookmarks in Opera for win xp with my new iMac.  Switched to Pinboard a couple years later and never looked back.  Even though I’ve been off Windows since 2006 or so I’d never consider leaving now, mostly because of the tag-based organization - vastly preferable to folders for reference materials.

Share this post


Link to post

pa doesn't work for me but the hotkey does still work. Odd, right?

 

This means the issue on High Sierra is in the open_gui function, which only calls the run_bookmarklet JavaScript. Which got me thinking... why run one line of ruby, to run another line of ruby, to run some JavaScript? Seems overly complicated.

 

So I replaced the ruby script action (which ran open_gui ruby, which ran run_bookmarklet javascript) with an action that runs an osascript JS with the code from run_bookmarklet pasted in directly. Now pa works just fine for me. :)

 

Feel free to include this change in your workflow. I thought about uploading my modified workflow but settled on these screenshots instead.

 

 

Screen Shot 2017-11-20 at 12.41.36.png

Screen Shot 2017-11-20 at 12.41.42.png

Edited by gingerbeardman

Share this post


Link to post
23 hours ago, gingerbeardman said:

pa doesn't work for me but the hotkey does still work. Odd, right?

 

Not really. They use very different methods of adding a bookmark. pa relies only on your browser and the Hotkey solely on the Pinboard API.

 

23 hours ago, gingerbeardman said:

why run one line of ruby, to run another line of ruby, to run some JavaScript?

 

For internal script consistency and because the open_gui originally didn’t work like that and might change in the future.

 

23 hours ago, gingerbeardman said:

So I replaced the ruby script action (which ran open_gui ruby, which ran run_bookmarklet javascript) with an action that runs an osascript JS with the code from run_bookmarklet pasted in directly. Now pa works just fine for me. :)

 

Feel free to include this change in your workflow. I thought about uploading my modified workflow but settled on these screenshots instead.

 

I’m glad you got it working! I’ll consider making the change, though at the time I’m more interested in why that isn’t working on High Sierra and would rather explore that after I upgrade.

Share this post


Link to post
2 hours ago, gingerbeardman said:

I got your new version and you seem to have solved the problem?

 

Good to know! I was fixing another (related) bug and did wonder if it’d fix this one.

Share this post


Link to post

Update.


When adding unread, show tab title and URL in notification.


To update, download the latest version (same URL) or wait a few days and it’ll prompt you to on next usage, since it uses OneUpdater.

Share this post


Link to post

Update.

 

If you have the PinPlus app installed, pa opens that instead. This is particularly useful in cases where you want to add an incognito tab or from another profile where you’re not logged in, since the app will already have that information.


To update, download the latest version (same URL) or wait a few days and it’ll prompt you to on next usage, since it uses OneUpdater.

Edited by vitor

Share this post


Link to post

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...