https://github.com/achembarpu/pockyt
Automate & manage your Pocket.com collection.
https://github.com/achembarpu/pockyt
command-line-tool getpocket python
Last synced: 2 months ago
JSON representation
Automate & manage your Pocket.com collection.
- Host: GitHub
- URL: https://github.com/achembarpu/pockyt
- Owner: achembarpu
- License: gpl-3.0
- Created: 2014-10-26T08:04:26.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2024-04-25T08:43:14.000Z (over 1 year ago)
- Last Synced: 2025-07-08T09:08:18.305Z (4 months ago)
- Topics: command-line-tool, getpocket, python
- Language: Python
- Homepage:
- Size: 86.9 KB
- Stars: 504
- Watchers: 11
- Forks: 34
- Open Issues: 5
-
Metadata Files:
- Readme: README.rst
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-shell - pockyt - Read, Manage, and Automate your [Pocket](https://getpocket.com) collection. (Applications / Directory Navigation)
- awesome-starred-test - achembarpu/pockyt - Automate & manage your Pocket.com collection. (Python)
- awesome-cli-apps-in-a-csv - pockyt - Read, manage, and automate the collection of articles in [Pocket](https://getpocket.com), an application for managing a reading list of articles from the Internet. (<a name="online"></a>Online search and resources)
- awesome-cli-apps - pockyt - Read, manage, and automate the collection of articles in [Pocket](https://getpocket.com), an application for managing a reading list of articles from the Internet. (<a name="online"></a>Online search and resources)
- fucking-awesome-shell - pockyt - Read, Manage, and Automate your 🌎 [Pocket](getpocket.com) collection. (Applications / Directory Navigation)
README
======
pockyt
======
A simple, yet powerful, commandline client for your `Pocket `_ collection.
.. image:: http://img.shields.io/pypi/v/pockyt.svg?style=flat
:target: https://pypi.python.org/pypi/pockyt
.. image:: http://img.shields.io/pypi/l/pockyt.svg?style=flat
:target: https://pypi.python.org/pypi/pockyt
Links
-----
* `PyPi package `_
* `GitHub repository `_
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.
1. Install pockyt: :code:`pip install -U pockyt`
2. Connect Pocket account: :code:`pockyt reg`
3. Refer the Examples & Documentation below.
Examples
--------
* Get the latest 5 items' links & excerpts and save them to a file.
.. code::
pockyt get -n 5 -f '{link} - {excerpt}' -o readlater.txt
* Get the oldest 10 items and delete them from Pocket.
.. code::
pockyt get -n 10 -r oldest -f '{id}' | pockyt mod -d -i redirect
* Get all the items about 'python' and open them in a browser.
.. code::
pockyt get -q 'python' -o browser
* Get all the links from a 'links.txt' and add them to Pocket.
.. code::
pockyt put -i links.txt
* Get all favorited items and archive them.
.. code::
pockyt get -v 1 | pockyt mod -a 1 -i redirect
* Get all favorited items and save offline copies of them.
.. code::
pockyt get -v 1 -a ./pocket
Contribute
----------
Feel free to contribute features, bugfixes, improvements, and usage ideas.
1. `Fork `_ pockyt.
2. Work on the source code.
.. code::
git clone git@github.com:/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-feature
3. Submit 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 , --content
content type : : {all, [article, video, image]}
-s , --state
collection state : : {all, [unread, archive]}
-r , --sort
item sorting : : {newest, [oldest, title,
site]}
-n , --count
number of items : : {-1: all, [n: amount]}
-q , --query
search query : : {None}
-t , --tag
filter tag : {-1: nofilter, [tagname: tagged, 0:
untagged}
-v , --favorite
filter favorites : : {-1: No Filter, [1:
favorited, 0: un-favorited]}
-d , --domain
restrict items to domain : : {None}
-f , --format
format output : : {'{id} | {title} |
{link}', [id, title, link, excerpt, tags]}
-o , --output
redirect output : : {None, [browser,
filename]}
-a , --archive
save offline copies : : path/to/archive/folder
--since
only return items modified since :
**pockyt put -h** :
-h, --help show this help message and exit
-f , --format
unformat input : : {'{link}', [id, title,
link, excerpt, tags]}
-i , --input
obtain input : : {console, [redirect,
link, filename]}
**pockyt mod -h** :
-h, --help show this help message and exit
-f , --format
unformat input : : {'{id}', [id, title,
link, excerpt, tags]}
-i , --input
obtain input : : {console, [redirect,
filename]}
-d, --delete delete items
-a , --archive
archive items : : {-1: None, [1: archive, 0:
unarchive]}
-v , --favorite
favorite items : : {-1: None, [1: favorite,
0: unfavorite]}