commit 334466985b8ee76fa75798aa9a25131ea8522c87
parent c80c21023b7bd91d72f62d365d71aefc60f5aa15
Author: lash <dev@holbrook.no>
Date: Thu, 10 Aug 2023 09:13:22 +0100
Add comments heading in html, sender info
Diffstat:
6 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/CHANGELOG b/CHANGELOG
@@ -1,3 +1,6 @@
+- 0.3.17:
+ * Add comments heading for comments section in html
+ * Reinstate sender information in html message render
- 0.3.16:
* Add pypi project description
- 0.3.15:
diff --git a/man/man1/piknik.1 b/man/man1/piknik.1
@@ -39,7 +39,7 @@ comment < -i issue_id > [ -d store_dir ] [ [ -x "text content" ... ] [ -y file
.SH DESCRIPTION
.P
This tool enables issue tracking by command line interface.
-
+.P
After an issue has been created it can move through different pre-defined, kanban-like states. They can also be tagged, assigned and commented on.
diff --git a/piknik/cli/show.py b/piknik/cli/show.py
@@ -98,7 +98,9 @@ def main():
renderer = m.Renderer(ctx.basket, wrapper=verifier, accumulator=accumulator, states_include=ctx.show_states, states_skip=states_skip)
renderer.apply_begin()
+ renderer.apply_issue_pre(state, issue, tags)
renderer.apply_issue(state, issue, tags)
+ renderer.apply_issue_post(state, issue, tags)
renderer.apply_end()
reset_accumulator()
diff --git a/piknik/render/base.py b/piknik/render/base.py
@@ -89,6 +89,10 @@ class Renderer:
pass
+ def apply_issue_mid(self, state, issue, tags, accumulator=None):
+ pass
+
+
def apply_issue(self, state, issue, tags, accumulator=None):
def envelope_callback(envelope, envelope_type):
diff --git a/piknik/render/html.py b/piknik/render/html.py
@@ -64,11 +64,13 @@ class Accumulator:
self.issue = v
self.msg = ol(_id='message_list')
self.issues.append(v_id[2:])
+ elif v_id[:4] == 'd_c_':
+ self.issue.add(v)
elif v_id[:2] == 'm_':
if self.envelope != None:
self.msg.add(self.envelope)
#self.envelope_content = v
- self.envelope = li()
+ self.envelope = li(v)
elif v_id[:4] == 'd_m_':
self.envelope.add(v)
else:
@@ -151,6 +153,9 @@ class Renderer(BaseRenderer):
self.add(r)
+ r = self.apply_issue_mid(state, issue, tags, accumulator=accumulator)
+ self.add(r)
+
super(Renderer, self).apply_issue(state, issue, tags, accumulator=accumulator)
@@ -177,6 +182,7 @@ class Renderer(BaseRenderer):
def apply_message_part(self, state, issue, tags, envelope, message, message_date, message_content, accumulator=None):
+ logg.debug('env {}'.format(envelope.sender))
r = None
if message_content['filename'] != None:
s = 'data:{}/{};base64,{}'.format(
@@ -212,3 +218,8 @@ class Renderer(BaseRenderer):
def apply_end(self, accumulator=None):
self.add(())
return None
+
+
+ def apply_issue_mid(self, state, issue, tags, accumulator=None):
+ logg.debug('>>>>>>>> foo')
+ return h2('comments', _id='d_c_{}'.format(issue.id))
diff --git a/setup.cfg b/setup.cfg
@@ -1,6 +1,6 @@
[metadata]
name = piknik
-version = 0.3.16
+version = 0.3.17
description = CLI issue tracker
author = Louis Holbrook
author_email = dev@holbrook.no