Skip to content

aortbals/github-stars-to-pinboard

Repository files navigation

Github Stars to Pinboard Tests Status

github-stars-to-pinboard is a command line utility for syncing GitHub starred repos to Pinboard.

github-stars-to-pinboard CLI Usage

Features

  • Mirrors as much metadata as possible from GitHub to Pinboard
    • Repo Name
    • Repo Description
    • The Pinboard bookmark time reflects the same time the user starred the repo
    • Mirrors repo topics to Pinboard tags and includes a default tag of github-starred
  • Pagination support for iteration through starred repos
  • Smart rate limits to prevent 429s
  • Tracks last seen starred repos for fast subsequent runs (designed for cron, or similar)

Usage

To use github-stars-to-pinboard, download a release build for your OS distribution. These are standalone binaries that do not require Node.js or NPM.

github-stars-to-pinboard requires two environment variables. Ensure these are available in the environment you plan on running the script. dotenv is also supported. Create a GitHub personal access token with read:user permissions. Your Pinboard API token is available here.

GITHUB_ACCESS_TOKEN=xxxxxx
PINBOARD_API_TOKEN=xxxxxx

Run it:

./github-stars-to-pinboard

Run it daily as a cronjob, outputting the logs to a file:

@daily bin/github-stars-to-pinboard >> logs/github-stars-to-pinboard.log 2>&1

Config file

github-stars-to-pinboard writes a .gstp-config file to your home directory. This file tracks the last starred repos that we're processed.

Development

Install the dependencies:

yarn

Run the tests:

yarn test

Run the CLI locally:

yarn dev