diff --git a/README.md b/README.md new file mode 100644 index 0000000..7c527c2 --- /dev/null +++ b/README.md @@ -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)) +``` diff --git a/puppygirl/__main__.py b/puppygirl/__main__.py index e5d1160..ec8690d 100644 --- a/puppygirl/__main__.py +++ b/puppygirl/__main__.py @@ -9,8 +9,8 @@ parser = ArgumentParser("puppygirl", add_help=True) subparsers = parser.add_subparsers(dest="command") build = subparsers.add_parser("build", add_help=True) -build.add_argument("input") -build.add_argument("output") +build.add_argument("input", metavar="INPUT") +build.add_argument("output", metavar="OUTPUT") build.add_argument("-p", "--pretty", action="store_true") def main():