List, archive, delete, or favorite multiple articles in your Pocket list at once based on their tags and/or added date.
List all articles added since 2018-04-08:
pocket-tool list --since 2018-04-08
Archive each article tagged with both "ifttt" and "nyt", but not "politics":
pocket-tool archive -t ifttt -t nyt -T politics
Delete all articles added more than 4 days ago:
pocket-tool delete --before $(date -v-4d +%Y-%m-%d)
Favorite all archived articles without the tag "ifttt":
pocket-tool favorite --archived --without-tag ifttt
pocket-tool [--version] [--help] <command> [<options>]
-q --quiet
|
Don’t print article list. |
-m --markdown
|
Print articles as links in a Markdown list format. |
list [<criteria>]
|
List articles matching <criteria> . This command doesn’t modify any articles.
|
favorite [<criteria>] unfavorite [<criteria>]
|
Favorite or unfavorite articles matching <criteria> .
|
archive [<criteria>] unarchive [<criteria>]
|
Archive or unarchive articles matching <criteria> .
|
delete [<criteria>]
|
Delete articles matching <criteria> .
|
auth <consumer-key>
|
See Authentication. |
These options are used to limit a command to only act on certain articles. Only articles that match every given criteria are acted on.
-t --with-tag <tag>
|
Match articles with <tag> .
|
-T --without-tag <tag>
|
Do not match articles with <tag> .
|
-a --archived
|
Match archived articles. |
-A --not-archived
|
Match articles in “My List” (articles that aren’t archived). |
-f --favorited
|
Match favorited articles. |
-F --not-favorited
|
Match articles that aren’t favorited. |
-b --before <YYYY-MM-DD>
|
Match articles added before <YYYY-MM-DD> .
|
-s --since <YYYY-MM-DD>
|
Match articles added since <YYYY-MM-DD> .
|
If --archived
/--not-archived
is not used, both archived and not archived articles are matched.
If --favorited
/--not-favorited
is not used, both favorited and non favorited articles are matched.
Install with Homebrew
$ brew install ernstwi/tap/pocket-tool
make
to build.
make install
to move the built binary to /usr/local/bin/pocket-tool
.
Before you can use pocket-tool
, you must create a Pocket consumer key, and authenticate the app by running pocket-tool auth <consumer-key>
. This will create a private access token, which is stored along with your consumer key in ~/.pocket-tool
.