Financial statements of pub.solar n.e.V.
Find a file
2025-02-01 11:07:40 -03:00
import Update finances to 27.01.2025 2025-01-27 15:16:47 -03:00
.envrc feat: initial flake devshell for hledger 2023-12-15 20:42:56 +01:00
.gitignore fix: ignore CSV files to avoid uploading them 2024-04-07 16:37:16 +02:00
finances.hledger finances: fix duplicate entries 2025-01-27 16:04:37 -03:00
flake.lock chore: update flake inputs 2024-04-07 16:03:19 +02:00
flake.nix feat: initial flake devshell for hledger 2023-12-15 20:42:56 +01:00
README.md README: update income and expenses 2024-01-31 2025-02-01 11:07:40 -03:00

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..2025-12-31

Commodity202320242025Total
 
Revenues
bank:interest02.7802.78
donations:member415.001437.8795.001947.87
donations:non-member87.00353.4320.00460.43
total502.001794.08115.002411.08
 
Expenses
infra:domain52.400119.86172.26
infra:file-storage26.0248.24074.26
infra:server124.47667.2296.74888.43
taxes00.4200.42
total202.89715.88216.601135.37
 
Net:299.111078.20-101.601275.71

Monthly income in 2023-01-01..2025-01-31:

account2023-012023-022023-032023-042023-052023-062023-072023-082023-092023-102023-112023-122024-012024-022024-032024-042024-052024-062024-072024-082024-092024-102024-112024-122025-01
income€20.00000€12.000€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€235.00€145.00€166.58€115.00
total€20.00000€12.000€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€235.00€145.00€166.58€115.00

Monthly expenses in 2023-01-01..2025-01-31:

account2023-012023-022023-032023-042023-052023-062023-072023-082023-092023-102023-112023-122024-012024-022024-032024-042024-052024-062024-072024-082024-092024-102024-112024-122025-01
expenses€-2.22000€-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€-91.90€-79.78€-99.24€-216.60
total€-2.22000€-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€-91.90€-79.78€-99.24€-216.60

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
  • 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