tariochbctools 1.0.0__py2.py3-none-any.whl → 1.1.0__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tariochbctools/importers/bitst/importer.py +10 -2
- tariochbctools/importers/blockchain/importer.py +4 -1
- tariochbctools/importers/general/deduplication.py +14 -0
- tariochbctools/importers/general/mt940importer.py +4 -0
- tariochbctools/importers/ibkr/importer.py +1 -1
- tariochbctools/importers/nordigen/importer.py +4 -0
- tariochbctools/importers/transferwise/importer.py +4 -0
- tariochbctools/importers/zak/importer.py +4 -0
- {tariochbctools-1.0.0.dist-info → tariochbctools-1.1.0.dist-info}/METADATA +1 -1
- {tariochbctools-1.0.0.dist-info → tariochbctools-1.1.0.dist-info}/RECORD +14 -13
- {tariochbctools-1.0.0.dist-info → tariochbctools-1.1.0.dist-info}/LICENSE.txt +0 -0
- {tariochbctools-1.0.0.dist-info → tariochbctools-1.1.0.dist-info}/WHEEL +0 -0
- {tariochbctools-1.0.0.dist-info → tariochbctools-1.1.0.dist-info}/entry_points.txt +0 -0
- {tariochbctools-1.0.0.dist-info → tariochbctools-1.1.0.dist-info}/top_level.txt +0 -0
@@ -10,6 +10,7 @@ from beancount.core.number import MISSING, D
|
|
10
10
|
from dateutil.parser import parse
|
11
11
|
from dateutil.relativedelta import relativedelta
|
12
12
|
|
13
|
+
from tariochbctools.importers.general.deduplication import ReferenceDuplicatesComparator
|
13
14
|
from tariochbctools.importers.general.priceLookup import PriceLookup
|
14
15
|
|
15
16
|
|
@@ -70,8 +71,13 @@ class Importer(beangulp.Importer):
|
|
70
71
|
if type == 0:
|
71
72
|
narration = "Deposit"
|
72
73
|
if posCcy:
|
73
|
-
cost = data.
|
74
|
-
self.priceLookup.fetchPriceAmount(posCcy, date),
|
74
|
+
cost = data.CostSpec(
|
75
|
+
self.priceLookup.fetchPriceAmount(posCcy, date),
|
76
|
+
None,
|
77
|
+
"CHF",
|
78
|
+
None,
|
79
|
+
None,
|
80
|
+
False,
|
75
81
|
)
|
76
82
|
postings = [
|
77
83
|
data.Posting(
|
@@ -161,3 +167,5 @@ class Importer(beangulp.Importer):
|
|
161
167
|
return data.Transaction(
|
162
168
|
meta, date, "*", "", narration, data.EMPTY_SET, data.EMPTY_SET, postings
|
163
169
|
)
|
170
|
+
|
171
|
+
cmp = ReferenceDuplicatesComparator()
|
@@ -6,6 +6,7 @@ import yaml
|
|
6
6
|
from beancount.core import amount, data
|
7
7
|
from beancount.core.number import D
|
8
8
|
|
9
|
+
from tariochbctools.importers.general.deduplication import ReferenceDuplicatesComparator
|
9
10
|
from tariochbctools.importers.general.priceLookup import PriceLookup
|
10
11
|
|
11
12
|
|
@@ -39,7 +40,7 @@ class Importer(beangulp.Importer):
|
|
39
40
|
|
40
41
|
date = trx["confirmed"].date()
|
41
42
|
price = priceLookup.fetchPriceAmount(currency, date)
|
42
|
-
cost = data.
|
43
|
+
cost = data.CostSpec(price, None, baseCcy, None, None, None, False)
|
43
44
|
|
44
45
|
outputType = "ether" if currency.lower() == "eth" else "btc"
|
45
46
|
amt = blockcypher.from_base_unit(trx["value"], outputType)
|
@@ -66,3 +67,5 @@ class Importer(beangulp.Importer):
|
|
66
67
|
entries.append(entry)
|
67
68
|
|
68
69
|
return entries
|
70
|
+
|
71
|
+
cmp = ReferenceDuplicatesComparator()
|
@@ -0,0 +1,14 @@
|
|
1
|
+
class ReferenceDuplicatesComparator:
|
2
|
+
def __init__(self, refs=["ref"]):
|
3
|
+
self.refs = refs
|
4
|
+
|
5
|
+
def __call__(self, entry1, entry2):
|
6
|
+
entry1Refs = set()
|
7
|
+
entry2Refs = set()
|
8
|
+
for ref in self.refs:
|
9
|
+
if ref in entry1.meta:
|
10
|
+
entry1Refs.add(entry1.meta[ref])
|
11
|
+
if ref in entry2.meta:
|
12
|
+
entry2Refs.add(entry2.meta[ref])
|
13
|
+
|
14
|
+
return entry1Refs & entry2Refs
|
@@ -6,6 +6,8 @@ import mt940
|
|
6
6
|
from beancount.core import amount, data
|
7
7
|
from beancount.core.number import D
|
8
8
|
|
9
|
+
from tariochbctools.importers.general.deduplication import ReferenceDuplicatesComparator
|
10
|
+
|
9
11
|
|
10
12
|
class Importer(beangulp.Importer):
|
11
13
|
"""An importer for MT940 files."""
|
@@ -60,6 +62,8 @@ class Importer(beangulp.Importer):
|
|
60
62
|
|
61
63
|
return entries
|
62
64
|
|
65
|
+
cmp = ReferenceDuplicatesComparator()
|
66
|
+
|
63
67
|
def prepare_payee(self, trxdata: dict[str, Any]) -> str:
|
64
68
|
return ""
|
65
69
|
|
@@ -7,6 +7,8 @@ import yaml
|
|
7
7
|
from beancount.core import amount, data
|
8
8
|
from beancount.core.number import D
|
9
9
|
|
10
|
+
from tariochbctools.importers.general.deduplication import ReferenceDuplicatesComparator
|
11
|
+
|
10
12
|
|
11
13
|
class HttpServiceException(Exception):
|
12
14
|
pass
|
@@ -105,3 +107,5 @@ class Importer(beangulp.Importer):
|
|
105
107
|
entries.append(entry)
|
106
108
|
|
107
109
|
return entries
|
110
|
+
|
111
|
+
cmp = ReferenceDuplicatesComparator(["nordref"])
|
@@ -15,6 +15,8 @@ from beancount.core import amount, data
|
|
15
15
|
from beancount.core.number import D
|
16
16
|
from dateutil.relativedelta import relativedelta
|
17
17
|
|
18
|
+
from tariochbctools.importers.general.deduplication import ReferenceDuplicatesComparator
|
19
|
+
|
18
20
|
http = urllib3.PoolManager()
|
19
21
|
|
20
22
|
|
@@ -183,3 +185,5 @@ class Importer(beangulp.Importer):
|
|
183
185
|
entries.append(entry)
|
184
186
|
|
185
187
|
return entries
|
188
|
+
|
189
|
+
cmp = ReferenceDuplicatesComparator()
|
@@ -8,6 +8,8 @@ from beancount.core import amount, data
|
|
8
8
|
from beancount.core.number import D
|
9
9
|
from dateutil.parser import parse
|
10
10
|
|
11
|
+
from tariochbctools.importers.general.deduplication import ReferenceDuplicatesComparator
|
12
|
+
|
11
13
|
|
12
14
|
class Importer(beangulp.Importer):
|
13
15
|
"""An importer for Bank Cler ZAK PDF files files."""
|
@@ -127,3 +129,5 @@ class Importer(beangulp.Importer):
|
|
127
129
|
entries.append(self.createBalanceEntry(filepath, date, saldo))
|
128
130
|
|
129
131
|
return entries
|
132
|
+
|
133
|
+
cmp = ReferenceDuplicatesComparator(["zakref"])
|
@@ -3,23 +3,24 @@ tariochbctools/importers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
|
|
3
3
|
tariochbctools/importers/bcge/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
4
|
tariochbctools/importers/bcge/importer.py,sha256=bAQpkBLURatdsfSoMQdiha-8QfExAXXvpzAgnFFMwoE,1176
|
5
5
|
tariochbctools/importers/bitst/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
|
-
tariochbctools/importers/bitst/importer.py,sha256=
|
6
|
+
tariochbctools/importers/bitst/importer.py,sha256=Bv1kZ7yDKGXZPnpTQApEUmEIg_y2kERpGIDkWJqatmY,5562
|
7
7
|
tariochbctools/importers/blockchain/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
8
|
-
tariochbctools/importers/blockchain/importer.py,sha256=
|
8
|
+
tariochbctools/importers/blockchain/importer.py,sha256=PU8leeSRPAL5CV6yBbEQklgEI8imGbvyrW8EAZnXevI,2404
|
9
9
|
tariochbctools/importers/cembrastatement/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
10
10
|
tariochbctools/importers/cembrastatement/importer.py,sha256=2vY7bBsVaYoluVO3iGbhcoP2N9eQMYSzjxFgLTCeLT0,3915
|
11
11
|
tariochbctools/importers/general/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
12
|
+
tariochbctools/importers/general/deduplication.py,sha256=5appwJTczAws2jQcN1Bk-nanOHAOtJf_WJzU7i3fIR0,433
|
12
13
|
tariochbctools/importers/general/mailAdapterImporter.py,sha256=BHzO38YkWpJf7eB0VHdSr0VtKNuDn5WAI4Y9Edhhlcg,1771
|
13
|
-
tariochbctools/importers/general/mt940importer.py,sha256=
|
14
|
+
tariochbctools/importers/general/mt940importer.py,sha256=KkgA_lpSBeGKgBGCGaOPWfaThyrXpB4pGObCbKfSaFc,2204
|
14
15
|
tariochbctools/importers/general/priceLookup.py,sha256=QjwhxOYuEATwtaHnJ9OKl3D6JcnDJQS_5Wo7dQmFDFM,865
|
15
16
|
tariochbctools/importers/ibkr/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
16
|
-
tariochbctools/importers/ibkr/importer.py,sha256=
|
17
|
+
tariochbctools/importers/ibkr/importer.py,sha256=E-xTEbUtdwCOOvgiPxCanzmiH_IRcSY4aWuZKZ3cyhI,8883
|
17
18
|
tariochbctools/importers/neon/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
18
19
|
tariochbctools/importers/neon/importer.py,sha256=kz8IEWXh8Sd8ysfKTQ49-rN5RgeD59pB4OgoA3gHLkY,2565
|
19
20
|
tariochbctools/importers/netbenefits/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
20
21
|
tariochbctools/importers/netbenefits/importer.py,sha256=nzjz12uzi8ozYaOFW5S8U1LPToxk8C0jESL8X6Ex6CY,5904
|
21
22
|
tariochbctools/importers/nordigen/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
22
|
-
tariochbctools/importers/nordigen/importer.py,sha256=
|
23
|
+
tariochbctools/importers/nordigen/importer.py,sha256=jAd35aXvVYASf9BLHjqXTtehUl5GUMikSj0H1RjfRGE,3923
|
23
24
|
tariochbctools/importers/nordigen/nordigen_config.py,sha256=cbv7DkGrQ6SzX0L1m25nHi3UH9Oi9tgQGkRmjoZ1QXk,5122
|
24
25
|
tariochbctools/importers/postfinance/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
25
26
|
tariochbctools/importers/postfinance/importer.py,sha256=PLBbnswb_tHt8wzd7yCC4UAWHoPn3WcJIXaOMewz6fc,2524
|
@@ -33,13 +34,13 @@ tariochbctools/importers/schedule/importer.py,sha256=s5j4nZGifymgxzNRn3FvaCkrDBB
|
|
33
34
|
tariochbctools/importers/swisscard/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
34
35
|
tariochbctools/importers/swisscard/importer.py,sha256=84nyAHzz5Y8mHw-zCkoUE0CsaEb8W8C_TbTRHleg_3A,1887
|
35
36
|
tariochbctools/importers/transferwise/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
36
|
-
tariochbctools/importers/transferwise/importer.py,sha256=
|
37
|
+
tariochbctools/importers/transferwise/importer.py,sha256=IdtNmrLHKxrBBBVLf8Qgysw0Mx8XswF4cZv9iRl2b3g,6312
|
37
38
|
tariochbctools/importers/truelayer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
38
39
|
tariochbctools/importers/truelayer/importer.py,sha256=fkASr_cqxkGPf45Eltl4rwKdwoMN0ild3HbCPLk_r1U,7172
|
39
40
|
tariochbctools/importers/viseca/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
40
41
|
tariochbctools/importers/viseca/importer.py,sha256=o-zWruMMuSAuwqq4cUQ6cTZI91paBENQShzGK4VdIJg,3348
|
41
42
|
tariochbctools/importers/zak/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
42
|
-
tariochbctools/importers/zak/importer.py,sha256=
|
43
|
+
tariochbctools/importers/zak/importer.py,sha256=_2z-O1IHK-HZOrbAatUiCY2rkLIhYvBeT6DXk4B0KNw,4104
|
43
44
|
tariochbctools/importers/zkb/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
44
45
|
tariochbctools/importers/zkb/importer.py,sha256=Gm3ql1OHp0dFzJHph1dqyfF4zHNAo00VEiO-WXowtwY,1490
|
45
46
|
tariochbctools/plugins/__init__.py,sha256=DSZtoTVosmExbFmMlHVrZAxKewEILDZlGh_7-uWcc_w,26
|
@@ -47,9 +48,9 @@ tariochbctools/plugins/check_portfolio_sum.py,sha256=naJ2j6BFpQhJhT2c-gfjyIdcYe0
|
|
47
48
|
tariochbctools/plugins/generate_base_ccy_prices.py,sha256=Phw314qox3jpNgC5-GcnmyYcLkMkrd8xsWS-wYwdj6o,1236
|
48
49
|
tariochbctools/plugins/prices/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
49
50
|
tariochbctools/plugins/prices/ibkr.py,sha256=GYCjnlF-MK-ZFPEr0M6T4iO3Etq0tMmrMlsHGInXUO8,1405
|
50
|
-
tariochbctools-1.
|
51
|
-
tariochbctools-1.
|
52
|
-
tariochbctools-1.
|
53
|
-
tariochbctools-1.
|
54
|
-
tariochbctools-1.
|
55
|
-
tariochbctools-1.
|
51
|
+
tariochbctools-1.1.0.dist-info/LICENSE.txt,sha256=VR2hkz3p9Sw4hSXc7S5iZTOXGeV4h-i8AO_q0zEmtkE,1074
|
52
|
+
tariochbctools-1.1.0.dist-info/METADATA,sha256=1Xewhm6I-36FpKtMwBGx1lUa9_QK7joDjJxBbvrk5PY,2168
|
53
|
+
tariochbctools-1.1.0.dist-info/WHEEL,sha256=pxeNX5JdtCe58PUSYP9upmc7jdRPgvT0Gm9kb1SHlVw,109
|
54
|
+
tariochbctools-1.1.0.dist-info/entry_points.txt,sha256=9xrCCY1wx2zCIsQUOWZelLHDmHw9Oc-ZBAKUIY9lKTA,88
|
55
|
+
tariochbctools-1.1.0.dist-info/top_level.txt,sha256=CiA_NepCI6zDNsaORA55zmpuJFSnTvLESraIL13xiOQ,15
|
56
|
+
tariochbctools-1.1.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|