import | ||
.envrc | ||
.gitignore | ||
finances.hledger | ||
flake.lock | ||
flake.nix | ||
README.md |
pub.solar finances
This repository is used to track the finances of pub.solar transparently. We use hledger to create finance report in a minimalistic, terminal friendly way.
Finances report tables
Income Statement 2023-01-01..2024-10-28 | ||||
---|---|---|---|---|
Commodity | 2023 | 2024 | Total | |
Revenues | ||||
bank:interest | € | 0 | 1.20 | 1.20 |
donations:member | € | 415.00 | 1097.87 | 1512.87 |
donations:non-member | € | 87.00 | 313.43 | 400.43 |
total | € | 502.00 | 1412.50 | 1914.50 |
Expenses | ||||
infra:domain | € | 52.40 | 0 | 52.40 |
infra:file-storage | € | 26.02 | 48.24 | 74.26 |
infra:server | € | 124.47 | 460.54 | 585.01 |
total | € | 202.89 | 508.78 | 711.67 |
Net: | € | 299.11 | 903.72 | 1202.83 |
Monthly income in 2023-01-01..2024-10-31:
account | 2023-01 | 2023-02 | 2023-03 | 2023-04 | 2023-05 | 2023-06 | 2023-07 | 2023-08 | 2023-09 | 2023-10 | 2023-11 | 2023-12 | 2024-01 | 2024-02 | 2024-03 | 2024-04 | 2024-05 | 2024-06 | 2024-07 | 2024-08 | 2024-09 | 2024-10 |
income | €20.00 | 0 | 0 | 0 | €12.00 | 0 | €10.00 | €55.00 | €5.00 | €205.00 | €75.00 | €120.00 | €120.00 | €110.00 | €154.43 | €97.36 | €142.51 | €114.61 | €162.00 | €105.39 | €241.20 | €165.00 |
total | €20.00 | 0 | 0 | 0 | €12.00 | 0 | €10.00 | €55.00 | €5.00 | €205.00 | €75.00 | €120.00 | €120.00 | €110.00 | €154.43 | €97.36 | €142.51 | €114.61 | €162.00 | €105.39 | €241.20 | €165.00 |
---|
Monthly expenses in 2023-01-01..2024-10-31:
account | 2023-01 | 2023-02 | 2023-03 | 2023-04 | 2023-05 | 2023-06 | 2023-07 | 2023-08 | 2023-09 | 2023-10 | 2023-11 | 2023-12 | 2024-01 | 2024-02 | 2024-03 | 2024-04 | 2024-05 | 2024-06 | 2024-07 | 2024-08 | 2024-09 | 2024-10 |
expenses | €-2.22 | 0 | 0 | 0 | €-1.22 | €-3.36 | €-4.01 | €-3.99 | €-5.25 | €-98.59 | €-40.22 | €-44.03 | €-46.27 | €-48.73 | €-8.64 | €-31.86 | €-50.14 | €-51.73 | €-54.65 | €-76.93 | €-76.01 | €-63.82 |
total | €-2.22 | 0 | 0 | 0 | €-1.22 | €-3.36 | €-4.01 | €-3.99 | €-5.25 | €-98.59 | €-40.22 | €-44.03 | €-46.27 | €-48.73 | €-8.64 | €-31.86 | €-50.14 | €-51.73 | €-54.65 | €-76.93 | €-76.01 | €-63.82 |
---|
Import new statements
- place csv file into import directory
- rename to
expenses.csv
for expenses or - rename to
donations-member.csv
for donations of members - rename to
donations-non-member.csv
for donations of non-members
- rename to
- execute
hledger import -f finances.hledger import/<csv-file>
Quick start how to use hledger
Installing hledger with nix, the package manager.
git clone gitea@git.pub.solar:pub-solar/finances.git finances && cd $_
nix develop
or with direnv.
git clone gitea@git.pub.solar:pub-solar/finances.git finances && cd $_
direnv allow
Creating a report without negative numbers
hledger incomestatement --file ./finances.hledger --layout bare --pretty --drop 1
Creating a web report, viewable in a browser
hledger-web --file ./finances.hledger
Writing a HTML table to the README
hledger incomestatement --file ./finances.hledger --layout bare --pretty --drop 1 --output-format html --yearly --row-total \
| sed 's|</table>|</table>\n|' \
| sed -i '/^<style>/,/^<\/style>/{
r /dev/stdin
d
}' README.md
Writing monthly tables to the README
hledger bal --depth=1 ^income --monthly --output-format html --invert -f ./finances.hledger
hledger bal --depth=1 ^expenses --monthly --output-format html --invert -f ./finances.hledger