Add --html flag for email-friendly HTML table output#29
Merged
Conversation
Agent-Logs-Url: https://github.com/FertigLab/ontrack/sessions/681c0cc2-9919-46f5-ac21-91ae05b69f37 Co-authored-by: dimalvovs <1246862+dimalvovs@users.noreply.github.com>
…aping check, document capitalize() behaviour Agent-Logs-Url: https://github.com/FertigLab/ontrack/sessions/681c0cc2-9919-46f5-ac21-91ae05b69f37 Co-authored-by: dimalvovs <1246862+dimalvovs@users.noreply.github.com>
Agent-Logs-Url: https://github.com/FertigLab/ontrack/sessions/681c0cc2-9919-46f5-ac21-91ae05b69f37 Co-authored-by: dimalvovs <1246862+dimalvovs@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
dimalvovs
May 8, 2026 20:40
View session
dimalvovs
approved these changes
May 8, 2026
Copilot stopped work on behalf of
dimalvovs due to an error
May 8, 2026 21:53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Plain-text column alignment in the report output breaks in proportional-font email clients. Adding
--htmlrenders the same data as inline-CSS HTML tables that look correct in any email client.New functions
_collect_meta_keys(entries)— ordered union of metadata field names across all entries (required fields first)_entry_to_html_row(...)— single directory entry →<tr>, all values passed throughhtml.escape()_print_html_entries(entries)— full<table>with adaptive columns (Groups, Files, Total Size omitted when absent) plus any metadata columns_print_html_report(report_data)—--reportsummary as two tables: per-track counts and per-user on-track shares with a total-average footer rowWiring
main()gainshtml_output: bool = False; selects HTML renderers over plain-text ones when set.--output(YAML to file) takes precedence when both flags are given.cli()gains--htmlargument.Usage
No new dependencies — uses stdlib
html.escape()throughout.