I wish Pocket estimated the reading time for each article. Fortunately you can manually add tags to each item. So this uses Pocket-API to adds reading time estimate tags to the last 20 items added to Pocket. Quick and dirty but it works.
Credit where it's due: This is similar to msramalho's reading time estimator. Msramalho's takes the link from Pocket, downloads and parses the HTML, and submits to an external API (http://niram.org/read/). This implementation simply uses the wordcount provided by Pocket API, divided by an assumed reading speed of 275 words per minute (which itself is based on Medium's estimates. This is easily changed if you read at a different speed.)
- Create your Pocket consumer key. To get the access token, you have to authorize the app on your own account.
- Install Pocket-API
pip install pocket-api
- Populate apikey.txt with your Consumer Key (on the first line) and Access Token (on the second line). apikey.txt.sample has been provided but will not work until you insert your own keys, and remove the .sample from the filename.
- Run the code
python readingSpeed.py