- f.write("<FONT><UL STYLE='list-style-type:none'>")
- f.write("</UL></FONT></TD></TR></TABLE></DIV>\n")
- else:
- self.debug_print(
- "%d lines (max=%d chars): one column" % (num_lines, max_length)
- )
- f.write("<FONT><UL>%s</UL></FONT>" % contents)
- f.write("</DIV>")
- f.close()
+ f.write(f"""
+<p style="color:#ffffff; font-size:larger"><B>{note.title}</B></p>
+<HR style="border-top:3px solid white;">
+"""
+ )
+ if num_lines >= 10:
+ logger.debug(
+ f"{num_lines} lines: two column mode"
+ )
+ f.write('<TABLE BORDER=0 WIDTH=100%><TR valign="top">')
+ f.write(
+ '<TD WIDTH=50% style="color:#eeeeee; font-size:large">\n'
+ )
+ f.write("<FONT><UL STYLE='list-style-type:none'>")
+ count = 0
+ for x in individual_lines:
+ f.write(x + "\n")
+ count += 1
+ if count == num_lines / 2:
+ f.write("</UL></FONT></TD>\n")
+ f.write(
+ '<TD WIDTH=50% style="color:#eeeeee; font-size:large">\n'
+ )
+ f.write("<FONT><UL STYLE='list-style-type:none'>")
+ f.write("</UL></FONT></TD></TR></TABLE></DIV>\n")
+ else:
+ logger.debug(
+ f"{num_lines} lines: one column mode"
+ )
+ f.write(f"<FONT><UL>{contents}</UL></FONT>")
+ f.write("</DIV>")