Initial
Some checks failed
Build and Publish Docker Image / build (push) Failing after 17s

This commit is contained in:
2024-11-11 10:26:47 +13:00
commit 6c6c837301
10 changed files with 561 additions and 0 deletions

50
README.md Normal file
View File

@@ -0,0 +1,50 @@
# hinpdof
`hinpdof` is a FastAPI-based app that converts HTML content to PDF using WeasyPrint.
## Features
- Convert HTML content to PDF
- Customizable PDF filenames
- Health check endpoint
## Requirements
- Python 3.12+
- FastAPI
- WeasyPrint
- Uvicorn
## Installation
1. Clone the repository:
```sh
git clone https://git.nice.net.nz/hinpdof.git
cd hinpdof
```
2. Install dependencies using Poetry:
```sh
poetry install
```
3. Run the application:
```sh
poetry run uvicorn app:app --reload
```
## Usage
### Convert HTML to PDF
Send a POST request to `/pdf` with the following JSON body:
```json
{
"html": "<h1>Hello, World!</h1>",
"filename": "testfile"
}
```