/* (gH) -_- vignette.rex ; TimeStamp (unix) : 29 Novembre 2012 vers 15:35 */ /* génération d'une vignette d'un fichier jpg */ parse arg image dbg . if image="" then do say say " syntaxe : vignette fichier.jpg " ; say exit -1 end /* on vérifie que l'image existe */ rf = fileut("checkFile^"image) if rf = -1 then do say " en conséquence, j'arrête le programme." return end /* fin de si */ /* on retrouve le basename et on ajoute _mini " */ lng = length(image) last4 = substr(image,lng-3) jpg = 0 if translate(last4)=".JPG" then jpg = 1 if jpg= 0 then do say say " ceci n'est pas une image .jpg car je vois " last4 " comme extension " say exit -2 end nomb = substr(image,1,lng-4) nomf = nomb||"_mini.jpg" cmd = " php vignette.php " image " > " nomf say cmd cmd say say " vous pouvez utiliser " nomf say cmd = "last " nomb"*" say cmd cmd if length(dbg)>0 then do say cmd = " cat " nomf cmd say end /* fin si*/