achembarpu / pockyt Goto Github PK
View Code? Open in Web Editor NEWAutomate & manage your Pocket.com collection.
License: GNU General Public License v3.0
Automate & manage your Pocket.com collection.
License: GNU General Public License v3.0
Hey there,
after upgrading my python and seeing the error message, does anything prevent pockyt
from running on 3.7? As far as I know, there have been breaking changes.
Many thanks!
I can't tell which versions of Python this project supports. By the looks of it, I may need to be using Python 3.x.
This may also invalidate #1 depending on how config parsing works in 3.x.
Attempting to pip install pockyt
currently fails with:
running build
running build_py
Traceback (most recent call last):
File "setup.py", line 53, in <module>
'pockyt=pockyt.pockyt:main',
File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/distutils/command/build.py", line 127, in run
self.run_command(cmd_name)
File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/site-packages/setuptools/command/build_py.py", line 51, in run
self.build_packages()
File "/usr/lib/python2.7/distutils/command/build_py.py", line 373, in build_packages
self.build_module(module, module_file, package)
File "/usr/lib/python2.7/site-packages/setuptools/command/build_py.py", line 71, in build_module
package)
File "/usr/lib/python2.7/distutils/command/build_py.py", line 334, in build_module
"'package' must be a string (dot-separated), list, or tuple")
TypeError: 'package' must be a string (dot-separated), list, or tuple
In Python 2, unicode is not allowed for metadata fields as stated in the distutils documentation: None of the string values may be Unicode.
A possible solution would be to just remove unicode_literals
from setup.py
.
I'd rather suggest you to use setuptools.find_packages()
to collect packages inside of your project directory:
diff --git a/setup.py b/setup.py
index 20ed8a8..d6702d5 100644
--- a/setup.py
+++ b/setup.py
@@ -1,7 +1,7 @@
from __future__ import absolute_import, print_function, unicode_literals, with_statement
import sys
-from setuptools import setup
+from setuptools import setup, find_packages
if sys.version_info[0:2] not in ((2, 7), (3, 4), (3, 5)):
@@ -21,7 +21,7 @@ except:
setup(
name=name,
- packages=[name],
+ packages=find_packages(),
version=version,
description='automate and manage your pocket collection',
long_description=desc,
If you agree, I'd like to open a PR.
I know that for example,
to to get the latest 5 items' links & excerpts and save them to a file:
pockyt get -n 5 -f '{link} - {excerpt}' -o readlater.txt
works
Is is also possible to get the entire article, as it is displayed and rendered on the pocket website ?
I mean just the extracted text, stored on the Pocket.
I dont want to download from the original server and extract the text on my computer again.
I'd love to be able to filter the articles by the date they were manipulated within Pocket. Some usage examples:
Something like:
pockyt get --since 2020-01-01 -s archived
Pocket API's get feature does have a since parameter, so it should definitely be possible.
This is with v1.4.2 in a python 3.6 virtualenv on ubuntu 18.04 aarch64.
Sits at "Note: During the registration process, pockyt will attempt to open the required links in your default browser. If any errors occur, you can use the printed links instead."
This is in the console, no X session.
Traceback (most recent call last):
File "/Users/kergoth/.local/bin/pockyt", line 9, in <module>
load_entry_point('pockyt==0.3', 'console_scripts', 'pockyt')()
File "/Users/kergoth/.virtualenvs/pockyt/lib/python2.7/site-packages/pockyt/pockyt.py", line 147, in main
app.run()
File "/Users/kergoth/.virtualenvs/pockyt/lib/python2.7/site-packages/pockyt/pockyt.py", line 137, in run
auth.run()
File "/Users/kergoth/.virtualenvs/pockyt/lib/python2.7/site-packages/pockyt/auth.py", line 120, in run
self._setup()
File "/Users/kergoth/.virtualenvs/pockyt/lib/python2.7/site-packages/pockyt/auth.py", line 94, in _setup
.format(API.AUTHORIZE_USER_URL(self._request_token)))
TypeError: unbound method <lambda>() must be called with API instance as first argument (got unicode instance instead)
I try to do this:
echo 'Usanov_Nauka-o-bogatstve.517832 http://ix.io/2fWf' | pockyt put -f '{title} {link}' -i redirect
nothing properly works
Hello!
I just heard about pockyt. I installed it via pipx install pockyt
(my first use of pipx
) and then ran pockyt reg
. I got the following error:
---------------------------------------------------------------------
Bug Report :
`pockyt` has encountered an error! Please submit this bug report at
` https://www.github.com/achembarpu/pockyt/issues/new `.
---------------------------------------------------------------------
Python Version:
3.10.5 (main, Jul 31 2022, 08:19:00) [Clang 13.1.6 (clang-1316.0.21.2.5)]
---------------------------------------------------------------------
Installed Packages:
parse - 1.19.0
pockyt - 1.4.6
setuptools - 65.1.0
pip - 22.2.2
wheel - 0.37.1
---------------------------------------------------------------------
Commmand:
reg
---------------------------------------------------------------------
Error Message:
Traceback (most recent call last):
File "/Users/jml/.local/pipx/venvs/pockyt/lib/python3.10/site-packages/pockyt/pockyt.py", line 227, in main
error = app.run()
File "/Users/jml/.local/pipx/venvs/pockyt/lib/python3.10/site-packages/pockyt/pockyt.py", line 214, in run
auth.setup()
File "/Users/jml/.local/pipx/venvs/pockyt/lib/python3.10/site-packages/pockyt/auth.py", line 97, in setup
self._obtain_access_token()
File "/Users/jml/.local/pipx/venvs/pockyt/lib/python3.10/site-packages/pockyt/auth.py", line 64, in _obtain_access_token
response = Network.post_request(API.ACCESS_TOKEN_URL, payload)
File "/Users/jml/.local/pipx/venvs/pockyt/lib/python3.10/site-packages/pockyt/wrapper.py", line 136, in post_request
response = Response(urlopen(request))
File "/Users/jml/.pyenv/versions/3.10.5/lib/python3.10/urllib/request.py", line 216, in urlopen
return opener.open(url, data, timeout)
File "/Users/jml/.pyenv/versions/3.10.5/lib/python3.10/urllib/request.py", line 525, in open
response = meth(req, response)
File "/Users/jml/.pyenv/versions/3.10.5/lib/python3.10/urllib/request.py", line 634, in http_response
response = self.parent.error(
File "/Users/jml/.pyenv/versions/3.10.5/lib/python3.10/urllib/request.py", line 563, in error
return self._call_chain(*args)
File "/Users/jml/.pyenv/versions/3.10.5/lib/python3.10/urllib/request.py", line 496, in _call_chain
result = func(*args)
File "/Users/jml/.pyenv/versions/3.10.5/lib/python3.10/urllib/request.py", line 643, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 500: Internal Server Error
---------------------------------------------------------------------
When creating the application, I entered "Pockyt" as the name, "Command-line client for Pocket" as the description, selected "Add", "Remove", and "Modify" as the permissions and "Mac" as the platform. Naturally I accepted the terms of service.
I then copy/pasted the consumer key into the terminal, and clicked "Authorize" in my browser. The browser redirected me to the Github repo and the command-line showed the error you see above.
I repeated all of the steps in case the 500 represents an intermittent server error. All of this took place at roughly 2022-08-19T06:00:00+00:00.
Thanks!
This worked earlier, then after deleting a few hundred item with pockyt mod -d -i redirect , it stopped working:
$ ~/.local/bin/pockyt get
pockyt
has encountered an error! Please submit this bug report athttps://www.github.com/achembarpu/pockyt/issues/new
.similar issue to last year python 3.7 update, #13
This is just to check if pockyt, itself, is compatible with python 3.8, and it doesnt need python 2 at all.
It was working just fine until November 2019.
With ArchLinux update to python 3.8 this AUR package, https://aur.archlinux.org/packages/pockyt/
now breaks with:
This version of Python [3.8.0] is unsupported !
Please use Python 2.7.x, 3.4.x, 3.5.x, or 3.6.x !
Thanks for your work on this usefull tool. Keep using it after all these years !
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.