reporter
This commit is contained in:
@@ -74,6 +74,7 @@ def main():
|
||||
|
||||
# 5a) NEW files — compute BLAKE3, batch INSERT
|
||||
skipped_files = []
|
||||
new_files = []
|
||||
if new_paths:
|
||||
print(f" Hashing {len(new_paths)} new files...")
|
||||
new_files = []
|
||||
@@ -251,6 +252,23 @@ def main():
|
||||
{rows}
|
||||
</table>"""
|
||||
|
||||
def _file_section(title, color, paths):
|
||||
if not paths:
|
||||
return ""
|
||||
rows = "".join(f"<tr><td style='padding:2px 8px;font-size:12px;'>{p}</td></tr>" for p in sorted(paths))
|
||||
return f"""
|
||||
<h3 style="color:{color};margin-top:18px;">{title} ({len(paths)})</h3>
|
||||
<table border="0" cellpadding="2" cellspacing="0" style="border-collapse:collapse;width:100%;font-family:monospace;">
|
||||
{rows}
|
||||
</table>"""
|
||||
|
||||
new_paths_ok = [nf["relative_path"] for nf in new_files]
|
||||
files_detail = (
|
||||
_file_section("✓ Nove soubory", "#2a7a2a", new_paths_ok)
|
||||
+ _file_section("✎ Zmenene soubory", "#a07000", list(modified_paths))
|
||||
+ _file_section("✗ Smazane soubory", "#a00000", list(deleted_paths))
|
||||
)
|
||||
|
||||
body = f"""
|
||||
<html><body style="font-family:Segoe UI,Arial,sans-serif;font-size:14px;color:#222;">
|
||||
<h2 style="color:#2e6da4;">✓ Dropbox Ordinace Backup – {ts}</h2>
|
||||
@@ -265,6 +283,7 @@ def main():
|
||||
{skipped_row}
|
||||
{report_line}
|
||||
</table>
|
||||
{files_detail}
|
||||
{skipped_detail}
|
||||
<p style="color:#888;font-size:12px;margin-top:20px;">REPORTER • {ts}</p>
|
||||
</body></html>
|
||||
|
||||
Reference in New Issue
Block a user