diff --git a/README.md b/README.md index af1c430..1c2ae31 100644 --- a/README.md +++ b/README.md @@ -4,19 +4,25 @@ is a simple command line tool to generate invoices for freelance work. It uses a on `jinja2` to generate the invoice in HTML and then converts it to a PDF using `xhtml2pdf`. -## inatallation +## Install Use python venv: ```bash -python -m venv venv -source venv/bin/activate +python -m venv .venv +source .venv/bin/activate ``` -Install the requirements: +Build and install executable: ```bash -pip install -r requirements.txt +python setup.py build +python setup.py install +``` + +See where it is installed: +```bash +which invoice ``` ## usage @@ -136,13 +142,11 @@ options: ## example ```bash -python src/main.py -b test_data -i invoice.yaml -e envelope.yaml -t test_data/templates +invoice -b test_data -i invoice.yaml -e envelope.yaml -t test_data/templates ``` ## to do -- make image path in invoice.yaml relative to invoice.yaml -- find out how to move an image to the right place in the pdf - give more structure to code - make code testable diff --git a/setup.py b/setup.py index 5a0971a..84a2ac4 100644 --- a/setup.py +++ b/setup.py @@ -28,4 +28,9 @@ setup( 'Programming Language :: Python :: 3.10', # Add more classifiers as needed ], + entry_points={ + 'console_scripts': [ + 'invoice = main:main', + ] + } )