Skip to content

Commit 65f5e8d

Browse files
committed
update docs, tag for release
1 parent ac8fa1c commit 65f5e8d

File tree

4 files changed

+17
-8
lines changed

4 files changed

+17
-8
lines changed

README.md

+15-6
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,29 @@ This installs the CLI command, `jinja2html`, which can be used to generate html
2323

2424
## Usage
2525
```
26-
usage: jinja2html.py [-h] [--generate]
26+
usage: jinja2html.py [-h] [--generate] [--ignore IGNORE [IGNORE ...]] [--port PORT]
2727
28-
Renders jinja2 templates as html
28+
Developer friendly rendering of jinja2 templates.
2929
3030
optional arguments:
31-
-h, --help show this help message and exit
32-
--generate cause all jinja2 files in this directory to be rendered for prod
31+
-h, --help show this help message and exit
32+
--generate render all jinja2 files in the current directory, no livereload
33+
--ignore IGNORE [IGNORE ...]
34+
folders to ignore
35+
--port PORT serve website on this port
3336
```
3437

3538
#### Examples
3639
```bash
3740
# run in dev mode, in the current directory
38-
python jinja2html
41+
jinja2html
3942

4043
# generate html files for use in prod
41-
python jinja2html --generate
44+
jinja2html --generate
45+
46+
# generate html files for use in prod and ignore folders Foo/ and Bar/
47+
jinja2html --generate --ignore Foo/ Bar/
48+
49+
# run in dev mode, on port 8080 and ignore folder hello/world/
50+
jinja2html --port 8080 --ignore hello/world/
4251
```

__init__.py

Whitespace-only changes.

jinja2html.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ def build_html(path):
244244
# actually add the script
245245
body_tag.append(soup.new_tag("script", src="https://cdn.jsdelivr.net/npm/[email protected]/dist/livereload.min.js",
246246
integrity="sha256-pwYtkRoAac0pqizbVA5AP6Hqu37MkMjNOLF3tFx87jE=", crossorigin="anonymous"))
247-
output = soup.prettify()
247+
output = str(soup)
248248
except AttributeError:
249249
output = f"ERROR: Malformed or non-existent html in '{path}'. Doing nothing."
250250
logging.error(output)

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setuptools.setup(
77
name="jinja2html",
8-
version="0.1.0",
8+
version="0.2.0",
99
author="Fastily",
1010
author_email="[email protected]",
1111
description="friendly generation of websites with jinja2 templates",

0 commit comments

Comments
 (0)