• This repository has been archived on 05/Jul/2022
  • Stars
    star
    145
  • Rank 254,144 (Top 6 %)
  • Language
    Go
  • Created almost 11 years ago
  • Updated over 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Alfred Workflow for Pinboard (written in Go (golang))

The project is in maintanance mode. An improved/feature rich alternative is now being developed using Rust: alfred-pinboard-rs

Rust-based project is replacing this one. The new project works with Alfred 3's better and offers a range of new features such as tag suggestion, pin preview in Alfred, pin deletion, improved control over posting and better configuration option.

Alfred Workflow for Pinboard

There are probably similar Alfred Workflows out there but my main motivation for writing this was to learn the Go language.

(Alfred forum's post for this workflow: http://goo.gl/zVgTFW)

Features

Pinboard is a great and reliable bookmarking service. Its front page sums it all: "Social Bookmarking for Introverts. Pinboard is a fast, no-nonsense bookmarking site."

This plugin will let you:

  • post a bookmark to Pinboard right from Alfred. It has 'tag' autocomplete feature that will help you in selecting proper tags for the bookmark.
  • search your current bookmarks

For posting you just need to enter the Workflow's keyword ( p ) into Alfred's window and follow it with couple of tags and an optional description. The workflow will then post a bookmark for the window/tab of the active browser to Pinboard.

Supported Browsers:

  • Chrome
  • Chromium
  • Firefox
  • Safari
  • Vivaldi
  • Firefox Dev. Edition
  • Safari Tech. Preview

For searching, use ( ps ) and then type the search keywords.

Installation

After downloading the latest version of the workflow and installing it in Alfred, you need to do a one-time setup to authenticate the Workflow. This Workflow only uses username/token method so you won't need to enter your password. (This is the suggested way of using Pinboard's API). If you don't have a token, get one from Pinbaord's settings page.

Then invoke Alfred and enter your username:token after the "pa" keyword:

image

This workflow will keep a local cache of the tags that you have in Pinboard. To update the cache, you need to issue the "pu" command:

image

Use this command once in while to keep the local cache up-to-date.

Usage (post a bookmark):

The syntax to post a bookmark to Pinboard is :

p tag1 tag2 tag3 ; some optional note

The workflow will show a list of your current tags as you enter the command:

image

The number below each tag shows how many times you have used it in your Pinboard service. You can move Alfred's highlighter to the desired tag and hit 'Tab' to autocomplete it.

image

To finish the process just press Enter. If you want to add extra description to the bookmark you can add it after the semi-colon:

image

Extra: Adding toread anywhere after semi-colon will set the toread flag on bookmark.

toread

Usage (search bookmarks):

Searching your bookmarks is easy.

ps search1 search2 search3

Workflow will use the text you enter in Alfred and show list of bookmarks that contain all of the search keywords in any of the bookmarks information (Desrciption of bookmark, its tags and url and its extended notes). So the more search keywords you enter the less results will be displayed as it tries to find the bookmarks that contain all of the keywords.

The search result is ordered in descending order of dates they were posted to your Pinboard account.

image

Additional Settings

  • To enable/disable fuzzy search of tags/bookmarks, use: pset fuzzy and then select one of the options.

image

When fuzzy search is enabled, the tags/bookmarks that contain the query letters in the given order are displayed:

image

  • If you only want to search tags (using ps tag_name command), set the options like this:

    • pset tagonly

    image

  • To enable/disable sharing the bookmarks, use:

    • pset shared

    image

  • To enadle/disable auto-updating of the cache that this workflow uses for searching, use the following. Note that by enabling the auto-update, workflow will fetch all your bookmarks from Pinboard after every new bookmark you create using it:

    • pset auto

    image

  • You can set the max. number of tags or bookmarks that you want to be displayed using these two keywords:

    • pset tags
    • pset bmarks

    image image

  • You can show the current settings value using: pset show

    Hitting enter on each item will let you set that option.

image

Alfred Helper for Go

In the process of writing this workflow, I have written a small but full feature Go package that helps with the development of the Alfred workflows in Go. It's very similar to other Alfred Helpers just written in Go language, you can check it out at:

https://bitbucket.org/listboss/go-alfred

TODO / Missing features

I wish to add the following in the coming releases:

  • Add capability to search the bookmark within Alfred
  • Add popular (public) tags to the tag suggestion list.
  • Add support for Delicious API. (Pinboard bought Deliciout and closed it off! 😌)

Feedback / Bugs

This is my first non-trivial project using Go language so so your feedback or bug reports are greatly appreciated.