Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ELLIOTTCABLE/pin-cushion
Simple, maintained CLI interface to the Pinboard.in API.
https://github.com/ELLIOTTCABLE/pin-cushion
Last synced: 4 days ago
JSON representation
Simple, maintained CLI interface to the Pinboard.in API.
- Host: GitHub
- URL: https://github.com/ELLIOTTCABLE/pin-cushion
- Owner: ELLIOTTCABLE
- License: isc
- Created: 2016-01-15T00:13:47.000Z (almost 9 years ago)
- Default Branch: Master
- Last Pushed: 2018-02-22T09:12:46.000Z (over 6 years ago)
- Last Synced: 2024-04-15T00:25:01.295Z (7 months ago)
- Language: JavaScript
- Size: 11.7 KB
- Stars: 126
- Watchers: 7
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.markdown
- License: COPYING.text
Awesome Lists containing this project
- awesome-starred-test - ELLIOTTCABLE/pin-cushion - Simple, maintained CLI interface to the Pinboard.in API. (JavaScript)
README
`pin-cushion`
=============
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:DEADBEEF1234567890This 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]:
### 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`](https://stedolan.github.io/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 pinsThis obviously lends itself to constructing complex shell pipes. Personally, I suggest aliasing
this:pc() { pin-cushion "$1" --format=json "$@" ;}