From 6a2b1f73a5b1a68b2451d832d83fad264d8c0228 Mon Sep 17 00:00:00 2001 From: Bertrand Benjamin Date: Thu, 27 Oct 2022 10:29:26 +0200 Subject: [PATCH] Core: improve title_path generation (remove non alphanum) --- tools/scripts/new_sequence.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/scripts/new_sequence.sh b/tools/scripts/new_sequence.sh index 06474a5..34af796 100644 --- a/tools/scripts/new_sequence.sh +++ b/tools/scripts/new_sequence.sh @@ -45,7 +45,7 @@ esac exec 3>&1 cd $tribe -existing_seq=$(ls -d */) +existing_seq=$(ls -d [0-9][0-9]_*) nbr_seq=$(echo $existing_seq | wc -w) next_seq_number=$(expr $nbr_seq) @@ -94,7 +94,7 @@ case $selection in esac -title_path=$(echo ${title// /_} | iconv -f utf8 -t ascii//TRANSLIT) +title_path=$(echo ${title// /_} | iconv -f utf8 -t ascii//TRANSLIT | tr -cd '[:alnum:]._-') sequence_path=$tribe/$(printf "%02d" $next_seq_number)_${title_path}/ mkdir -p $sequence_path