+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If your software can interact with users remotely through a computer
+network, you should also make sure that it provides a way for users to
+get its source. For example, if your program is a web application, its
+interface could display a "Source" link that leads users to an archive
+of the code. There are many ways you could offer source, and different
+solutions will be better for different programs; see section 13 for the
+specific requirements.
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU AGPL, see
+.
diff --git a/abrechenbarkeit.lua b/abrechenbarkeit.lua
index e607541..deaaf34 100755
--- a/abrechenbarkeit.lua
+++ b/abrechenbarkeit.lua
@@ -1,4 +1,21 @@
#!/usr/bin/env luajit
+--[[
+ Abrechenbarkeit - A simple trust-based ledger
+ Copyright 2024 metamuffin
+ Copyright 2024 dasriley
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, version 3 of the License only.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+]]--
local function escape(s)
return s:gsub("<", "<"):gsub("<", "<")
@@ -96,7 +113,7 @@ local function respond(status, title, body)
Abrechenbarkeit
Log
Products
- Source
+ About
]],
escape(title),
@@ -541,6 +558,18 @@ local function r_products()
end)
end
+local function r_about()
+ respond(200, "About Abrechenbarkeit", function()
+ print([[
+ About Abrechenbarkeit
+ Abrechenbarkeit is a simple trust-based ledger for keeping track of money spent on product.
+ Abrechenbarkeit is free software. It is licensed exclusively GNU Affero General Public License Version 3 only.
+
The source code is published on Codeberg. This is also where issues with this software should be reported.
+ Thanks for choosing Abrechenbarkeit.
+ ]])
+ end)
+end
+
local function extract_username()
if path == nil then
return respond_error("no path")
@@ -553,7 +582,9 @@ local function extract_username()
end
if path == "/" then
- if query.products then
+ if query.about then
+ return r_about()
+ elseif query.products then
return r_products()
elseif query.log then
return r_log()
diff --git a/locale/en.ini b/locale/en.ini
new file mode 100644
index 0000000..33705f5
--- /dev/null
+++ b/locale/en.ini
@@ -0,0 +1,37 @@
+appname=Abrechenbarkeit
+about=About
+field.amount=Amount
+field.barcode=Barcode
+field.comment=Comment
+field.count=Count
+field.name=Name
+field.price=Price
+field.upstream_price=Upstream Price
+field.username=Username
+index.form.create_user.submit=Continue
+index.form.create_user=User Creation
+log.actions.revert=Revert
+log.actions=Actions
+log=Log
+products.form.add=Add Product
+products.form.remove=Remove Product
+products.form.title=Product List
+products=Products
+time.day=day
+time.days=days
+time.delta_past=%d %s ago
+time.hour=hour
+time.hours=hours
+time.minute=minute
+time.minutes=minutes
+time.second=second
+time.seconds=seconds
+user.balance=Current balance:
+user.form.buy.submit=Buy
+user.form.buy=Buy Product
+user.form.restock.submit=Restock
+user.form.restock=Restock Product
+user.form.transaction.submit=Update
+user.form.transaction=Create Transaction
+user.last_txn=Last transaction added %s.
+user.view_log=View user log