summaryrefslogtreecommitdiff
path: root/README.md
blob: 35693524fcf32307ebb03a0a17ad8cc9de45c85a (plain)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Fracture

Fracture is an invoice registering system based on the command line.

It makes a heavy use of `EDITOR` environment variable that lets you edit
invoices based on python's `ConfigParser` module that are later written in a
SQLite database.

## Configuration

Run `fracture configure` for configuration. It will automatically open a sample
configuration file for you. Once it's filled it will store the configuration
file in `$XDG_CONFIG_HOME/fracture/config` (`XDG_CONFIG_HOME` falls back to
`$HOME/.config`). If configuration file is already set it will load the current
configuration file for you to edit.

You can use this example file as start:

```ini
[invoice]
id_format = "%%d/%%d/%%d/%%04d" %% (series, date.year, int(date.month/3+1), id)
templatedir = ~/projects/ElenQ/fracture-py/templates/

# Currency related, just the amount of decimal places and the currency to use.
currency = €
currency_decimal = 2

[series]
# This are the series *I* have, you can use any.
1 = Telecom
2 = Teaching
3 = Publishing
4 = Correction

[taxes]
# This are the extra taxes that you may apply to your earnings.
# Both key and value are used later.
IRPF = -0.15

[vat]
# Those names are not used, but are good for you to know what you mean
general = 0.21
reducido = 0.10
superreducido = 0.04
exento = 0.00
```

## Storage

Storage is done in the configuration directory (for the moment).

If you want to create a new invoice run `fracture new` and it will open an
empty invoice in your `EDITOR` of choice. Fill it, save and it will create and
store the invoice in the database.

## TODO

There is stuff to do but I didn't list it yet.

Like complex rendering with Latex and stuff like that:

```
pipenv run python fracture r 3/2020/3/0001 | xelatex --output-directory=output/
```