Giter Club home page Giter Club logo

gist-evernote's Introduction

Gist-Evernote

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. ๐Ÿ˜Ž ๐Ÿ““

Demo

A simple use case for search notebooks including subplot:

demo-subplots

Background

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 ๐Ÿ˜‰

Getting Started

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.

Prerequisites

Python 2.7

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 and dependencies

brew install portmidi pygobject pkg-config cairo gobject-introspection

path setting

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:

github-token

To grant the app to create/update notes to your Evernote notebooks, create a Production Token and save for later usage.

evernote-token

Installation

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

Setup

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"

Start to sync your gists

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

Contributing

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.

Authors

License

This project is licensed under the MIT License - see the LICENSE.txt for details.

Acknowledgements

Future Work

gist-evernote's People

Contributors

leemengtw avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

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.