https://github.com/alexflipnote/json_html
Python code that translates JSON template to HTML
https://github.com/alexflipnote/json_html
Last synced: about 1 year ago
JSON representation
Python code that translates JSON template to HTML
- Host: GitHub
- URL: https://github.com/alexflipnote/json_html
- Owner: AlexFlipnote
- License: mit
- Created: 2023-07-25T12:20:53.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-07-25T13:55:02.000Z (almost 3 years ago)
- Last Synced: 2025-01-11T16:38:25.718Z (over 1 year ago)
- Language: Python
- Size: 13.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# json_html.py
Python code that translates JSON template to HTML
## Requirements
- Python >=3.10
## Install
Simply use the command `pip install json-html` to install the package.
## Usage (Python)
```py
import json
from json_html import JSONHTML
with open("./FILENAME.json", "r", encoding="utf-8") as f:
data = json.load(f)
html = JSONHTML(data)
html.to_file("./FILENAME.html")
```
## Usage (Command)
```
usage: [-h] [-o OUTPUT] [-v] [filename]
Python code that translates JSON template to HTML
positional arguments:
filename JSON template file
options:
-h, --help show this help message and exit
-o OUTPUT, --output OUTPUT Output filename
-v, --version Show the version number and exit
```