This commit is contained in:
50
README.md
Normal file
50
README.md
Normal 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"
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user