A Python application that sync your Github Gists and save them to your Evernote notebook as screenshots. With the app, you can search your work (Jupyter notebooks, Markdown files, Python scripts, etc) all in one place with pretty result. 😎 📓
A simple use case for search notebooks including subplot
:
As a heavy Evernote user and a data scientist, I wondered won't it be wonderful to be able to search all my Jupyter notebooks directly inside Evernote. Thanks to the OCR technology built by Evernote, this become possible. Without further ado, try it yourself 😉
This project is written in Python and tested only on macOS currently. To start synchronizing your gist to Evernote, follow the instruction below to setup the application.
python --version
Python 2.7.14 :: Anaconda, Inc.
This is due to Evernote API's limited support of Python3, but will try to migrate in near future.
Latest version is recommended. After downloading, put the driver under path like /usr/local/bin
.
Check whether the driver is in the path:
ls /usr/local/bin | grep chromedriver
chromedriver
Make sure the path where the driver locate is accessible via $PATH
environment variable:
echo $PATH
... :/usr/local/bin: ...
If the path is not included in $PATH
, you can add the path to $PATH
temporarily:
export PATH=$PATH:/usr/local/bin
brew install portmidi pygobject pkg-config cairo gobject-introspection
Make sure to include necessary path in ~/.bash_profile
:
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/lib:/usr/local/opt/libffi/lib/pkgconfig
To grant the app to retrieve your gists, you have to give the app a access token. You can read more about the token here.
Allow following permission when creating the token:
admin:org_hook, gist, notifications, read:gpg_key, read:public_key, read:repo_hook, repo, user
After creating the token, you should save the token for later usage:
To grant the app to create/update notes to your Evernote notebooks, create a Production Token and save for later usage.
First clone the repo and get into the root folder:
git clone https://github.com/leemengtaiwan/gist-evernote.git
cd gist-evernote
To install all the dependencies, Conda is recommended:
conda env create -n gist-evernote -f environment.yaml
source activate gist-evernote
Or use pip
instead:
pip install -r requirements.txt
Tell the app about your Github and Evernote tokens acquired [previously](#Github Personal Access Token):
python setup.py
You will be asked to provided your tokens and the name of notebook you want your gists to be sync. Alternative, you can modify the settings.py directly:
GITHUB_AUTH_TOKEN = ""
EVERNOTE_PROD_TOKEN = ""
EVERNOTE_SANDBOX_TOKEN = ""
NOTEBOOK_TO_SYNC = "gist-evernote"
Finally, after input our credentials, now we can run the sync app:
python app.py
If anything go well, it will start to fetch your gists, take screenshots of them and save them as new notes in Evernote. Have a coffee before it finish 😎☕
To reflect modification to synced gists to Evernote, just run the app again and it will try to do its best:
python app.py
There are still many things left to be improved. Any advice or pull request is highly appreciated. Notes that the Python Docstrings of this repo follow Numpy Style.
- Meng Lee - find me at
[email protected]
This project is licensed under the MIT License - see the LICENSE.txt for details.