forked from jeffkowalski/geeknote
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
proxy_support.md: Documentation for proxy support
- Loading branch information
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
HTTP proxy support for geeknote | ||
=============================== | ||
|
||
I recommend to make this work with virtualenv, to avoid overwriting system files. | ||
The important part is to install in the order **thrift, then evernote, then geeknote**. This will make sure that path search order is correct for thrift. | ||
|
||
``` | ||
# Download thrift and geeknote | ||
git clone https://github.com/apache/thrift.git | ||
git clone https://github.com/mwilck/geeknote.git | ||
# create and enter a virtual environment | ||
virtualenv /var/tmp/geeknote | ||
. /var/tmp/geeknote/bin/activate | ||
# Apply proxy-support patches for thrift | ||
cd thrift | ||
## If the patches don't apply, you may need to check out the state that I wrote the patches for: | ||
## git checkout -b proxy e363a34e63 | ||
curl https://issues.apache.org/jira/secure/attachment/12801233/0001-python-THttpClient-Add-support-for-system-proxy-sett.patch | git am | ||
curl https://issues.apache.org/jira/secure/attachment/12801234/0002-Python-THttpClient-Support-proxy-authorization.patch | git am | ||
# Install thrift from the patched tree | ||
(cd lib/py; python setup.py install) | ||
cd .. | ||
# Install evernote | ||
pip install evernote | ||
# Install geeknote | ||
cd geeknote | ||
python setup.py install | ||
``` | ||
|
||
Now `geeknote login`, `geeknote find`, etc. should work behind a proxy if the `http_proxy` environment variable is correctly set. You can now generate a script to activate the virtual environment: | ||
|
||
``` | ||
cat >~/bin/geeknote <<\EOF | ||
#! /bin/bash | ||
. /var/tmp/geeknote/bin/activate | ||
exec geeknote "$@" | ||
EOF | ||
chmod a+x ~/bin/geeknote | ||
``` |