36 lines
540 B
Markdown
36 lines
540 B
Markdown
# puppygirl
|
|
an easy to train html templating system
|
|
|
|
# usage
|
|
|
|
## cli
|
|
|
|
```
|
|
usage: puppygirl build [-h] [-p] INPUT OUTPUT
|
|
|
|
positional arguments:
|
|
INPUT
|
|
OUTPUT
|
|
|
|
options:
|
|
-h, --help show this help message and exit
|
|
-p, --pretty
|
|
```
|
|
|
|
```
|
|
$ puppygirl build --pretty index.html dist/index.html
|
|
```
|
|
|
|
## programmatically
|
|
```py
|
|
pg = Puppygirl(
|
|
renderer=ServerSideRenderer(),
|
|
elements=[PuppygirlDomme]
|
|
)
|
|
|
|
# parsed using the above config
|
|
parsed = pg.fetch("index.html")
|
|
|
|
using open("dist/index.html", "w") as f:
|
|
f.write(str(parsed))
|
|
```
|