-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
ledger2beancount.yaml
126 lines (103 loc) · 3.79 KB
/
ledger2beancount.yaml
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
---
date_format: "%Y-%m-%d"
# Date without year (if ledger's Y/year directive is used)
date_format_no_year: "%m-%d"
# Date used to open accounts
account_open_date: "1970-01-01" # Unix epoch, just because
# Date used to create commodities
commodities_date: "1970-01-01" # Unix epoch, just because
beancount_indent: 2
ledger_indent: 4
# list of frequently used currencies (not *all* used currencies)
operating_currencies:
- EUR
# Attempt to parse hledger specific features
hledger: false
# You can specify a file which serves as a beancount "header", i.e.
# it's put at the beginning of the converted beancount file. You can
# specify options for beancount, such as `option "title"`, define
# `plugin` directives or beancount `query` information.
# beancount_header:
# emit account and commodity declares
# (Note: the declarations done in ledger via `account` and
# `commodity` are always converted. If this option is true,
# declarations are created for those which have not been
# explicitly declared in ledger but used.)
automatic_declarations: true
# Set to `true` if you use option --decimal-comma in ledger
decimal_comma: false
# Should virtual postings be converted. If set to true, virtual
# postings in brackets will be made into real accounts. (Virtual
# postings in parentheses are always ignored, regardless of this option)
convert_virtual: false
# mapping of ledger tags to corresponding beancount tag
tag_map:
WTF???: WTF
# mapping of ledger metadata key to corresponding beancount key
metadata_map:
x-payee: payee
x-payer: payer
# metadata tags (*after* above mapping) used to set payee
payee_tag: payee
payer_tag: payer
# payee_split: a list of regular expressions which allows you
# to split ledger's payee field into payee and narration.
# Use named capture groups "payee" and "narration".
payee_split:
- (?<narration>.*?)\s+\((?<payee>Tesco)\)
# payee_match: a list of regular expressions and corresponding
# payees. The whole ledger payee becomes the narration and
# the matched payee from the regular expression becomes the
# payee.
payee_match:
- (?i)^Oyster card top-up: TfL
# A hash of account names to be mapped to other account
# names.
account_map:
"Equity:Opening-balance": Equity:Opening-Balance
# A hash of regular expressions to replace account names.
account_regex:
^Accrued:Accounts Payable:(.*): Liabilities:Accounts-Payable:$1
^Accrued:Accounts Receivable:(.*): Assets:Accounts-Receivable:$1
# mapping of ledger commodities to valid beancount commodities
commodity_map:
"$": USD
"£": GBP
"€": EUR
"¥": JPY
# You can set the following metadata tags to an empty string if you
# don't want the metadata to be added to beancount.
postdate_tag: date
auxdate_tag: aux-date
code_tag: code
# A list of regular expressions that will cause a tag to be
# rendered as a link.
link_match:
- ^\d\d\d\d-\d\d-\d\d-
# A list of metadata tags whose values should be converted to
# beancount links instead of metadata.
# Tags are case insensitive. Values must not contain whitespace.
link_tags: []
# A list of commodities that should be treated as commodities
# rather than currencies even though they consist of 3 characters
# (which is usually a characteristic of a currency). Expects
# beancount commodities (i.e. after transformation and mapping).
currency_is_commodity:
- BTC
- ETH
- IBM
# A list of commodities that should be treated as currencies
# (in the sense that cost is not retained). Expects beancount
# commodities (i.e. after transformation and mapping).
commodity_is_currency:
- MARRIOTT
- MILESMORE
- NECTAR
# A marker that tells ledger2beancount to ignore a line if the
# marker is found.
# ignore_marker: NoL2B
#
# A marker that tells ledger2beancount to take a line from
# the input that is commented out, uncomment it and display
# it in the output.
keep_marker: L2Bonly