Skip to content
This repository has been archived by the owner on Nov 17, 2022. It is now read-only.
/ pocket2twitter Public archive

A Python script to keep your Twitter followers updated about your Pocket reading-list

Notifications You must be signed in to change notification settings

dnso86/pocket2twitter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pocket2tweet

A Python script to keep your followers updated about your reading-list!

It picks one of the articles from the linked Pocket account which is tagged as twitter for example and tweets a status update with it - then archives it.

Introduction

I find the app called Pocket immensely useful to maintain an ever-growing reading list of interesting articles that I could access later anywhere on any platform. I also have an account on Twitter where I regularly post interesting articles relevant to my line of work. However in order to share items saved in Pocket on Twitter, a checkbox is ought to be checked each time - also, we may save items to our Pocket that wouldn't be relevant to our Twitter at all.

Installation

  1. Create an App on Twitter Developers here, and make sure you have both Consumer API keys and a read-write Access token & access token secret.

  2. Create an Application on Pocket here. Doesn't need to be public.

  3. Get an Access Token for Pocket based on your Consumer Key - this is needed due to Pocket's Authentication API using OAuth 2.0 as detailed here. There is also an on-line tool for this task here but I haven't tried it yet.

  4. Add the tokens to config.py.

  5. Install pocket-api and twitter with: pip install pocket-api twitter

  6. Run pocket2tweet.py each time when you'd like to update your followers python pocket2tweet.py.

  7. You may obviously want to do the last automatically from cron, or set up a scheduled task for it on Windows.

Parameters

There are three optional command-line parameters:

  • --elapsed-hours: how many hours to wait after your most recent tweet - exiting otherwise. Defaults to 24.
  • --article-tag: which tag to look for in your Pocket. Default is twitter.
  • --random-delay: a random delay of at most the specified minutes before doing anything

Misc

Legal

License: CC BY-NC 4.0

This project is not endorsed by the vendors of Pocket and Twitter in any way and use it only at your own responsibility.

PRs are welcome - future ideas:

  • Only archiving the Pocket item if twitter is the only single tag - otherwise only removing it.

About

A Python script to keep your Twitter followers updated about your Pocket reading-list

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages