Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Everrista: create Evernote notes with Readability and Pythonista
-
<h1>Everrista: create Evernote notes with Readability and Pythonista.</h1>
Everrista is a script written for Pythonista that creates
Evernote notes from a URL or a text copied in the clipboard with as few clicks as possible. Everrista uses Readability Parser API to create clean, nice-looking and easy to read notes.Before using the script you need to obtain valid Readability and Evernote API tokens.
Grab Readability API keys from:
http://www.readability.com/developers/api
Grab Evernote Cloud API token from:
https://www.evernote.com/api/DeveloperToken.action
<h2>Dependencies: </h2>
To convert HTML to ENLM (the markup used by Evernote, see: http://dev.evernote.com/start/core/enml.php) which permitts a limited subset of XHTML tags, Everrista uses the asciinator aka html2text.py that can be downloaded from:
http://www.aaronsw.com/2002/html2text/
<h2>Installation: </h2>
- Download Everrista gist from: https://gist.github.com/mcsquaredjr/5096503
I recommend to create a folder called everrista and put everrista script there.
- Use Omz's script to download and install evernote-sdk: https://gist.github.com/omz/5048588
After installing the SDK make sure you add evernote-skd to the sys.path using using something similar to the following line:
<code>sys.path.append('../evernote-sdk')</code>
(It assumes that Everrista script resides inside /everrista folder and the SDK is installed inside the evernote-sdk folder; change accordingly if you use different layout of folders)
You may find detailed configuration instructions for Evernote SDK installation in this thread:
http://omz-software.com/pythonista/forums/discussion/203/using-the-evernote-sdk-in-pythonista#Item_3
- Download html2ascii.py from:
http://www.aaronsw.com/2002/html2text/html2text.py
and put it in the /lib folder of Pythonista.
<h2>Configuration: </h2>
-
Replace R_TOKEN and EN_TOKEN values in Everrista with the tokens obtained from Readability and Evernote sites.
-
Change the value of BODY_WIDTH variable in html2ascii to 0 if you want to turn wrapping of long lines off (you probably do). By default html2text wraps all lines at position 78.
That's it.
Enjoy and let me me know if you have any comments or suggestions on how to improve Everrista.
-Serge
-
Thx! Worked fine, but in Everrista.py line 137-139:
title = r.json['title'] html = r.json['content'] url = r.json['url']
replace with:
title = r.json()['title'] html = r.json()['content'] url = r.json()['url']
because instancemethod object has no attribute 'getitem'
-
Before version 1.0 of requests, .json was a property of a requests.get() response. In v1.0 and later, .json() was changed to be a method of a requests.get() response so that keyword arguments could be passed through to json.loads(). For the history, see http://docs.python-requests.org/en/master/community/updates/#release-and-version-history