2 ## -*- coding: utf-8 -*-
8 HERE = os.path.dirname(__file__)
9 START = datetime.datetime(2011, 10, 24, 6)
11 XMLRPC_ENDPOINT = 'http://iron-blogger.mako.cc/xmlrpc.php'
14 PARTICIPANTS_PAGE_ID = 12
19 # check the version of ledger to find out which commands to use
20 if subprocess.Popen(['ledger', '--version'], stdout=subprocess.PIPE).communicate()[0][7] == '3'
21 BALANCE_CMD = ['ledger', '-f', os.path.join(HERE,'ledger'),
22 '--no-color', '-n', 'balance']
24 DEBTS_CMD = ['ledger', '-f', os.path.join(HERE, 'ledger'),
25 '--flat', '--no-total', '--no-color',
26 'balance', 'Pool:Owed:']
29 BALANCE_CMD = ['ledger', '-f', os.path.join(HERE, 'ledger'),
31 DEBTS_CMD = ['ledger', '-f', os.path.join(HERE, 'ledger'),
32 '-n', 'balance', 'Pool:Owed:']