From 6a7a1448b9f13198a86d6dd98174d8f80fe49a3c Mon Sep 17 00:00:00 2001 From: metamuffin Date: Mon, 4 Nov 2024 18:12:10 +0100 Subject: prepare localization --- abrechenbarkeit.lua | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) (limited to 'abrechenbarkeit.lua') 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() -- cgit v1.2.3-70-g09d2