This commit is contained in:
2026-04-28 06:11:30 +02:00
parent 2de8711ab7
commit 52f04c2839
+19
View File
@@ -74,6 +74,7 @@ def main():
# 5a) NEW files — compute BLAKE3, batch INSERT # 5a) NEW files — compute BLAKE3, batch INSERT
skipped_files = [] skipped_files = []
new_files = []
if new_paths: if new_paths:
print(f" Hashing {len(new_paths)} new files...") print(f" Hashing {len(new_paths)} new files...")
new_files = [] new_files = []
@@ -251,6 +252,23 @@ def main():
{rows} {rows}
</table>""" </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("&#10003; Nove soubory", "#2a7a2a", new_paths_ok)
+ _file_section("&#9998; Zmenene soubory", "#a07000", list(modified_paths))
+ _file_section("&#10007; Smazane soubory", "#a00000", list(deleted_paths))
)
body = f""" body = f"""
<html><body style="font-family:Segoe UI,Arial,sans-serif;font-size:14px;color:#222;"> <html><body style="font-family:Segoe UI,Arial,sans-serif;font-size:14px;color:#222;">
<h2 style="color:#2e6da4;">&#10003; Dropbox Ordinace Backup &ndash; {ts}</h2> <h2 style="color:#2e6da4;">&#10003; Dropbox Ordinace Backup &ndash; {ts}</h2>
@@ -265,6 +283,7 @@ def main():
{skipped_row} {skipped_row}
{report_line} {report_line}
</table> </table>
{files_detail}
{skipped_detail} {skipped_detail}
<p style="color:#888;font-size:12px;margin-top:20px;">REPORTER &bull; {ts}</p> <p style="color:#888;font-size:12px;margin-top:20px;">REPORTER &bull; {ts}</p>
</body></html> </body></html>