start readme, never finish it
This commit is contained in:
parent
d73d2d0e15
commit
6dd61f6d38
2 changed files with 38 additions and 2 deletions
36
README.md
Normal file
36
README.md
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
# 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))
|
||||||
|
```
|
|
@ -9,8 +9,8 @@ parser = ArgumentParser("puppygirl", add_help=True)
|
||||||
subparsers = parser.add_subparsers(dest="command")
|
subparsers = parser.add_subparsers(dest="command")
|
||||||
|
|
||||||
build = subparsers.add_parser("build", add_help=True)
|
build = subparsers.add_parser("build", add_help=True)
|
||||||
build.add_argument("input")
|
build.add_argument("input", metavar="INPUT")
|
||||||
build.add_argument("output")
|
build.add_argument("output", metavar="OUTPUT")
|
||||||
build.add_argument("-p", "--pretty", action="store_true")
|
build.add_argument("-p", "--pretty", action="store_true")
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
Loading…
Add table
Reference in a new issue