This commit is contained in:
alex 2024-08-04 11:36:54 -04:00
parent ade9c88af0
commit 43441844ad
2 changed files with 17 additions and 4 deletions

12
to_zip.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/bash
set -euo pipefail
FILE="$1"
NAME="$2"
RANGE="$3"
GROUPING="$4"
poetry run python xlsx_dir_map -i "$FILE" -o "$NAME" -r "$RANGE" "$GROUPING"
zip -r "$NAME.zip" $NAME

View File

@ -70,9 +70,10 @@ def get_names_list(filename, cellrange, column_groups):
for colgroup in column_groups:
path = get_value(cells, colgroup)
paths.append(path)
if "None" not in paths:
names.append("/".join(paths))
if "None" not in path:
paths.append(path)
# if "None" not in paths:
names.append("/".join(filter(lambda x: x != '', paths)))
return names