Everrista: create Evernote notes with Readability and Pythonista
mcsquaredjr148 last edited by
<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:
Grab Evernote Cloud API token from:
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:
- 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:
(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:
- Download html2ascii.py from:
and put it in the /lib folder of Pythonista.
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.
Enjoy and let me me know if you have any comments or suggestions on how to improve Everrista.
cvetkoff last edited by cvetkoff
Thx! Worked fine, but in Everrista.py line 137-139:
title = r.json['title'] html = r.json['content'] url = r.json['url']
title = r.json()['title'] html = r.json()['content'] url = r.json()['url']
because instancemethod object has no attribute 'getitem'
ccc last edited by ccc
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