commit caf64f1fd45164c3f587a80752663e36d9c018f6
parent 276540d5d93f6478713b6c70cf42ef561df0c71b
Author: lash <dev@holbrook.no>
Date: Sat, 3 Dec 2022 18:50:50 +0000
Preserve proper hierarchy on html output of states, issues, messages
Diffstat:
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/piknik/render/html.py b/piknik/render/html.py
@@ -19,6 +19,7 @@ class Accumulator:
def __init__(self, w=sys.stdout):
self.doc = None
self.category = ul(_id='state_list')
+ self.category_content = None
self.issue = None
self.msg = None
self.envelope = None
@@ -43,8 +44,9 @@ class Accumulator:
if len(v_id) > 1:
if v_id[:2] == 's_':
if self.issue != None:
- self.category.add(self.issue)
- self.category.add(v)
+ self.category_content.add(self.issue)
+ self.category.add(li(self.category_content))
+ self.category_content = v
self.issue = ul(_id='issue_list_' + v_id[2:])
elif v_id[:2] == 'i_':
logg.debug('issue now')
diff --git a/piknik/runnable/show.py b/piknik/runnable/show.py
@@ -15,7 +15,7 @@ from piknik import Issue
from piknik.store import FileStoreFactory
from piknik.crypto import PGPSigner
-logging.basicConfig(level=logging.WARNING)
+logging.basicConfig(level=logging.DEBUG)
logg = logging.getLogger()
argp = argparse.ArgumentParser()