Si quelqu'un peut essayer ce script et me faire retour :
Le script dans son état actuel :
#!/bin/sh
## @Anonyme
## Programmes cdrdao cuetools
## Recherche sur freedb des informations sur le disque compact audio.
## Création du dossier ayant le nom de l'artiste et le titre de l'album. [ les fichier *.bin + *.toc seront déplacé à l'intérieur ]
## RIP du CDA vers une image *.bin et un fichier *.toc sera crée.
## Correction des mauvais caractères dans le fichier T*.toc ... [à compléter le cas échéant]
## Possibilité de créer un fichier *.cue.
## Éjection et attente chargement du média.
## Fermeture Auto
## N'écrase pas l'image existante si présente. [à améliorer]
## Vérification si le CD contient des données ou est vierge. ( Choix pour effacer ou pour changer de support )
## N'efface pas un CD-RW vide.
## Pas de CD-R ou CD-RW lors du lancement de la gravure. [ possibilité de quitter]
VERT="\\033[1;32m"
VERTCLAIR="\033[32m"
NORMAL="\\033[0;39m"
ROUGE="\\033[1;31m"
ROSE="\\033[1;35m"
BLEU="\\033[1;34m"
BLANC="\\033[0;02m"
BLANCLAIR="\\033[1;08m"
JAUNE="\\033[1;33m"
CYAN="\\033[1;36m"
DEVICE=/dev/sr0
echo "$VERTCLAIR Ouverture Du Lecteur $NORMAL"
eject $DEVICE
echo "Charger Le Compact Disc Audio, Puis Touche $BLEU[Entrée]$NORMAL "
read touche
case $touche in
*) echo "$VERTCLAIR Fermeture, Recherche Infos ...$NORMAL"
;;
esac
eject -t $DEVICE
## CDDB INFO
ALBUMNAME=$(curl -s "http://freedb.freedb.org/~cddb/cddb.cgi?cmd=cddb+query+$(cd-discid $DEVICE | sed 's/ /+/g')&hello=user+hostname+cdparanoia+3&proto=3" | sed 's/\// - /g'|awk '{$1=""; $2=""; $3=""; sub(" ", " "); print}'| sed s'/.$//' | awk '{gsub(/^[ \t]+|[ \t]+$/,"")};1') \
CDID=$(curl -s "http://freedb.freedb.org/~cddb/cddb.cgi?cmd=cddb+query+$(cd-discid $DEVICE | sed 's/ /+/g')&hello=user+hostname+cdparanoia+3&proto=3" | head -n1 | awk '{print $3}';) \
TRACKLIST=$(curl -s "http://freedb.freedb.org/~cddb/cddb.cgi?cmd=cddb+read+misc+$CDID&hello=name+hostname+cdparanoia+3&proto=1" | grep TTITLE | awk -F "=" '{print $2}';) \
ARTIST=$(curl -s "http://freedb.freedb.org/~cddb/cddb.cgi?cmd=cddb+read+misc+$CDID&hello=name+hostname+cdparanoia+3&proto=1" | grep DTITLE | awk -F "=" '{print $2}' | awk -F "/" '{print $1}')
## CRÉATION DU DOSSIER "ARTISTE + TITRE" / PERMET À L'UTILISATEUR DE MODIFIER LE NOM
echo "Album Identifié : $JAUNE $ALBUMNAME $NORMAL"
read -p "Ces Informations Sont-elles Correctes ? (y/n) " yn
case $yn in
[Yy]* )
mkdir "$ALBUMNAME" ;;
[Nn]* )
read -p "Entrez Les Informations Correctes: " ALBUMNAME
mkdir "$ALBUMNAME";;
* ) echo "Répondre Par Oui Ou Par Non.";;
esac
## RIP DU CD-AUDIO VERS UNE IMAGE BIN & SON FICHIER TOC
read -p "Ripper Le Compact Disc Audio ? (y/n)" reply
choice=$(echo $reply)
if [ "$choice" = 'y' ]
then
echo "$VERTCLAIR Création De L'image En Cours ...$NORMAL";
cdrdao read-cd --source-device $DEVICE --driver generic-mmc --with-cddb --datafile "$ALBUMNAME.bin" "$ALBUMNAME.toc"
## CORRECTION DES MAUVAIS CARACTÈRES DANS LE FICHIER TOC
sed -i -e 's/\\351/é/g' -e 's/\\350/è/g' -e 's/\\353/ë/g' -e 's/\\352/ê/g' -e 's/\\340/à/g' -e 's/\\342/â/g' -e 's/\\347/ç/g' -e 's/\\356/î/g' -e 's/\\364/ô/g' -e 's/\\373/û/g' -e 's/\\371/ù/g' "$ALBUMNAME.toc"
elif [ "$choice" = 'n' ]
then
echo "Éjection Du CD";
rm -R "$ALBUMNAME"
eject $DEVICE
echo "$VERTCLAIR Opération Abandonnée $VERTCLAIR"
exit
fi
## CRÉATION DU FICHIER CUE
read -p "Créer Le Fichier CUE ? (y/n)" reply
choice=$(echo $reply)
if [ "$choice" = 'y' ]
then
echo "$VERTCLAIR Création Du Fichier CUE ...$NORMAL";
cueconvert -i toc -o cue "$ALBUMNAME.toc" "$ALBUMNAME.cue"
mv "$ALBUMNAME.cue" "$ALBUMNAME"
elif [ "$choice" = 'n' ]
then
echo "$VERTCLAIR Étape Suivante ...$NORMAL";
fi
## DÉPLACEMENT DES 2 FICHIERS DANS LE DOSSIER
mv "$ALBUMNAME.bin" "$ALBUMNAME"
mv "$ALBUMNAME.toc" "$ALBUMNAME"
## GRAVAGE
read -p "Lancer La Gravure ? (y/n)" reply
choice=$(echo $reply)
if [ "$choice" = 'y' ]
then
eject $DEVICE
echo "Insérez Un CD [Ré]inscriptible Dans Le Lecteur Et Appuyer Sur La Touche [Entrée]"
read touche
case $touche in
*) echo "$VERTCLAIR Chargement Du CD [Ré]inscriptible ...$NORMAL"
;;
esac
eject -t $DEVICE
elif [ "$choice" = 'n' ]
then
echo "$VERTCLAIR Opération Terminée $NORMAL";
eject $DEVICE
exit
fi
echo "$VERTCLAIR Vérification Que Le Support Présent Dans Le Lecteur Est Bien Vide ...$NORMAL"
cdrdao disk-info $DEVICE 2>&1 | grep 'empty ' | grep yes ;
STATUS=$?
while [ $STATUS != "0" ] ; do
echo "Ce CD Contient Des Données "
read -p "Faut-il [C]hanger De Support, [E]ffacer Ce CD Ou [A] Abandonner La Gravure ? (c/e/a)" reply
choice=$(echo $reply)
if [ "$choice" = 'c' ]
then
echo "$VERTCLAIR Éjection Du CD $VERTCLAIR";
eject $DEVICE
echo "Charger Un Nouveau Support et Appuyer Sur [Entrée]"
read touche
case $touche in
*) echo "$VERTCLAIR Fermeture ...$NORMAL"
;;
esac
eject -t $DEVICE
sleep 10
elif [ "$choice" = 'e' ]
then
echo "$VERTCLAIR Effacement En Cours ...$NORMAL";
cdrdao blank –device $DEVICE –blank-mode minimal
elif [ "$choice" = 'a' ]
then
echo "Pas De CD-R[W] Vide Sous La Main - Opération Terminée. ";
eject $DEVICE
exit
fi
cdrdao disk-info $DEVICE 2>&1 | grep 'empty' | grep yes ;
STATUS=$?
done
echo "Le CD Est Vide : OK"
read -p "Graver le CD Maintenant ? (y/n)" reply
choice=$(echo $reply)
if [ "$choice" = 'y' ]
then
echo "$VERTCLAIR Création Du CD-Audio ...$NORMAL";
cdrdao write --device $DEVICE --driver generic-mmc-raw "$ALBUMNAME/$ALBUMNAME.toc" ;
elif [ "$choice" = 'n' ]
then
echo "$VERTCLAIR Éjection Du CD $NORMAL";
eject $DEVICE
exit
fi
eject $DEVICE
exit
J'ai fais un test complet en me trompant volontairement lors de l'insertion d'un support vierge. J'ai mis un CD-R déjà enregistré.
patrick@debian:~/Bureau$ ./Compact-Disc-Audio.sh
Ouverture Du Lecteur
Charger Le Compact Disc Audio, Puis Touche [Entrée]
Fermeture, Recherche Infos ...
Album Identifié : Lara Fabian - Je t'aime
Ces Informations Sont-elles Correctes ? (y/n) y
Ripper Le Compact Disc Audio ? (y/n)y
Création De L'image En Cours ...
Cdrdao version 1.2.3 - (C) Andreas Mueller <andreas@daneb.de>
/dev/sr0: PLEXTOR DVDR PX-880SA Rev: 1.12
Using driver: Generic SCSI-3/MMC - Version 2.0 (options 0x0000)
Reading toc and track data...
Track Mode Flags Start Length
------------------------------------------------------------
1 AUDIO 0 00:00:00( 0) 04:22:47( 19697)
2 AUDIO 0 04:22:47( 19697) 04:08:63( 18663)
Leadout AUDIO 0 08:31:35( 38360)
PQ sub-channel reading (audio track) is supported, data format is BCD.
Raw P-W sub-channel reading (audio track) is supported.
Cooked R-W sub-channel reading (audio track) is supported.
Copying audio tracks 1-2: start 00:00:00, length 08:31:35 to "Lara Fabian - Je t'aime.bin"...
Track 1...
Found ISRC code.
Track 2...
Found pre-gap: 00:00:16
Found ISRC code.
Found 254 Q sub-channels with CRC errors.
Found disk catalogue number.
CDDB: Connecting to cddbp://freedb.freedb.org:888 ...
CDDB: Ok.
Reading CDDB record for: 0e01ff02-misc-Lara Fabian / Je t'aime
CD-TEXT data was added to toc-file.
Reading of toc and track data finished successfully.
Créer Le Fichier CUE ? (y/n)y
Création Du Fichier CUE ...
Lancer La Gravure ? (y/n)y
Insérez Un CD [Ré]inscriptible Dans Le Lecteur Et Appuyer Sur La Touche [Entrée]
Chargement Du CD [Ré]inscriptible ...
Vérification Que Le Support Présent Dans Le Lecteur Est Bien Vide ...
Ce CD Contient Des Données
Faut-il [C]hanger De Support, [E]ffacer Ce CD Ou [A] Abandonner La Gravure ? (c/e/a)e
Effacement En Cours ...
Cdrdao version 1.2.3 - (C) Andreas Mueller <andreas@daneb.de>
/dev/sr0: PLEXTOR DVDR PX-880SA Rev: 1.12
Using driver: Generic SCSI-3/MMC - Version 2.0 (options 0x0000)
Blanking disk...
ERROR: Cannot erase CD-RW.
ERROR: Blanking failed.
Ce CD Contient Des Données
Faut-il [C]hanger De Support, [E]ffacer Ce CD Ou [A] Abandonner La Gravure ? (c/e/a)c
Éjection Du CD
Charger Un Nouveau Support et Appuyer Sur [Entrée]
Fermeture ...
Ce CD Contient Des Données
Faut-il [C]hanger De Support, [E]ffacer Ce CD Ou [A] Abandonner La Gravure ? (c/e/a)e
Effacement En Cours ...
Cdrdao version 1.2.3 - (C) Andreas Mueller <andreas@daneb.de>
/dev/sr0: PLEXTOR DVDR PX-880SA Rev: 1.12
Using driver: Generic SCSI-3/MMC - Version 2.0 (options 0x0000)
Blanking disk...
Blanking time: 22 seconds
CD-R empty : yes
Le CD Est Vide : OK
Graver le CD Maintenant ? (y/n)y
Création Du CD-Audio ...
Cdrdao version 1.2.3 - (C) Andreas Mueller <andreas@daneb.de>
/dev/sr0: PLEXTOR DVDR PX-880SA Rev: 1.12
Using driver: Generic SCSI-3/MMC (raw writing) - Version 2.0 (options 0x0000)
Starting write at speed 10...
Pausing 10 seconds - hit CTRL-C to abort.
Process can be aborted with QUIT signal (usually CTRL-\).
Turning BURN-Proof on
Enabling JustSpeed.
Using 96 byte raw P-W sub-channel data mode for CD-TEXT.
Executing power calibration...
Power calibration successful.
WARNING: No super user permission to setup real time scheduling.
Writing lead-in and gap...
Writing track 01 (mode AUDIO/AUDIO )...
Writing track 02 (mode AUDIO/AUDIO )...
Wrote 86 of 86 MB (Buffers 100% 100%).
Wrote 38360 blocks. Buffer fill min 100%/max 100%.
Writing lead-out...
Wrote 15 of 15 MB.
Flushing cache...
Writing finished successfully.
patrick@debian:~/Bureau$
C'est juste la partie de ce message qui ne me plait pas. Il faudrait que la seconde proposition
Faut-il [C]hanger De Support, [E]ffacer Ce CD Ou [A] Abandonner La Gravure ? (c/e/a)e
[E]ffacer Ce CD, ne soit plus proposé.
Un truc du genre : changer et réessayer
Blanking disk...
ERROR: Cannot erase CD-RW.
ERROR: Blanking failed.
Ce CD Contient Des Données
Faut-il [C]hanger De Support, [E]ffacer Ce CD Ou [A] Abandonner La Gravure ? (c/e/a)c
Éjection Du CD
Charger Un Nouveau Support et Appuyer Sur [Entrée]
Fermeture ...
Ce CD Contient Des Données
Faut-il [C]hanger De Support, [E]ffacer Ce CD Ou [A] Abandonner La Gravure ? (c/e/a)e
Dernière modification par Anonyme (12-06-2016 20:42:36)