Module html

Module html 

Source
Expand description

Contains the methods to create a HTML file with statistics from a list of time logs.

StructsΒ§

ExtractedChartJs πŸ”’
The JavaScript extracted from the Charming-generated HTML files.
FileHtmlWriter πŸ”’
Default implementation that writes to actual files

EnumsΒ§

HtmlError
Errors that can occur during HTML file creation.

TraitsΒ§

HtmlWriter πŸ”’
Contains the method to abstract the writing of HTML files

FunctionsΒ§

create_chart_divs πŸ”’
Creates a string with index number of <div> tags for each chart.
create_html
Creates a HTML file that contains statistics and charts about the given time logs. Returns the path of the created HTML file.
create_html_string πŸ”’
Creates an HTML string from the given time logs and the HTML template which then is used to create the HTML page.
create_html_with_writer πŸ”’
Implementation of create_html() that takes a HtmlWriter to write the file.
create_table_timelogs_by_milestone πŸ”’
Creates a Table that shows the time spent per milestone.
create_table_timelogs_in_timeframes_by_user πŸ”’
Creates the Table that shows the time spent per user in the last N days.
create_table_todays_timelogs πŸ”’
Creates a table showing the time logs from today’s date. If there are no time logs, None is returned.
create_table_total_time_by_label πŸ”’
Creates the Table that shows the time spent per label.
create_timestamp πŸ”’
Creates a string with the current timestamp in the ISO 8601 format.
extract_charming_chart_js πŸ”’
Extracts the content of the last <script> tag from an HTML string.
extract_js_from_html_files πŸ”’
Extracts the content of the last <script> tag from an HTML file.
wrap_column_in_span πŸ”’
Wraps the given column index in a <span class='timestamp'> tag. The JS in the dashboard will then convert them to the user’s locale.