Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alifeee/invoice_template
Template for making an invoice. Outputs HTML and PDF.
https://github.com/alifeee/invoice_template
invoice invoice-generator mustache playwright python
Last synced: 8 days ago
JSON representation
Template for making an invoice. Outputs HTML and PDF.
- Host: GitHub
- URL: https://github.com/alifeee/invoice_template
- Owner: alifeee
- Created: 2023-11-27T15:08:18.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-07-31T14:37:46.000Z (3 months ago)
- Last Synced: 2024-07-31T17:32:36.757Z (3 months ago)
- Topics: invoice, invoice-generator, mustache, playwright, python
- Language: Python
- Homepage:
- Size: 158 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Invoice Template
Template for making an invoice. Outputs HTML and PDF. Uses TOML for information, e.g.,
```toml
id = "001"
amount = "300"
issue_date = "2023-11-30"
due_date = "2023-12-30"[from]
name = "alifeee"[to]
name = "Garibaldi"[[items]]
title = "Biscuit Generation"
time_h = "1.5"
charge = "150"# ...
```...creates...
![Screenshot of PDF invoice, filled in with example data.](images/invoice.png)
## Commands
### Install dependencies
```bash
py -m venv env
pip install -r requirements.txt
playwright install
```### Make Invoice
First, add `invoice.toml` to the root of the repository, that looks like [`invoice.example.toml`](./invoice.example.toml). Then,
```bash
python build.py
```### Hot reload
This watches the template file and the TOML file, and rebuilds the build files when they change. For proper hot-reload, use VSCode's [live server](https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer) extension on the output `build/invoice.html` file.
```bash
python build.py --hot
```