:py:mod:`imessagedb.generate_html`
==================================
.. py:module:: imessagedb.generate_html
Module Contents
---------------
Classes
~~~~~~~
.. autoapisummary::
imessagedb.generate_html.HTMLOutput
Functions
~~~~~~~~~
.. autoapisummary::
imessagedb.generate_html._replace_url_to_link
Attributes
~~~~~~~~~~
.. autoapisummary::
imessagedb.generate_html.url_pattern
imessagedb.generate_html.mailto_pattern
.. py:data:: url_pattern
.. py:data:: mailto_pattern
.. py:function:: _replace_url_to_link(value: str) -> str
From https://gist.github.com/guillaumepiot/4539986
.. py:class:: HTMLOutput(database, me: str, messages: imessagedb.messages.Messages, inline: bool = False, output_file: str = None)
Creates an HTML file (or string) from a Messages list
...
There are a number of options in the configuration file that affect how the HTML is created.
In the CONTROL section, the following impact the output:
copy = True :
If the attachments are not copied, they are not available on the HTML output.
There are two reasons for that. 1) The web browser does not have access to the directory
that the attachments are stored, so it cannot display them 2) Some attachments need
to be converted in order to be viewed in the browser, and need a place to live.
skip attachments = False :
If true, attachments will not be available in the HTML output
In the DISPLAY section, the following impact the output:
inline attachments = False :
If inline attachments are true, then the images will be part of the HTML. If
it is false, then there will be a popup when you hover over the attachment text that will show
the attachment on demand. This will make the load much faster and the output far less cluttered.
me = Me :
The name to put for your part of the conversation. It defaults to 'Me'.
html background color list = AliceBlue, Cyan, Gold, Lavender, LightGreen, PeachPuff, Wheat
html name color list = Blue, DarkCyan, DarkGoldenRod, Purple, DarkGreen, Orange, Sienna :
The background and name color of the messages in html output
The options for colors can be found here: https://www.w3schools.com/cssref/css_colors.php
The way that the color selection works is that it will use the first color on the color list for the
first person in the conversation, the second for the second, third for the third, etc. If there are more
participants than colors, it will wrap around to the first color.
thread background = HoneyDew :
The background color of the thread in replies
.. py:method:: __repr__() -> str
Return repr(self).
.. py:method:: save(filename: str) -> None
Write the output to the output file
.. py:method:: print() -> None
Print the output to stdout
.. py:method:: _print_and_save(message: str, array: list, new_day: bool = False, eof: bool = False) -> None
Save to the output file while it is processing
.. py:method:: _generate_thread_row(message: imessagedb.message.Message) -> str
.. py:method:: _generate_thread_table(message_list: list, style: str) -> str
.. py:method:: _generate_table(message_list: imessagedb.messages.Messages) -> str
.. py:method:: _get_next_color()
A generator function to return the next color
.. py:method:: _get_name(handle_id: str) -> dict
.. py:method:: _generate_row(message: imessagedb.message.Message) -> str
.. py:method:: _generate_head() -> str