From d6c1aac461721dd9ac8f99098b7316f3d24572ec Mon Sep 17 00:00:00 2001 From: Martin Puppe Date: Tue, 31 Oct 2017 18:02:14 +0100 Subject: [PATCH 1/6] Increment version number --- Uberspace.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Uberspace.lua b/Uberspace.lua index dafe84f..4ab4e94 100644 --- a/Uberspace.lua +++ b/Uberspace.lua @@ -4,7 +4,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. --]] -WebBanking{version = 1.00, +WebBanking{version = 1.01, url = 'https://uberspace.de/login', services = {'Uberspace.de'}, description = string.format( From a748cff082353e739df89cb47e797069cf13ee91 Mon Sep 17 00:00:00 2001 From: Martin Puppe Date: Tue, 31 Oct 2017 18:02:27 +0100 Subject: [PATCH 2/6] Rename variable --- Uberspace.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Uberspace.lua b/Uberspace.lua index 4ab4e94..099c48d 100644 --- a/Uberspace.lua +++ b/Uberspace.lua @@ -74,18 +74,18 @@ function RefreshAccount (account, since) local children = row:children() local pattern = '(%d%d)%.(%d%d)%.(%d%d%d%d)' local day, month, year = children:get(1):text():match(pattern) - local valueTime = os.time{day=day, month=month, year=year} + local bookingDate = os.time{day=day, month=month, year=year} - if valueTime < since then + if bookingDate < since then print('Stopping parsing because transaction is too old.') - print('Date of transaction: ' .. os.date('%c', valueTime)) + print('Date of transaction: ' .. os.date('%c', bookingDate)) print('since: ' .. os.date('%c', since)) break end local amount = ParseAmount(children:get(3):text()) table.insert(transactions, { - bookingDate = valueTime, + bookingDate = bookingDate, amount = amount }) end From 3e9464d858342f41a1c90fe51bb9773f5e2917eb Mon Sep 17 00:00:00 2001 From: Martin Puppe Date: Sun, 17 Dec 2017 14:04:51 +0100 Subject: [PATCH 3/6] Fix error with newly created Uberspace accounts Newly created Uberspace accounts do not display an account balance on the accounting page. The script has to handle that case. --- Uberspace.lua | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Uberspace.lua b/Uberspace.lua index 099c48d..f1bae9a 100644 --- a/Uberspace.lua +++ b/Uberspace.lua @@ -52,6 +52,11 @@ function RefreshAccount (account, since) function ParseAmount (amountString) local pattern = '(%-?%d+),(%d%d)' local euro, cent = amountString:match(pattern) + + if not euro or not cent then + return nil + end + euro = tonumber(euro) cent = tonumber(cent) / 100 if euro < 0 then @@ -90,8 +95,11 @@ function RefreshAccount (account, since) }) end - balanceElement = html:xpath('//*[@id="total"]') - balance = ParseAmount(balanceElement:text()) + local balanceElement = html:xpath('//*[@id="total"]') + local balance = ParseAmount(balanceElement:text()) + if not balance then + balance = 0 + end return {balance=balance, transactions=transactions} end From 0432c9087a12731b2d82ccf43cc1f904ef7ae041 Mon Sep 17 00:00:00 2001 From: Martin Puppe Date: Sun, 17 Dec 2017 14:08:14 +0100 Subject: [PATCH 4/6] Bump up version number to 1.02 --- Uberspace.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Uberspace.lua b/Uberspace.lua index f1bae9a..0319a3d 100644 --- a/Uberspace.lua +++ b/Uberspace.lua @@ -4,7 +4,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. --]] -WebBanking{version = 1.01, +WebBanking{version = 1.02, url = 'https://uberspace.de/login', services = {'Uberspace.de'}, description = string.format( From 92eb20f85c58d53b410116c5db5b4d72e6426cf0 Mon Sep 17 00:00:00 2001 From: Martin Puppe Date: Thu, 16 May 2019 22:15:06 +0200 Subject: [PATCH 5/6] Replace URL for dashboard The URL for the dashboard has changed. This commit replaces the old one with the new one. --- Uberspace.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Uberspace.lua b/Uberspace.lua index 0319a3d..61f9ea8 100644 --- a/Uberspace.lua +++ b/Uberspace.lua @@ -5,7 +5,7 @@ --]] WebBanking{version = 1.02, - url = 'https://uberspace.de/login', + url = 'https://dashboard.uberspace.de/login', services = {'Uberspace.de'}, description = string.format( MM.localizeText("Get balance and transactions for %s"), @@ -24,7 +24,7 @@ function InitializeSession (protocol, bankCode, username, username2, -- Login. usUsername = username - html = HTML(usConnection:get('https://uberspace.de/login')) + html = HTML(usConnection:get('https://dashboard.uberspace.de/login')) html:xpath('//input[@name="login"]'):attr('value', username) html:xpath('//input[@name="password"]'):attr('value', password) @@ -67,7 +67,7 @@ function RefreshAccount (account, since) end html = HTML(usConnection:get( - 'https://uberspace.de/dashboard/accounting')) + 'https://dashboard.uberspace.de/dashboard/accounting')) tableRows = html:xpath( '//*[@id="transactions"]//tr[count(td)=3][position() Date: Sat, 9 Nov 2024 21:40:29 +0100 Subject: [PATCH 6/6] Add link to fork --- README.markdown | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.markdown b/README.markdown index 7590bcb..d119815 100644 --- a/README.markdown +++ b/README.markdown @@ -1,5 +1,11 @@ # MoneyMoney extension for Uberspace.de accounts +> [!IMPORTANT] +> I will not update this extension anymore, but [there is a +> fork](https://github.com/hatobi/moneymoney-uberspace) by +> [@hatobi](https://github.com/hatobi) which is actively maintained and has +> additional functionality. + This extension for [MoneyMoney](https://moneymoney-app.com/) retrieves the balance and transactions from [Uberspace.de](https://uberspace.de/) accounts.