Skip to content

Commit

Permalink
Améliorations
Browse files Browse the repository at this point in the history
  • Loading branch information
dthonon committed Sep 29, 2024
1 parent d86f87c commit b6f06d8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/oca_utils/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
DET_PAT = re.compile(r"Détails.*")
DETAILS_PAT = re.compile(r"((\w|\s)+)_((\w|\s)+)")
DEPT_PAT = re.compile(r"FR\d\d_")
OCA_PAT = re.compile(r"IMG_\d{4}_([\sa-zA-Z]*)_(\d*).*")
OCA_PAT = re.compile(r"IMG_\d{4}_([\sa-zA-Z\']*)_(\d*).*")

logger = logging.getLogger(__name__)
logging.basicConfig(
Expand Down Expand Up @@ -807,7 +807,7 @@ def comparer(ctx: click.Context) -> None: # noqa: max-complexity=13
synthèse["Médias"] = synthèse["Photos"] + synthèse["Vidéos"]
synthèse.sort_index(inplace=True)
total = synthèse.aggregate(func="sum")
synthèse.Taille = synthèse.Taille.apply(lambda t: humanize.naturalsize(t))
synthèse.Taille = synthèse.Taille.apply(lambda t: humanize.naturalsize(t, True))
console = Console()

table_f = Table(title="Synthèse fichiers OCA")
Expand All @@ -817,7 +817,7 @@ def comparer(ctx: click.Context) -> None: # noqa: max-complexity=13
"TOTAL",
str(total.Source),
str(total.Destination),
humanize.naturalsize(total.Taille),
humanize.naturalsize(total.Taille, True),
str(total.Médias),
str(total.Photos),
str(total.Vidéos),
Expand Down

0 comments on commit b6f06d8

Please sign in to comment.