projects
/
fgen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
82d3c92
)
Ajout support lecture PSB
author
Hugo Villeneuve
<hugo@hugovil.com>
Mon, 23 Oct 2023 19:14:28 +0000
(15:14 -0400)
committer
Hugo Villeneuve
<hugo@hugovil.com>
Tue, 24 Oct 2023 16:04:17 +0000
(12:04 -0400)
fgen.sh
patch
|
blob
|
history
diff --git
a/fgen.sh
b/fgen.sh
index
c7065c8
..
686fff9
100755
(executable)
--- a/
fgen.sh
+++ b/
fgen.sh
@@
-184,8
+184,8
@@
function generate_video()
print_usage()
{
print_usage()
{
- echo "${PROG_NAME} -- Générateur de séquence d'images PNG à partir d'un fichier Photoshop (PSD)."
- echo "Usage: ${PROG_NAME} [OPTIONS...] FICHIER-P
SD
"
+ echo "${PROG_NAME} -- Générateur de séquence d'images PNG à partir d'un fichier Photoshop (PSD
/PSB
)."
+ echo "Usage: ${PROG_NAME} [OPTIONS...] FICHIER-P
HOTOSHOP
"
echo
echo "Options:"
echo " -d affiche les informations de debug"
echo
echo "Options:"
echo " -d affiche les informations de debug"
@@
-233,11
+233,23
@@
fi
src="${*}"
if [ ! -f "${src}" ]; then
src="${*}"
if [ ! -f "${src}" ]; then
- log_err "Err
or: PSD source file not found
"
+ log_err "Err
eur: fichier source non trouvé
"
exit 1
fi
exit 1
fi
-dest=$(basename -s .psd "${src}")
+ext=$(echo "${src##*.}" | awk '{print tolower($0)}')
+
+case ${ext} in
+ psd|psb)
+ # Ok: PSD or PSB format detected
+ ;;
+ *)
+ log_err "Format non-supporté: ${ext}"
+ exit 1
+ ;;
+esac
+
+dest=$(basename -s .${ext} "${src}")
layers=${dest}/layers.txt
if [ ! -d ${dest} ]; then
layers=${dest}/layers.txt
if [ ! -d ${dest} ]; then