diff options
author | metamuffin <metamuffin@disroot.org> | 2024-11-04 18:12:10 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-11-04 18:12:10 +0100 |
commit | 6a7a1448b9f13198a86d6dd98174d8f80fe49a3c (patch) | |
tree | c1fbc73acac224adbe8dad331f9b830b86df36f5 /abrechenbarkeit.lua | |
parent | 2494afa73ec954b321a004b124346de6f2d4f5ab (diff) | |
download | abrechenbarkeit-6a7a1448b9f13198a86d6dd98174d8f80fe49a3c.tar abrechenbarkeit-6a7a1448b9f13198a86d6dd98174d8f80fe49a3c.tar.bz2 abrechenbarkeit-6a7a1448b9f13198a86d6dd98174d8f80fe49a3c.tar.zst |
prepare localization
Diffstat (limited to 'abrechenbarkeit.lua')
-rwxr-xr-x | abrechenbarkeit.lua | 35 |
1 files changed, 33 insertions, 2 deletions
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 <https://www.gnu.org/licenses/>. +]]-- local function escape(s) return s:gsub("<", "<"):gsub("<", "<") @@ -96,7 +113,7 @@ local function respond(status, title, body) Abrechenbarkeit</a> <a href="/?log">Log</a> <a href="/?products">Products</a> - <a href="https://codeberg.org/metamuffin/strichliste">Source</a> + <a href="/?about">About</a> </nav> ]], escape(title), @@ -541,6 +558,18 @@ local function r_products() end) end +local function r_about() + respond(200, "About Abrechenbarkeit", function() + print([[ + <h1>About Abrechenbarkeit</h1> + <p>Abrechenbarkeit is a simple trust-based ledger for keeping track of money spent on product.</p> + <p>Abrechenbarkeit is free software. It is licensed exclusively GNU Affero General Public License Version 3 only.<p> + <p>The source code is published on <a href="https://codeberg.org/metamuffin/strichliste">Codeberg</a>. This is also where <a href="https://codeberg.org/metamuffin/strichliste/issues">issues with this software</a> should be reported.</p> + <p>Thanks for choosing Abrechenbarkeit.</p> + ]]) + 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() |