-
Notifications
You must be signed in to change notification settings - Fork 0
/
saldo.1
47 lines (33 loc) · 2.39 KB
/
saldo.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
.TH saldo 1 "April 2023" "saldo 0.1"
.SH NAME
saldo \- calculate the current saldo for a given month
.SH SYNOPSIS
\fBsaldo\fR [\fB\-\-config\fR|\fB\-cfg\fR \fIconfig_file\fR] [\fB\-\-today\fR|\fB\-t\fR] [\fB\-\-help\fR|\fB\-h\fR] [\fB\-\-edit\-config\fR|\fB\-c\fR] [\fB\-\-edit\fR|\fB\-e\fR \fIday\fR \fIexpense\fR] [\fB\-\-add\fR|\fB\-a\fR \fIday\fR \fIexpense\fR] [\fB\-\-new\-config\fR|\fB\-\-rebuild\-config\fR \fIincome\fR \fIexpenses\fR] [\fInumber\fR]
.SH DESCRIPTION
\fBsaldo\fR is a program that calculates the current saldo for a given month by reading expenses from a configuration file.
The \fB\-\-help\fR or \fB\-h\fR option displays the help text.
The \fB\-\-today\fR or \fB\-t\fR option displays only today and tomorrow values.
The \fB\-\-config\fR or \fB\-cfg\fR option may define user config.
The \fB\-\-edit\-config\fR or \fB\-c\fR option opens the configuration file in neovim, vim or nano for manual editing.
The \fB\-\-edit\fR or \fB\-e\fR option edits the expenses for the specified day.
The \fB\-\-add\fR or \fB\-a\fR option adds the specified expense to the existing expense for the specified day.
The \fB\-\-new\-config\fR or \fB\-\-rebuild\-config\fR option rebuilds the configuration file (for example, after starting a new month). You can also define \fIincome\fR and \fIfixed_expense\fR as parameters after this flag. Edit salary days manually. Be careful! This command deletes previous config file.
Without any flag, you can write just a number like \fBsaldo 1000\fR and this will work like \fBsaldo \-\-add \fI[today]\fR \fI1000\fR.
If the configuration file is not found, the program will generate one in \fB~/.local/share/saldo_config.txt\fR. The configuration file contains the income, fixed expenses and expenses for each day of the month. The program will then calculate the saldo for each day based on the daily budget (income - fixed expenses / days in the month). The daily budget and the saldo for each day will be displayed.
You can add comments in the config file after income an expense and betweed days. Just start line with \fI'#'\fR.
.SH EXAMPLE
.nf
To calculate the saldo for the current month:
.ft B
saldo
.ft R
To build config conf.txt in current directory with income 35000 and fixed expenses 12000:
.ft B
saldo -cfg conf.txt --new-config 35000 12000
.ft R
To add 400 to the existing expense for day 4:
.ft B
saldo --add 4 400
.ft R
.SH AUTHOR
saldo was written by asakura42