diff --git a/README.md b/README.md index c0b6f51e0e3a87a478576bff04a6929157b1bf03..fbdd187313d21e32999338779aa9e2e3ee34c102 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,9 @@ open invoice.pdf Example invoice -Save repeated information with environment variables or in an overridable JSON file: +### Environment + +Save repeated information with environment variables: ```bash export INVOICE_LOGO=/path/to/image.png @@ -34,16 +36,6 @@ export INVOICE_TAX=0.13 export INVOICE_RATE=25 ``` -```json -{ - "logo": "/path/to/image.png", - "from": "Dream, Inc.", - "to": "Imagine, Inc.", - "tax": 0.13, - "rates": 25 -} -``` - Generate new invoice: ```bash @@ -53,8 +45,26 @@ invoice generate \ --note "For debugging purposes." \ --output duck-invoice.pdf ``` + +### Configuration File + +Or, save repeated information with JSON / YAML: + +```json +{ + "logo": "/path/to/image.png", + "from": "Dream, Inc.", + "to": "Imagine, Inc.", + "tax": 0.13, + "rates": 25 +} +``` + +Generate new invoice by importing the configuration file: + ```bash -invoice generate --import path/to/data.json --output duck-invoice.pdf +invoice generate --import path/to/data.json \ + --output duck-invoice.pdf ``` ### Custom Templates