Fixup titles of Pinboard-bookmarked tweets
1M+
Pinboard archives my favorited tweets, but I don't like the titles. This project fixes them:
Get the API token from the Pinboard password page and set it as environment variable.
$ export PINBOARD_API_TOKEN=********
Likewise, get TWITTER_CONSUMER_KEY and TWITTER_CONSUMER_SECRET from Twitter and export them as variables. This is required in order to deal with the query limit Twitter imposes.
Run the tool:
$ pinboard-fixup-tweets
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-tweets:latest .
lpassscripts/generate-run-script > scripts/run.shIf desired, you may run the container manually:
$ docker run \
--env PINBOARD_API_TOKEN=******** \
--env TWITTER_CONSUMER_KEY=******** \
--env TWITTER_CONSUMER_SECRET=******** \
--name pinboard-fixup-tweets \
nerab/pinboard-fixup-tweets
Change the environment variables to suit your preferences. The following environment variables are evaluated (in ascending order of preference):
Run the previously generated scripts/run.sh. This will generate a new container from the image and execute the pinboard-fixup-tweets 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-tweets
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-tweets
docker pull nerab/pinboard-fixup-tweets
# This will fail in most cases because the container is only running once an hour
docker stop nerab/pinboard-fixup-tweets
docker rm nerab/pinboard-fixup-tweets
./scripts/run.sh
Content type
Image
Digest
Size
125.1 MB
Last updated
about 5 years ago
docker pull nerab/pinboard-fixup-tweets