#cli #invoice #git

app ucelofka

Simple program to issue invoices

4 releases (2 breaking)

0.3.0 Feb 21, 2020
0.2.0 Jan 4, 2020
0.1.1 Jan 2, 2020
0.1.0 Jan 2, 2020

#128 in #git

GPL-3.0 license

49KB
1.5K SLoC

Ucelofka

A program to issue simple invoices via command line. It is a simple invoice system for the people which are able to use GIT.

Program itself is supposed to operate over a file/directory strucutre which can be inserted into GIT and maintained there.

The data files should be stored in YAML format.

The default output is supposed to be a html file which can be used to generate pdf inside your favorite browser.

Installation

cargo install --path .

Common workflow

A common procedure how ucelofka should be used.

First we need to create a data directory.

$ ucelofka project make --target ucelofka-data

You can observe the content of the directory afterwards and edit the yaml files. Afterwards It is a good idea to initialize a GIT repository, add the files and create initial commit.

$ cd ucelofka
$ git init .
$ git add *
$ git commit -m "Initial data"

Lets create an invoice afterwards.

$ ucelofka invoice --path . create --account first_account --customer first_customer --entry 001_first_entry --identity first_identity
Created invoice 202000001

You can edit the invoice data manually. After that you can simply render the new invoice.

$ ucelofka invoice render -T default.html -I 202000001

Not you can open the generated file in the browser and print it as PDF which can be sent to your customer. Don't forget to put it in GIT afterwards.

$ git add invoices/202000001.yml output/202000001.html
$ git commit -m "January 2020"

If you want to create another invoice entry for the next month you can simply.

$ ucelofka entry create --currency USD --id 002_second_entry --name "IT services" --price 2000 --detail "Programming" --detail "Deployment"

The rest of the procedure is the same.

$ ucelofka invoice --path . create --account first_account --customer first_customer --entry 002_second_entry --identity first_identity
$ ucelofka invoice render -T default.html -I 202000002
$ git add invoices/202000002.yml output/202000002.html
$ git commit -m "February 2020"

Default data directory structure

/accounts

  • Your bank accounts (were money should be sent).

/customers

  • Data of your customers.

/entries

  • Items which will be billed to your customer(s).

/identities

  • Your billing info.

/invoices

  • Issued invoices.

/output

  • Rendered invoices.

/templates

  • Templates which should be used for rendering the invoice.

Dependencies

~19MB
~434K SLoC