aboutsummaryrefslogtreecommitdiffstats
path: root/parser.py
diff options
context:
space:
mode:
authorjwansek <eddie.atten.ea29@gmail.com>2022-03-12 21:22:31 +0000
committerjwansek <eddie.atten.ea29@gmail.com>2022-03-12 21:22:31 +0000
commitbdb0545b27d6d862599be9d01f8232fcc4e0bc7c (patch)
tree929415992f8d9ca00e26d5ed3a948bb1b8b79f86 /parser.py
parent799284d7065f8db02e7c8d935def80b7a2dd6f9f (diff)
downloadboymoder.blog-bdb0545b27d6d862599be9d01f8232fcc4e0bc7c.tar.gz
boymoder.blog-bdb0545b27d6d862599be9d01f8232fcc4e0bc7c.zip
added some comments, removed some prints
Diffstat (limited to 'parser.py')
-rwxr-xr-xparser.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/parser.py b/parser.py
index c5c8755..192c931 100755
--- a/parser.py
+++ b/parser.py
@@ -89,7 +89,11 @@ def get_headers(html):
headers = [(i[0], i[1] - thesmallestlevel, i[2]) for i in headers]
# print(headers)
+ # there is a bug here-
+ # it must start with the largest header and only go up and down in increments of one
+ # TODO: fix it!
md_template = jinja2.Template("""
+ - dummy header
{% for text, depth, link in contents %}
{{ " " * depth }} - [{{ text }}]({{ link }})
{% endfor %}