Source code for nkululeko.reporting.report_item

"""reportitem.py
a basic report snippet.
"""

import os.path


[docs]class ReportItem: def __init__(self, topic, caption, contents, image=None): self.topic = topic self.caption = caption self.contents = contents self.has_image = False if image is not None: self.image = os.path.abspath(image) self.has_image = True
[docs] def to_string(self): return ( f"topic: {self.topic}, caption: {self.caption}, contents: {self.contents}" )