Metadata-Version: 2.1
Name: shiny-invoice
Version: 0.4.0
Summary: Simply manage invoices
License: MIT License
        
        Copyright (c) 2024 dtrai2
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Keywords: invoice,finance,accounting
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Office/Business :: Financial :: Accounting
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: shiny
Requires-Dist: click
Requires-Dist: ruamel.yaml
Requires-Dist: pandas
Requires-Dist: pydantic
Requires-Dist: tinydb
Provides-Extra: dev
Requires-Dist: black; extra == "dev"
Requires-Dist: pylint; extra == "dev"
Requires-Dist: pre-commit; extra == "dev"

# Shiny Invoice

This tool is meant as a simple and naive way to manage invoices locally.
It is not meant to be published online and used as an enterprise tool.


## Run

### With Python

To run `shiny-invoice` you need install it with:

```bash
pip install shiny-invoice
```

Once `shiny-invoice` is installed you need to create configuration file.
A suitable default configuration can be generated with
```bash
shiny-invoice generate-default-config
```

Once everything is set up you can run `shiny-invoice` with:

```bash
shiny-invoice run --config default_config.yaml
```

More information you can find with

```bash
shiny-invoice --help
shiny-invoice run --help
```

### With Container

Execute the following line in a directory that has the `config.yaml` file.
```bash
podman pull ghcr.io/dtrai2/shiny_invoice:latest
podman run -p 8000:8000 --volume .:/home/app -ti --rm shiny_invoice:latest run --config config.yaml
```

## Workflow

This application manages the invoices as plain html files, named by the invoice id.
To turn the html file into a pdf just use the browsers print functionality.
All the data corresponding to the invoices is stored inside a json file, which is configured with the key
`paths.datastore`.
The json you can edit as you like, via the gui it is only possible to change the 'Paid At' value.
This value is also used to determine if in invoice is indeed 'Paid' or 'Unpaid'.

## Impressions

### View of creating a new invoice
![new-invoice.png](docs/new-invoice.png)

### View of existing invoices
![existing-invoices.png](docs/existing-invoices.png)
