abrechenbarkeit/readme.md

31 lines
1.3 KiB
Markdown
Raw Permalink Normal View History

2024-11-03 17:31:13 +00:00
# Abrechenbarkeit v2
2024-10-30 12:50:17 +00:00
A _simpler_ trust based ledger.
2024-11-03 17:31:13 +00:00
The entire application is contained within `abrechenbarkeit.lua`. This script
2024-10-30 13:15:18 +00:00
implements CGI. It was tested against Lua version 5.4.7. Application data is
stored in a number of files in the process working directory (See below).
2024-10-30 12:50:17 +00:00
The repository also contains a configuration file for the
[gnix http server](https://codeberg.org/metamuffin/gnix) (`gnix.yaml`) which is
useful for development or proxyless deployments.
2024-10-30 13:15:18 +00:00
## Data Files
- `log` stores the transaction log as CSV (`time,user_a,user_b,amount,pcode,pcount,comment`)
- `products` stores the product list as CSV (`barcode,price,user,name`)
2024-10-31 01:00:42 +00:00
- `config` stores configuration parameters as ESV (`key=value`)
- `transaction_sound`: URL to sound played when creating a transaction
2024-11-13 19:42:08 +00:00
## Migration from Strichliste
```
curl 'http://strichliste.example.org/api/user?deleted=false' | jq -r '.users.[] | [ 0, "@Potential", .name, .balance, "", "", "" ] | join(",")' > log
curl 'http://strichliste.example.org/api/article' | jq -r '.articles.[] | [ .barcode, .amount, "@Drinks", .name ] | join(",")' > products
```
## Non-linked User lists
- list of Users with negative balance: `http://abrechenbarkeit.example.org/?negative`
- list of Users with balance lower than <amount>: `http://abrechenbarkeit.example.org/?negative&maximum=<amount>`