{"id":21684035,"url":"https://github.com/cgkantidis/pocket-cli","last_synced_at":"2025-04-12T07:51:42.728Z","repository":{"id":86015966,"uuid":"560141441","full_name":"cgkantidis/pocket-cli","owner":"cgkantidis","description":"A CLI (Command Line Interface) for Pocket (getpocket.com)","archived":false,"fork":false,"pushed_at":"2024-09-05T19:45:42.000Z","size":50,"stargazers_count":7,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-26T03:04:54.321Z","etag":null,"topics":["cli","getpocket","pocket"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cgkantidis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-31T20:29:26.000Z","updated_at":"2024-12-23T17:19:12.000Z","dependencies_parsed_at":"2023-03-11T23:15:30.981Z","dependency_job_id":"cbc4e963-5306-4012-9423-5c926f390159","html_url":"https://github.com/cgkantidis/pocket-cli","commit_stats":null,"previous_names":["cgkantidis/pocket-cli"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgkantidis%2Fpocket-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgkantidis%2Fpocket-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgkantidis%2Fpocket-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgkantidis%2Fpocket-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cgkantidis","download_url":"https://codeload.github.com/cgkantidis/pocket-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248537005,"owners_count":21120690,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","getpocket","pocket"],"created_at":"2024-11-25T16:14:23.259Z","updated_at":"2025-04-12T07:51:42.721Z","avatar_url":"https://github.com/cgkantidis.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A Pocket CLI (Command Line Interface) to view and modify your Pocket list from the terminal\n\n`pocket-cli` uses Python 3 `requests` to communicate with Pocket's API, to retrieve your list of saved-for-later items,\nand displays them on the terminal.\n\nThe first time you run `pocket-cli`, it will authenticate you by making a request to your Pocket account. A browser\nwindow will open (if you're not signed into Pocket it will ask you to sign-iin first), and you will be asked if you want\nto allow `pocket-cli` to access your Pocket list.\n\nAfter you have authorized `pocket-cli` to access your list, it will store your access token into `~/.pocket` for future\nuse.\n\nThrough `pocket-cli`'s prompt, you can:\n\n* `[v]iew` an item\n* `[d]elete` an item\n* `[d]elete [a]ll` items\n* `[.] domains` filtering\n* `[vd]` (view and delete) an item at the same time\n* `[l]ength` show only items in a length group\n* `[f]ilter` the items by keyword\n* `[s]ort` the items based on reading time or time added\n* `[t]ag` the items with the needed time to read\n\nViewing an item will open the link to your default browser.\n\nDeleting an item will synchronize the change to your Pocket list.\n\n# How to run\n\nAfter you clone the repo, you can either run `pocket-cli.py` directly, or recreate it like so:\n\n```python3\n#!/usr/bin/env python3\n\nfrom pocket_comm import Pocket\nfrom pocket_prompt import PocketPrompt\n\nif __name__ == \"__main__\":\n    pocket = Pocket()\n    pocket.authenticate()\n    prompt = PocketPrompt(pocket)\n    prompt.prompt()\n```\n\nThe `authenticate()` function will make all the necessary steps to authenticate you to pocket, asking for access the\nfirst time, or using the stored access token for subsequent runs.\n\nThe `prompt()` function will display a tabulated list of your items. The prompt line will ask you which operation you'd\nlike to perform.\n\nHere's a truncated example using my list:\n\n```\n     20  Ars Technica   The future exists now: Bringing William Gibson’s The Peripheral to televisi  https://arstechnica.com/?p=1891572  2022-11-12 10:21:51              11          2306\n     19  Ars Technica   Biotechnology is creating ethical worries—and we’ve been here before         https://arstechnica.com/?p=1893728  2022-10-30 09:33:43              10          2247\n     18  Ars Technica   Coinbase users scammed out of $21M in crypto sue company for negligence      https://arstechnica.com/?p=1890656  2022-10-18 13:58:31              10          2116\n     17  Ars Technica   No fix in sight for mile-wide loophole plaguing a key Windows defense for y  https://arstechnica.com/?p=1887240  2022-10-06 14:20:55              10          2043\n     16  Ars Technica   Meta disrupted China-based propaganda machine before it reached many Americ  https://arstechnica.com/?p=1885001  2022-09-28 09:00:04              12          2640\n     15  Ars Technica   How electric cars could rescue the US power grid                             https://arstechnica.com/?p=1882783  2022-09-21 09:25:56              10          2067\n     14  Ars Technica   The Big Bang should have made cracks in spacetime—why haven’t we found them  https://arstechnica.com/?p=1871473  2022-09-21 09:25:02              15          3117\n     13  Ars Technica   Why are hard drive companies investing in DNA data storage?                  https://arstechnica.com/?p=1881626  2022-09-19 14:18:21              10          2081\n     12  Ars Technica   Punishment, puppies, and science: Bringing dog training to heel              https://arstechnica.com/?p=1881676  2022-09-19 14:12:19              15          3138\n     11  Ars Technica   Cloudflare explains why Kiwi Farms was its most dangerous customer ever      https://arstechnica.com/?p=1879770  2022-09-09 09:57:52              12          2587\n     10  Ars Technica   Cheap, high capacity, and fast: New aluminum battery tech promises it all    https://arstechnica.com/?p=1875891  2022-08-27 20:02:36              10          2177\n      9  Ars Technica   Should we be trying to create a circular urine economy?                      https://arstechnica.com/?p=1874923  2022-08-21 13:59:28              11          2259\n      8  Ars Technica   Solving the rock-hard problem of nuclear waste disposal                      https://arstechnica.com/?p=1872652  2022-08-18 08:54:00              18          3926\n      7  Ars Technica   De-extinction company sets its next (first?) target: The thylacine           https://arstechnica.com/?p=1873897  2022-08-17 07:39:48              12          2472\n      6  Ars Technica   Man who built ISP instead of paying Comcast $50K expands to hundreds of hom  https://arstechnica.com/?p=1872522  2022-08-10 23:37:25              10          2230\n      5  Ars Technica   Locked-in syndrome and the misplaced presumption of misery                   https://arstechnica.com/?p=1872126  2022-08-09 21:52:04              15          3217\n      4  Ars Technica   How Tor is fighting—and beating—Russian censorship                           https://arstechnica.com/?p=1870005  2022-07-30 01:08:15              10          2105\n      3  Ars Technica   Discovery of new UEFI rootkit exposes an ugly truth: The attacks are invisi  https://arstechnica.com/?p=1869307  2022-07-26 23:07:56              12          2571\n      2  Ars Technica   Nuclear power plants are struggling to stay cool                             https://arstechnica.com/?p=1868886  2022-07-23 10:04:19              10          2195\n      1  Ars Technica   Electric cars are doomed if fast charger reliability doesn’t get better      https://arstechnica.com/?p=1866587  2022-07-14 16:09:25              10          2101\n-------  -------------  ---------------------------------------------------------------------------  ----------------------------------  -------------------  --------------  ------------\n  Index  Domain Name    Title                                                                        URL                                 Added                  Time to Read    Word Count\n\n[v]iew \u003cindex\u003e  |  [d]elete \u003cindex\u003e  |  [d]elete [a]ll  |  [.] domains  |  [vd] \u003cindex\u003e  |  [u]pdate  |  by [l]ength  |  [f]ilter \u003ckeyword\u003e  |  [s]ort  |  [t]ag  |  [q]uit \u003e\n```\n\n# Ideas/Bugs\n\nAny ideas for improvement or bugs found are welcome. Please open a GitHub Issue.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcgkantidis%2Fpocket-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcgkantidis%2Fpocket-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcgkantidis%2Fpocket-cli/lists"}