A simple, yet powerful, commandline client for your Pocket collection.
Links
About
Pocket is an application for managing a reading list of articles from the Internet.
pockyt is a commandline client that interfaces the pocket API and provides a way to interact with your Pocket collection. Using simple command sequences, routine tasks can be automated and reusable scripts can be created.
Privacy
pockyt does NOT track, store, or monitor your usage and/or data. Moreover, pockyt interacts with the pocket API using local credentials and does not attempt to communicate with any other services.
Installation
pockyt supports Python 2.7+ & 3.4+ on Windows, macOS, & GNU/Linux platforms.
Install pockyt:
pip install -U pockytConnect Pocket account:
pockyt regRefer the Examples & Documentation below.
Examples
Get the latest 5 items’ links & excerpts and save them to a file.
pockyt get -n 5 -f '{link} - {excerpt}' -o readlater.txtGet the oldest 10 items and delete them from Pocket.
pockyt get -n 10 -r oldest -f '{id}' | pockyt mod -d -i redirectGet all the items about ‘python’ and open them in a browser.
pockyt get -q 'python' -o browserGet all the links from a ‘links.txt’ and add them to Pocket.
pockyt put -i links.txtGet all favorited items and archive them.
pockyt get -v 1 | pockyt mod -a 1 -i redirectGet all favorited items and save offline copies of them.
pockyt get -v 1 -a ./pocket
Contribute
Feel free to contribute features, bugfixes, improvements, and usage ideas.
Fork pockyt.
Work on the source code.
git clone git@github.com:<username>/pockyt.git cd pockyt # runtime dependencies pip install -e . # devel dependencies pip install -r requirements.txt # do stuff git checkout -b new-feature # format files yapf -i -r . git add . git commit -am 'commit msg' git push origin new-featureSubmit a pull request.
License
This project uses the GNU GPLv3 License.
Documentation
pockyt help/-h/–help :
- help
show pockyt usage help
- reg
connect a pocket account
- get
get pocket collection, with useful item info
- put
add to pocket collection, using links
- mod
modify pocket collection, using item ids
pockyt reg -h :
- -h, --help
show this help message and exit
- --no-browser
use without browser i.e. print to console
pockyt get -h :
- -h, --help
show this help message and exit
- -c <type>, --content <type>
content type : <type> : {all, [article, video, image]}
- -s <state>, --state <state>
collection state : <state> : {all, [unread, archive]}
- -r <order>, --sort <order>
item sorting : <order> : {newest, [oldest, title, site]}
- -n <amount>, --count <amount>
number of items : <amount> : {-1: all, [n: amount]}
- -q <query>, --query <query>
search query : <query> : {None}
- -t <option>, --tag <option>
filter tag : {-1: nofilter, [tagname: tagged, 0: untagged}
- -v <option>, --favorite <option>
filter favorites : <option> : {-1: No Filter, [1: favorited, 0: un-favorited]}
- -d <domain>, --domain <domain>
restrict items to domain : <domain> : {None}
- -f <specifier>, --format <specifier>
format output : <specifier> : {‘{id} | {title} | {link}’, [id, title, link, excerpt, tags]}
- -o <option>, --output <option>
redirect output : <option> : {None, [browser, filename]}
- -a <path>, --archive <path>
save offline copies : <path> : path/to/archive/folder
- --since <YYYY-MM-DD>
only return items modified since : <YYYY-MM-DD>
pockyt put -h :
- -h, --help
show this help message and exit
- -f <specifier>, --format <specifier>
unformat input : <specifier> : {‘{link}’, [id, title, link, excerpt, tags]}
- -i <option>, --input <option>
obtain input : <option> : {console, [redirect, link, filename]}
pockyt mod -h :
- -h, --help
show this help message and exit
- -f <specifier>, --format <specifier>
unformat input : <specifier> : {‘{id}’, [id, title, link, excerpt, tags]}
- -i <option>, --input <option>
obtain input : <option> : {console, [redirect, filename]}
- -d, --delete
delete items
- -a <option>, --archive <option>
archive items : <option> : {-1: None, [1: archive, 0: unarchive]}
- -v <option>, --favorite <option>
favorite items : <option> : {-1: None, [1: favorite, 0: unfavorite]}
Metadata
Release files for pockyt 1.4.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pockyt-1.4.6.tar.gz | 24.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pockyt-1.4.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 48.5 kB
Release files / pockyt-1.4.6.tar.gz
| Download URL | pockyt-1.4.6.tar.gz |
|---|---|
| Size | 24.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b557750fbbffab4e4efd55bba86b7ce1d93b0ccb251dcc80d6a3afe5d706aa12
|
|
BLAKE2b-256 checksum How to use checksums |
ca3c000c7a33d8ba7ead346ca0c0f90afe2b321b07695799359082532e24168f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
|
Release files / pockyt-1.4.6-py3-none-any.whl
| Download URL | pockyt-1.4.6-py3-none-any.whl |
|---|---|
| Size | 24.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
123d5b5dcc0deb56a28da79b09d0e8eaaa3165aed1b9f694ec174b41048b650d
|
|
BLAKE2b-256 checksum How to use checksums |
6b76139d6bbc3157f7ec175f89bcd5019cdb4d82c1104be87637d9ee092bfd58
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
|