Skip to content

Commit

Permalink
update docs, tag for release
Browse files Browse the repository at this point in the history
  • Loading branch information
fastily committed Jul 23, 2020
1 parent ac8fa1c commit 65f5e8d
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 8 deletions.
21 changes: 15 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,29 @@ This installs the CLI command, `jinja2html`, which can be used to generate html

## Usage
```
usage: jinja2html.py [-h] [--generate]
usage: jinja2html.py [-h] [--generate] [--ignore IGNORE [IGNORE ...]] [--port PORT]
Renders jinja2 templates as html
Developer friendly rendering of jinja2 templates.
optional arguments:
-h, --help show this help message and exit
--generate cause all jinja2 files in this directory to be rendered for prod
-h, --help show this help message and exit
--generate render all jinja2 files in the current directory, no livereload
--ignore IGNORE [IGNORE ...]
folders to ignore
--port PORT serve website on this port
```

#### Examples
```bash
# run in dev mode, in the current directory
python jinja2html
jinja2html

# generate html files for use in prod
python jinja2html --generate
jinja2html --generate

# generate html files for use in prod and ignore folders Foo/ and Bar/
jinja2html --generate --ignore Foo/ Bar/

# run in dev mode, on port 8080 and ignore folder hello/world/
jinja2html --port 8080 --ignore hello/world/
```
Empty file added __init__.py
Empty file.
2 changes: 1 addition & 1 deletion jinja2html.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def build_html(path):
# actually add the script
body_tag.append(soup.new_tag("script", src="https://cdn.jsdelivr.net/npm/[email protected]/dist/livereload.min.js",
integrity="sha256-pwYtkRoAac0pqizbVA5AP6Hqu37MkMjNOLF3tFx87jE=", crossorigin="anonymous"))
output = soup.prettify()
output = str(soup)
except AttributeError:
output = f"ERROR: Malformed or non-existent html in '{path}'. Doing nothing."
logging.error(output)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="jinja2html",
version="0.1.0",
version="0.2.0",
author="Fastily",
author_email="[email protected]",
description="friendly generation of websites with jinja2 templates",
Expand Down

0 comments on commit 65f5e8d

Please sign in to comment.