Coder Social home page Coder Social logo

pok's Introduction

pok - Pocket CLI

License Version
license version

Why Use It

  • Chrome extensions only gives saving options.
  • Website looks complex, rarely access it.
  • We use the mobile app.
  • So, for desktop users.

Features

  • Written in simple Python [O_O]
  • Terminal friendly :)
  • All methods avaliable **add,delete,list items**
  • Shell friendly
  • Blazing tool to integrate with your Pocket
  • Funny name ^_^
$ pip install pok

Usage

๐Ÿ‘ Basic Usage

Retrive data

$ pok ls                # gives the titles and ids of pocket items

๐Ÿ’ก Note: To get the links or urls from list use command in fullform. ls->list, sh->search, t->tag

$ pok list              # gives the urls and the title of pockets items
$ pok list 5            # you can also add a counter

๐Ÿ‘ Search

Search via Name and Tag

$ pok search google     # searches the url and the title of the pocket items

$ pok tag django        # list items of the tag name django
$ pok t python          # if you want to look at the ids of the pocket items

๐Ÿ‘ Modify

Delete and Add pocket item

$ pok delete <ID>       # deletes an pocket item

You can find the <ID> from $ pok ls command.

$ pok push <url> <tags>  # Rarely going to use this.

Adios

pok's People

Contributors

arindampradhan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pok's Issues

Feature request: Option to read article

Hi. First, I want to say: "What an awesome CLI tool!". I just tried several pocket cli tools, and yours is the first one that just works out of the box, with a very simple auth process ๐Ÿ‘ ๐ŸŽ‰

I would like to request an option to also read articles, for example:
pok read <id>

I am not very familiar with python (JavaScript is my main language), so can unfortunately not contribute immediately. But I am open to help with some guidance.

JSON ValueError: Extra Data on any pok command

I installed pok, and it gave me an authorization URL. I pasted it into my chrome, and accidentally validated it to the wrong account (a google plus account that had no Pocket data instead of my Pocket tied to a separate email). I removed the auth from the G+ account, uninstalled pok, and when I reinstalled, it didn't give me another authorization URL; it just successfully installed.

So if I go to write "pok ls" or any other pok command, I get the error below:

ALL
Traceback (most recent call last):
File "/usr/local/bin/pok", line 9, in
load_entry_point('Pok==0.1.0', 'console_scripts', 'pok')()
File "/Library/Python/2.7/site-packages/p/poc.py", line 172, in main
pull_all(command='ls', count=count)
File "/Library/Python/2.7/site-packages/p/poc.py", line 64, in pull_all
return render(res.json()['list'], link_flag=link_flag)
File "/Library/Python/2.7/site-packages/requests/models.py", line 819, in json
return json.loads(self.text, **kwargs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/init.py", line 338, in loads
return _default_decoder.decode(s)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 369, in decode
raise ValueError(errmsg("Extra data", s, end, len(s)))
ValueError: Extra data: line 1 column 5 - line 1 column 17 (char 4 - 16)

Googling tells me that it's an issue with json loading a list vs. a list of lists, but I'm not seeing any solutions on the user configuration side.

`pok add` doesn't do anything

What am I doing wrong?

$ pok push http://arxiv.org/pdf/1601.08188v1 "Lipreading with LSTM"
Usage:
  pok (ls   | list)   [COUNT]
  pok (sh   | search) <NAME>
  pok (t    | tag)    <NAME>
  pok (fav  | favourite)
  pok (unr  | unread)
  pok (arcv | archive)
  pok (json)
  pok (delete) <ID>
  pok (push)   <URL>  <TAGS>
Options:
  -h --help     Show this screen.
  --version     Show version.

Neither this nor pok add do anything (the add command is mentioned in the README but the push command is mentioned in the usage info).

KeyError: 'resolved_title'

$ pok ls

ALL
Traceback (most recent call last):
File "/usr/local/bin/pok", line 9, in
load_entry_point('Pok==0.1.0', 'console_scripts', 'pok')()
File "/usr/local/lib/python2.7/dist-packages/p/poc.py", line 172, in main
pull_all(command='ls', count=count)
File "/usr/local/lib/python2.7/dist-packages/p/poc.py", line 64, in pull_all
return render(res.json()['list'], link_flag=link_flag)
File "/usr/local/lib/python2.7/dist-packages/p/poc.py", line 143, in render
json_list = arrange(json_dict) # arrange with respect to timestamps
File "/usr/local/lib/python2.7/dist-packages/p/poc.py", line 133, in arrange
max_title_len, len(json_list[key]['resolved_title']))
KeyError: 'resolved_title'

pok tag does not work

I haven't yet figured out what may be wrong. But, pok tag TAG_NAME is not working for me. here is the trace:

(flaskenv)AK-Mac:pocket-pok ak$ pok tag cws

TAGGED RESULTS
Traceback (most recent call last):
File "/Users/ak/.virtualenvs/flaskenv/bin/pok", line 8, in
load_entry_point('Pok==0.1.0', 'console_scripts', 'pok')()
File "/Users/ak/.virtualenvs/flaskenv/lib/python2.7/site-packages/p/poc.py", line 197, in main
tag_item(arguments[''], link_flag=True)
File "/Users/ak/.virtualenvs/flaskenv/lib/python2.7/site-packages/p/poc.py", line 120, in tag_item
return render(res.json()['list'], link_flag=link_flag)
File "/Users/ak/.virtualenvs/flaskenv/lib/python2.7/site-packages/p/poc.py", line 143, in render
json_list = arrange(json_dict) # arrange with respect to timestamps
File "/Users/ak/.virtualenvs/flaskenv/lib/python2.7/site-packages/p/poc.py", line 133, in arrange
max_title_len, len(json_list[key]['resolved_title']))
KeyError: 'resolved_title'
(flaskenv)AK-Mac:pocket-pok ak$

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.