update readme with config file available settings. support setting proxy from config file.

This commit is contained in:
Alan Hamlett 2015-02-12 18:36:14 -08:00
parent 48b8d72946
commit da74592ac4
2 changed files with 39 additions and 7 deletions

View File

@ -8,13 +8,43 @@ This is the common interface for the WakaTime api. You shouldn't need to directl
Go to http://wakatime.com to install the plugin for your text editor.
Installation
------------
pip install wakatime
Usage
-----
https://wakatime.com/
Install the plugin for your IDE/editor at https://wakatime.com/plugins
If you are building a plugin using the [WakaTime API](https://wakatime.com/developers/)
then follow the [Creating a Plugin](https://wakatime.com/help/misc/creating-plugin)
guide for information about using `wakatime-cli.py`.
Configuring
-----------
Options can be passed via command line, or set in the `$HOME/.wakatime.cfg`
config file. Command line arguments take precedence over config file settings.
The `$HOME/.wakatime.cfg` file is in [INI](http://en.wikipedia.org/wiki/INI_file)
format. An example config file looks like:
```
[settings]
debug = false
api_key = your-api-key
hidefilenames = false
ignore =
^COMMIT_EDITMSG$
^TAG_EDITMSG$
^/var/
^/etc/
offline = true
proxy = https://user:pass@localhost:8080
```
Installation
------------
Each plugin installs wakatime for you, but for testing you can install the
common api interface with pip:
pip install wakatime

View File

@ -215,6 +215,8 @@ def parseArguments(argv):
args.offline = configs.getboolean('settings', 'offline')
if not args.hidefilenames and configs.has_option('settings', 'hidefilenames'):
args.hidefilenames = configs.getboolean('settings', 'hidefilenames')
if not args.proxy and configs.has_option('settings', 'proxy'):
args.proxy = configs.get('settings', 'proxy')
if not args.verbose and configs.has_option('settings', 'verbose'):
args.verbose = configs.getboolean('settings', 'verbose')
if not args.verbose and configs.has_option('settings', 'debug'):