Fix the titles of your github bookmarks in pinboard
1M+
The page titles that github produces suck. The repo's description is much more useful. This script walks through all your Pinboard bookmarks that point to a github repo and updates its title to be of the form:
<project name>: <project description>
Set your github.com credentials in .netrc or any other of the ways supported by octokit.rb.
Get the API token from the Pinboard password page and set it as environment variable.
$ export PINBOARD_API_TOKEN=********
Run the tool:
$ bundle exec exe/pinboard-fixup-github-titles
The tool will read your github credentials from netrc.
An automated build on the docker hub creates a new image tagged with latest upon a git push.
Optionally, you can build the image manually:
# Build and tag as the latest version of the image
$ docker build --tag nerab/pinboard-fixup-github-titles:latest .
Install lpass
Generate the deployment script:
scripts/generate-deployment-script > scripts/run.sh
If desired, you may run the container manually:
$ docker run \
--env PINBOARD_API_TOKEN=******** \
--env GITHUB_ACCESS_TOKEN=******** \
--name pinboard-fixup-github-titles \
nerab/pinboard-fixup-github-titles
Change the environment variables to suit your preferences. The following environment variables are evaluated (in ascending order of preference):
GITHUB_LOGIN and GITHUB_PASSWORDGITHUB_ACCESS_TOKENGITHUB_CLIENT_ID and GITHUB_CLIENT_SECRETNETRC_FILE (not useful for docker deployments)Run the previously generated scripts/run.sh. This will generate a new container from the image and execute the pinboard-fixup-github-titles tool once. The container will then stop.
In order to run the tool regularly, copy the cron script scripts/ to /etc/cron.hourly/, e.g. with
docker-machine scp scripts/cronjob nr-docker:/etc/cron.hourly/pinboard-fixup-github-titles
The environment variables were passed when running the container for the first time, so there is no need to pass them to docker start again.
A container will not print its console messages to where it was started from. If you want to follow the execution, use docker logs:
$ docker logs -f pinboard-fixup-github-titles
docker pull nerab/pinboard-fixup-github-titles
# This will fail in most cases because the container is only running once an hour
docker stop nerab/pinboard-fixup-github-titles
docker rm nerab/pinboard-fixup-github-titles
./scripts/run.sh
Content type
Image
Digest
Size
115.3 MB
Last updated
over 5 years ago
docker pull nerab/pinboard-fixup-github-titles