update readme with config file available settings. support setting proxy from config file.
This commit is contained in:
parent
48b8d72946
commit
da74592ac4
2 changed files with 39 additions and 7 deletions
44
README.rst
44
README.rst
|
@ -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.
|
Go to http://wakatime.com to install the plugin for your text editor.
|
||||||
|
|
||||||
|
|
||||||
Installation
|
|
||||||
------------
|
|
||||||
|
|
||||||
pip install wakatime
|
|
||||||
|
|
||||||
|
|
||||||
Usage
|
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
|
||||||
|
|
|
@ -215,6 +215,8 @@ def parseArguments(argv):
|
||||||
args.offline = configs.getboolean('settings', 'offline')
|
args.offline = configs.getboolean('settings', 'offline')
|
||||||
if not args.hidefilenames and configs.has_option('settings', 'hidefilenames'):
|
if not args.hidefilenames and configs.has_option('settings', 'hidefilenames'):
|
||||||
args.hidefilenames = configs.getboolean('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'):
|
if not args.verbose and configs.has_option('settings', 'verbose'):
|
||||||
args.verbose = configs.getboolean('settings', 'verbose')
|
args.verbose = configs.getboolean('settings', 'verbose')
|
||||||
if not args.verbose and configs.has_option('settings', 'debug'):
|
if not args.verbose and configs.has_option('settings', 'debug'):
|
||||||
|
|
Loading…
Reference in a new issue