Jump to content
eknkc

Pinboard Search Workflow

Recommended Posts

Hi,

 

I just created an alternative Pinboard workflow that allows searching for pinboard bookmarks within Alfred. It can fetch data asynchronously, so there should not be delays during searches and the matching code has some fuzzy logic. Might come in handy for Pinboard users so I wanted to share.

 

NOTE: It requires Node.JS to be installed. Please get it from http://nodejs.org if you dont have Node.

 

Keywords:

 

pinboardauth username:TOKEN <- set access token (get it from https://pinboard.in/settings/password)

 

pb query <- search for query

pbunread <- items in read later list

pbreload <- force data reload

 

Hold cmd while selecting a bookmark to copy it's url to clipboard.

Hold ctrl while selecting to delete a bookmark from your pinboard.

 

Workflow:

http://d.ekin.io/L6QO

 

Source Code:

https://github.com/eknkc/alfred-pinboard

 

Let me know if it works for you.

Edited by eknkc

Share this post


Link to post

Posted a little update,

 

Cmd + Click copies URL of a bookmark.

Ctrl + Click deletes a bookmark from pinboard.

A couple of fixes.

Edited by eknkc

Share this post


Link to post

Posted another update with some improvements and additions:

 

- pbunread lists all bookmarks in "read later queue". when you select and open one here, it is automatically marked as read.

- pbreload to force reload data from server.

Share this post


Link to post

OMG, this is just plain AWESOME, thank you a LOT!!!!!!!!!!!!!!!!! :-)

 

Does it need node.js to be installed on my main machine?

Share this post


Link to post

I'm really curious to try this workflow out but the Droplr link is not working for me, I'm getting an Access Denied message.

Share this post


Link to post

I'm really curious to try this workflow out but the Droplr link is not working for me, I'm getting an Access Denied message.

 

Added a Dropbox link to first post. Droplr's been getting worse lately.

Edited by eknkc

Share this post


Link to post

So using the pinboardauth command, it didn't seem to be creating the config file. It successfully made the directory, but refused to create or write to the file. If anyone is having this problem, you can just make a config.json file in 

~/Library/Application Support/Alfred 2/Workflow Data/eknkc.pinboard/config.json

With the contents

{
	"token": "user:xxxxxxxxxxxxxxxxxxx"
}

I'm using node v0.8.9. I'm not sure if this is the release that changed the process.nextTick behavior or if your code is only for .9 +. Looking at search.js, it doesn't look like you are doing any error handling for this, which explains why even when the config creation fails, it reports that it's fine in the notification.

 

Sorry, I'd submit a pull request but I'm not familiar with your node style.

 

Update: Added ~ to denote that folder is actually in the user's home path

Edited by fform

Share this post


Link to post

I installed a fresh copy of node.js with Homebrew, using this technique. I also had to create a config.json file manually, as per fform's instructions. Trying to search (i.e. pb foo) results in it defaulting to the Google/Wikipedia/Amazon/etc. fallback search, and it won't load relevant bookmarks.

 

Any idea what could be causing this?

Share this post


Link to post

same here 

 

Actually, it works fine... all that I had to do was RTFM:

NOTE: It requires Node.JS to be installed. Please get it from http://nodejs.org if you dont have Node.

 

 

defaults to Google, Wikipedia etc for me as well.

Edited by ediventurin

Share this post


Link to post

Having some trouble with this. Was defaulting to Google, Wilipedia, etc as mentioned by others here. Made sure I had a fresh copy of node.js installed, then tried adding a config.json to ~/Library/Application Support/Alfred 2/Workflow Data/eknkc.pinboard/ as has also been suggested. Now it's not defaulting to Google, etc but every time I try to query it prompts me to supply my auth token. I've done that already with pinboardauth but it keeps asking for it.

 

pb.jpg

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