Updated readme and changelog and changed config path according to discussion

This commit is contained in:
Manuel Ebert 2013-04-19 16:58:19 +02:00
parent 02da463f10
commit 8842b8589f
3 changed files with 4 additions and 2 deletions

View file

@ -5,6 +5,7 @@ Changelog
* [Improved] Python 2.6 compatibility
* [New] Python 3 compatibility
* [New] Respects the `XDG_CONFIG_HOME` environment variable for storing your configuration file
### 1.0.3 (April 17, 2013)

View file

@ -137,7 +137,7 @@ will replace your encrypted journal file by a Journal in plain text. You can als
Advanced usages
--------------
The first time launched, _jrnl_ will create a file called `.jrnl_config` in your home directory.
The first time launched, _jrnl_ will create a file configuration file at `~/.jrnl_config` or, if the `XDG_CONFIG_HOME` environment variable is set, `$XDG_CONFIG_HOME/jrnl`.
### .jrnl_config

View file

@ -31,7 +31,8 @@ __version__ = '1.0.0-rc1'
__author__ = 'Manuel Ebert, Stephan Gabler'
__license__ = 'MIT'
CONFIG_PATH = os.environ.get('JRNL_CONFIG', os.path.expanduser('~/.jrnl_config'))
xdg_config = os.environ.get('XDG_CONFIG_HOME')
CONFIG_PATH = os.path.join(xdg_config, "jrnl") if xdg_config else os.path.expanduser('~/.jrnl_config'))
PYCRYPTO = install.module_exists("Crypto")
def parse_args():