1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
|
###
## example-config.py for jali
## copy this file to `$XDG_CONFIG_HOME/jali/config.py` and adjust to your needs.
###
## If you want, you can configure some logging here.
# import logging
# logging.basicConfig(filename='jali.log',level=logging.DEBUG)
# TMP_DIR = "/tmp/" Defaults to /tmp
## Beware, if you use the password_call feature a pin file with your plain text password will be here for a short time.
# LOCALE = ""
## Locale to use to format currency amounts. If not configured here, the locale from environment will be used.
## Make sure, that the locale configured here exists on your System.
## Example: LOCALE = "de_DE.UTF-8"
# CURRENCY_GROUPING = True
## True: 1.000,00 False: 1000,00 (separators depend on your locale)
## Example function to use the pass utility to manage your banking login passwords.
# import subprocess
# def pass_store(pass_phrase_name):
# def call():
# return subprocess.check_output(["pass", pass_phrase_name]).decode('utf8').strip()
# return call
## This are examples of functions you can use in account_hooks or tag_hooks.
## You can call any method of jali.dialog.TransactionCreationDialog.
## (Well not every method makes sense.
#
# def add_tag(tag):
# def callback(dialog):
# dialog.i_add_tag(tag)
# return callback
#
# def set_tag(tag, value):
# def callback(dialog):
# dialog.edit_tag(tag, value)
# return callback
# One huge dict.
# ACCOUNTINGS = [
# {
# "ledger_dir" = "/home/user/ledger"
# The root of your accounting, you can override certain files to be even outside this dir later if you want
#
# "name": "CDA Ledger Accounting",
# # string, no semastics only for display
#
# "auto_confirm": False
# # boolean, say always yes on confirmation questions
#
# "match_direct_confirm": True
# # boolean, directly jump to confirmation dialog on succesful rule match
# # WARNING: Things can happen very fast if you enable this with the option above it.
#
# "currency": "€"
# # string, currency to be used in this accounting, will default to a "€" symbol. Will only decide between € and EUR in other cases currency will be requested from the bank
#
# "files": [os.path.join(**/accounting.ledger")],
# # [string], jali uses these files for completion and to find hashes of transaction to avoid duplicates, can contain globs
#
# "rules": os.path.join(ledger_dir,"rules.json"),
# # string, in this file jali reads and saves recognition rules.
# # You can edit the rules by hand for more detailed features, match criteria are regexes.
#
# "outfile_call": lambda transaction: os.path.join(ledger_dir, "{}/accounting.ledger".format(transaction.date[:4])),
# # function, this function will be called to determine the file where a transaction will be appended.
#
# "transaction_name_template": "{VWZ}, {Name}",
# # string, this will be the name (or payee) of a transaction in ledger, you can use any key defined in your raw_transaction
#
# shortcuts":["Erfolgskonten:Ideeller Bereich:Einnahmen:Mitgliedsbeiträge"]
# # [string], list of accounts which can be directly selected in main menu when creating a transaction
#
# "roots": ["Aktiva", "Erfolgskonten:Ideeller Bereich", "Erfolgskonten:Wirtschaftlicher Geschäftsbetrieb"],
# # [string], specify under which roots you want enter accounts for your transactions
#
# "account_hooks":{
# "Erfolgskonten:Ideeller Bereich:Einnahmen:Mitgliedsbeiträge": add_tag("Mitglied"),
# "Erfolgskonten:Ideeller Bereich:Einnahmen:Spenden": add_tag("Spender"),
# "Erfolgskonten:Ideeller Bereich": add_tag("Budget"),
# "Erfolgskonten:.*:Ausgaben": add_tag("Beleg"),
# "Aktiva:.*:Ausgaben": add_tag("Beleg"),
# },
# # {string:func}, hooks to be executed when user selects an account matching a regex
# # the hook gets the dialog object as parameter (see example above)
#
# "tag_hooks":{"Budget":set_tag("Budget","ungebunden")},
# # {string:func}, hooks to be executed when user adds a tag
# # the hook gets the dialog object as parameter (see example above)
#
# "banking_tags": ["VWZ", "Name", "BIC", "IBAN", "BLZ", "KTNR", "EREF"],
# # [string], these keys from the raw_transaction will be added to the transaction as tags.
#
# "auto_rule_tags": ["VWZ", "Name", "BIC", "IBAN", "EREF", "BLZ", "KTNR"],
# # if you use the autorule feature, [string], these keys will be used as match parameters if you create an autorule,
# #.remember that you can edit rules later manually in your rules file
#
# the banks list is obviously mandatory:
# "banks": [
# {
# "name": "Bank",
# string, only for display
#
# "bank_code": "123456789",
# string, has to match with aqbanking
#
# "password_call": pass_store("pass_identifier_used_for_my_onlinebanking"),
# # optional: function, will be called if present to get your onlinebanking password
# # CAREFUL: The password will temporarly saved to your TMP_DIR i haven’t found a workaround for this.
#
# "login_name": "user",
# # if you set a password call, string, has to match with aqbanking
#
# "show_aqbanking": True,
# # boolean, default: True, show aqbanking output while downloading data
# # this option will only be considered when you have a password_call configured, because you have to see aqbankings password prompt.
# # Be careful: If you have a malfunctioning password_call and you enable this option the program might hang waiting for you to enter the password, but you won't see the prompt.
#
# the accounts list is obviously mandatory
# "accounts" : [
# {
# "name": "MyAccount",
# # string, only for display
#
# "number": "123456789",
# # string, has to match with aqbanking
#
# "account_name": "Aktiva:Girokonten:MyBank"
# # string, name of account this account to be used in ledger
# }
# ]
# }
# ]
# }
#]
|