Skip to content

💩 Read while taking a dump. Tags articles on GetPocket that take 5min or less to read.

License

Notifications You must be signed in to change notification settings

augustohp/reading-dump

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reading dump - Spend 5 minutes reading something

You've added a lot of articles into Pocket and forgot to read them? Well, we tag articles that are 5 minutes long so you read them while taking your next dump.

Quick start

This is bad, but it should work. First you need this requirements:

  1. PHP 5.4.0 or greater (php as the command will be inferred from now on).
  2. Composer installed (composer.phar as the command will be inferred from now on).
  3. Git installed (git will be inferred).
$ git clone git@github.com:augustohp/reading-dump.git
$ cd reading-dump
$ composer.phar install
$ export POCKET_APP_CONSUMER_KEY="68036-0687e76e71d1c40d0fa1cca5"
$ php -S 127.0.0.1:8080 -t www/

You should now be able to create an access token opening this page in your browser. Make sure you export your access token in the terminal you are going to use. The mechanics are separated into different commands so it is easier to refactor them into reusable components in the future - or just because I've not put any thoughts whatsoever into making them:

  1. Display a list of unread articles, one per line, displaying item-id, since and word count.
  2. Filter articles that are 5 minute long from the list.
  3. Tag articles by their article-id as reading-dump.

This looks like something like this, you can cron that:

$ export POCKET_APP_ACCESS_TOKEN="the token generated by previous page"
$ php reading-dump.php pocket-retrieve --limit 10 --since 1497812212 | \
    php reading-dump.php filter-reading-time --less-than-min 5 |
    php reading-dump.php pocket-tag --tag "reading-dump"

TO DO

A list of ideas that might be interesting:

  • Make comments accept streams and direct arguments at the same time.
  • Retrieve the access token through console (no web page on our end needed).
  • Maintain a $HOME/.reading-dump.ini file with access token and other useful states.
  • Implement a pager so limit and offset can be inferred.
  • Offer a single command reading-dump.phar cron-daily.
  • Make it beautiful (E.g: allow different sources and outputs, send to kindle).

About

💩 Read while taking a dump. Tags articles on GetPocket that take 5min or less to read.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages