From b1771baa2d8d23500b794df9f7faff034c4f6910 Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Thu, 25 Mar 2021 19:53:26 +1100 Subject: [PATCH] providing some totals via the code, and fudging numbers to show how many keep/del due to auto rules, and how many manual choices left --- templates/dups.html | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/templates/dups.html b/templates/dups.html index 83d731b..d5173a9 100644 --- a/templates/dups.html +++ b/templates/dups.html @@ -67,6 +67,7 @@ {% set page=namespace(cnt=0) %} {% set pref=namespace(have="") %} {% set count=namespace( del=0, keep=0 ) %} + {% set all_count=namespace( d_files=0, k_files=0, sets=0 ) %} {# for each hash in ip_to_sp_dups_*, auto keep the _keep, auto delete the _del, only need hidden input #} {% for h in DD.ip_to_sp_dups_keep %} @@ -75,6 +76,9 @@ {% endfor %} {% if count.keep %} {% set auto.str = auto.str + "
  • Keeping {} files in storage path and deleting {} from import path
  • ".format(count.keep, count.del) %} + {% set all_count.sets = all_count.sets + count.keep %} + {% set all_count.k_files = all_count.k_files + count.keep %} + {% set all_count.d_files = all_count.d_files + count.del %} {% endif %}
    Choose between these files:
    {% set count=namespace( del=0, keep=0 ) %} @@ -125,6 +129,9 @@ {% if count.keep %} {% set auto.str = auto.str + "
  • Keeping {} files inside storage path, Deleting {} duplicates files from storage path
  • ".format(count.keep, count.del) %} + {% set all_count.sets = all_count.sets + count.keep %} + {% set all_count.k_files = all_count.k_files + count.keep %} + {% set all_count.d_files = all_count.d_files + count.del %} {% endif %} {% set count=namespace( keep_d=0, keep_f=0 ) %} @@ -169,6 +176,9 @@ {% if count.keep_d %}
    {% set auto.str = auto.str + "
  • Keeping {} files in {} paths, Deleting={} file in {} paths
  • ".format( count.keep_f, count.keep_d, count.keep_f, count.keep_d) %} + {% set all_count.sets = all_count.sets + count.keep_d %} + {% set all_count.k_files = all_count.k_files + count.keep_f %} + {% set all_count.d_files = all_count.d_files + count.keep_f %}
    {% endif %} {% if auto.str|length %} @@ -176,6 +186,8 @@ + Automatically Keeping {{all_count.k_files}} files and deleting {{all_count.d_files}} files
    + Leaving {{DD.overall_dup_sets-all_count.sets}} manual choices to make (to delete a further {{DD.overall_dup_cnt-all_count.d_files}} files) {% endif %}