Core: improve title_path generation (remove non alphanum)

This commit is contained in:
Bertrand Benjamin 2022-10-27 10:29:26 +02:00
parent 6c5d74b53f
commit 6a2b1f73a5
1 changed files with 2 additions and 2 deletions

View File

@ -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