An open API service indexing awesome lists of open source software.

https://github.com/jagedn/asciidoctor-invoices


https://github.com/jagedn/asciidoctor-invoices

Last synced: 5 months ago
JSON representation

Awesome Lists containing this project

README

          

= Invoice Asciidoctor extension

A PoC AsciidoctorJS extension to render invoices

== Requirements

* nodejs or docker

== Instructions

- clone this repo
- install `asciidoctor-web-pdf` (see https://github.com/ggrossetie/asciidoctor-web-pdf)
- execute:

```
asciidoctor-web-pdf --template-require ./template.js \
--require ./invoice.js \
invoice.adoc \
-o out/2023-01-01.pdf \
-a invoice-file=./invoices/example.csv -a invoice-date=2023/01/01
```

see link:out/2023.pdf[]

## Arguments

- invoice-file: csv with the invoice
- invoice-date: a string

## Invoices extensions

### invoices:detail

Render a table with the content of the `invoice-file`

`invoices::details[separator=;,symbol=€]`

### invoices:total

Render a table with the total of the `invoice-file`

If `iva` is specified the extension will calculate it and create 2 more rows

`invoices::total[separator=;,iva=21,symbol=€]`