Skip to main content

Tools importing links from various services to Pinboard

Project description

Pintools

Command line tools for working with Pinboard.

Features:

  • Import starred repositories from Github
  • Copy saved reddit links
  • Organize tags based on originating site
  • Title fixer

Install

pip install pintools

Dev install

Requires pre-commit

$ git clone https://github.com/patrickleweryharris/pintools.git
$ cd pintools
$ make install

Dependencies

See requirements.txt

Usage

Pinboard Authentication

Pintools uses lionheart/pinboard.py to connect with Pinboard. Authentication is completed using your Pinboard API token, which can be found in settings->password on Pinboard.

Pintools will by default look for your Pinboard API token in $PINBOARD_API_TOKEN. Alternatively it can be specified using the --pinboard_token argument if you do not want to use the environment variable.

Sync Github Stars

Pintools can be used to copy Github stars to your Pinboard account. Starred gists are not currently copied.

Usage:

pintools github [-h] [--token TOKEN]

Github Authentication

Pintools uses PyGithub to connect to Github. In order to authenticate with Github, you will need to create a Personal Access Token in your Github account, with the read:user scope.

Pintools will look for this Personal Access Token in $PYGITHUB_ACCESS_TOKEN. Alternatively, this token can be specified using the --token arguement

Sync Reddit Saved Links

Pintools can be used to copy Reddit saved items to your Pinboard account. Note that new saved items can be saved via IFTTT, but if you want to back up the entirety of your saved links, you need to use a script like this because IFTTT will only work on new saved items.

Saved comments are not currently copied.

Usage:

pintools reddit [-h] [--secret SECRET] [--client_id CLIENT_ID] USERNAME PASSWORD

Reddit Authentication

Pintools uses PRAW to connect with Reddit. You will need to crate a developer application (personal use script) on Reddit in order to authenticate. Please follow the PRAW insructions on 'Password Flow' here.

Once you have created a personal use script application on Reddit, save the Client-ID and Client-Secret. By default, pintools will look for these in $REDDIT_CLIENT_ID and $REDDIT_CLIENT_SECRET. Alternatively, these can be specified using the --client_id and --secret arguments. Username and password for Reddit must also be provided on the command line.

Organize Pinboard links by originating site

Pintools can be used to tag each bookmark against the originating site, for easier organization. For example, any bookmark from github.com will be tagged with github.

Usage:

pintools tags [-h] [--config CONFIG_FILE]

This can be optionally customized using a config file. The config file can group several domains under one URL.

The config file uses YAML syntax like so:

domains: # list title must always be 'domains'
  utoronto: # Each key is the final tag you want on your bookmarks
    - utoronto # each item in the list is the base URL you want the tag associated with
    - cs.toronto # don't include .com or www.
  twitter:
    - t
    - twitter

There is an example config file here

Fix Titles

Pintools can fix bookmark titles for you, which sometimes get messed up when saving bookmarks automatically with IFTTT.

Usage:

pintools titles [-h] [--tag TAG]

In order to prevent accidentally nuking all your bookmark titles, this feature operates on a single tag. For each bookmark with the tag specified, pintools will grab the title of the URL, and update the bookmark's title in Pinboard.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pintools-1.0.3.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

pintools-1.0.3-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file pintools-1.0.3.tar.gz.

File metadata

  • Download URL: pintools-1.0.3.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.8.1

File hashes

Hashes for pintools-1.0.3.tar.gz
Algorithm Hash digest
SHA256 e0ea36e150521c5169021af5ed785f81f7e246debefc669834a0b59b9d975789
MD5 39abb8cf547f5d8ac5fc182bca68bfe9
BLAKE2b-256 b9319e63f6a12f164f407631e0ba6386a0a750339873dd76a948f08c6d98263c

See more details on using hashes here.

File details

Details for the file pintools-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: pintools-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.8.1

File hashes

Hashes for pintools-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 fc423604206de232c0a1028cde07d8225ddeaf1eddddb5fb1ada0caec3837fc1
MD5 1421345b9849f456c28845951ff6342a
BLAKE2b-256 b135b3445b1b9d308f1af73f01ef44bc838d98f74bb8331b135603c22d906254

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page