Skip to content

Commit

Permalink
Added two options for setup() to avoid excessive something. Fixes #22
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Carter committed Dec 4, 2014
1 parent 62f9de9 commit e696bca
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions ql
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,12 @@ def main():
parser.add_argument('-x', '--not-cleared',
action='store_true', dest='uncleared',
help="Marks transaction as not cleared.")
parser.add_argument('--setup',
action='store_true', dest='setup',
help='Set up accounts and merchants in config file.')
parser.add_argument('--setup-accounts',
action='store_true', dest='setacct',
help='Set up accounts in config file.')
parser.add_argument('--setup-merchants',
action='store_true', dest='setmerch',
help='Set up accounts in config file.')
parser.add_argument('--config',
action='store', dest='alt_config', default=None,
help='Specify alternate config file.')
Expand Down Expand Up @@ -97,8 +100,10 @@ def main():
amount = args.amount
account = args.account
merchant = args.merchant
if args.setup:
setup()
if args.setacct:
accounts()
elif args.setmerch:
merchants()
read_config(ledger_file, account, merchant, category, amount)

def read_config(ledger_file, account, merchant, category, amount):
Expand Down

0 comments on commit e696bca

Please sign in to comment.