From b1cf4e6a933513fa1e8c9deac28f407c8fb463fb Mon Sep 17 00:00:00 2001 From: Brian Carter Date: Sat, 6 Aug 2016 22:36:22 -0400 Subject: [PATCH] Reads from /Users/brian/Documents/Source/Ledger/Ledger.dat, if present, vs .qlrc -- fixes #30 --- README.md | 2 +- ql | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 322bd0c..dac68ef 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ## Entry creation utility for [ledger](http://ledger-cli.org/ "ledger"). ### Install -1. Download [the archive](https://github.com/robotmachine/QuickLedger/archive/v1.0.0.tar.gz) +1. Download [the archive](https://github.com/robotmachine/QuickLedger/archive/v1.0.1.tar.gz) 2. Run `chmod +x ql` 3. Move `ql` to `/usr/local/bin/` or somewhere else in `$PATH` diff --git a/ql b/ql index 33b351e..ede6375 100755 --- a/ql +++ b/ql @@ -7,7 +7,7 @@ | |_| | |_| | | (__| <| |__| __/ (_| | (_| | __/ | \__\_\\__,_|_|\___|_|\_\_____\___|\__,_|\__, |\___|_| |___/ -Version 1.0.0 +Version 1.0.1 Project Homepage: https://github.com/robotmachine/QuickLedger @@ -33,7 +33,7 @@ from decimal import * from datetime import date, timedelta global qlVer -qlVer = str("1.0.0") +qlVer = str("1.0.1") global config config = configparser.ConfigParser() @@ -117,6 +117,8 @@ def main(): """ if args.ledger_file and os.path.exists(os.path.expanduser(args.ledger_file)): ledger_file = os.path.expanduser(args.ledger_file) + elif os.path.exists(os.path.expanduser(os.environ['LEDGER'])): + ledger_file = os.path.expanduser(os.environ['LEDGER']) else: ledger_file = read_config('ledger', None, None) """