docs: update README

This commit is contained in:
teutat3s 2023-12-15 22:01:00 +01:00
parent 2ced1375b3
commit ce1b0d862f
Signed by: teutat3s
GPG key ID: 4FA1D3FA524F22C1

View file

@ -1,24 +1,42 @@
Quick start # pub.solar finances
This repository is used to track the finances of pub.solar transparently.
We use [hledger](https://hledger.org/) to create finance report in a minimalistic, terminal friendly
way.
### Quick start
Installing hledger with [nix](https://nixos.org/download), the package manager.
``` ```
nix shell latest#hledger latest#hledger-web git clone gitea@git.pub.solar:pub-solar/finances.git finances && cd $_
nix develop
``` ```
Report without negative numbers or with [direnv](https://github.com/nix-community/nix-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 hledger incomestatement --file ./finances.hledger --layout bare --pretty --drop 1
``` ```
Web report for viewing it in a browser Creating a web report, viewable in a browser
``` ```
hledger-web --file ./finances.hledger hledger-web --file ./finances.hledger
``` ```
Write HTML table to README Writing a HTML table to the README
``` ```
hledger incomestatement --file ./finances.hledger --layout bare --pretty --drop 1 -O html >> README.md hledger incomestatement --file ./finances.hledger --layout bare --pretty --drop 1 -O html >> README.md
``` ```
Test generated report table ### Finances report table
<style> <style>
td { padding:0 0.5em; } td { padding:0 0.5em; }
td:nth-child(1) { white-space:nowrap; } td:nth-child(1) { white-space:nowrap; }