Giter Club home page Giter Club logo

pin-cushion's Introduction

pin-cushion Maintenance status: Last active in 2018Versions & releasespin-cushion on the NPM registryOpen-source licensing detailsChat on FreenodeTwitter followers

A simple command-line [Pinboard.in][] client:

pin-cushion [verb] [arguments]
pin-cushion posts/recent
pin-cushion posts/suggest --url "http://www.ponylang.org"

pb-rename() {
   pin-cushion tags/rename --old "$1" --new "$2"
}

You get the idea. To use it, you must first record [your authentication token][auth] for the API:

npm install -g pin-cushion
pin-cushion --auth elliottcable:DEADBEEF1234567890

This only provides abstracted access to the Pinboard API as defined on their site:

Any Pinboard API method described there may be passed as the verb; and all described arguments are accepted as command-line flags. These are not stored in this library; as your command-line instructions are simply converted directly to API calls; so this tool probably doesn't need much in the form of maintenance. :P

[Pinboard.in]: <https://pinboard.in/ [auth]: https://pinboard.in/settings/password

Piping and JSON output

If not explicitly passed a --format parameter, then pin-cushion will spit out a formatted object-description of the response, intended for human consumption. If a format is explicitly provided, then the response from the server will be printed, unmodified; this is particularly useful with the jq command-line JSON manipulation tool:

pin-cushion posts/recent --format=json | jq                      # Simply pretty-print
pin-cushion posts/recent --format=json | jq '.posts[] | .href'   # Extract URLs of recent pins

This obviously lends itself to constructing complex shell pipes. Personally, I suggest aliasing this:

pc() { pin-cushion "$1" --format=json "$@" ;}

pin-cushion's People

Contributors

elliottcable avatar waldyrious avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

semtle prodject

pin-cushion's Issues

Typo in README

The final line is missing an 'H' in "pin-cushion":

pc() { pin-cusion "$1" --format=json "$@" ;}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.