Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| public:linux:astuces [2023/10/11 16:52] – ↷ Page déplacée de fr:public:linux:astuces à public:linux:astuces yann | public:linux:astuces [2024/10/02 17:56] (Version actuelle) – yann | ||
|---|---|---|---|
| Ligne 2: | Ligne 2: | ||
| ====== Petits scripts utiles ====== | ====== Petits scripts utiles ====== | ||
| + | |||
| + | |||
| + | ===== Iso vers UTF-8 ===== | ||
| + | |||
| + | https:// | ||
| + | |||
| + | <code bash> | ||
| + | #!/bin/bash | ||
| + | TO=" | ||
| + | FROM=$(file -i $FILE | cut -d' | ||
| + | if [[ $FROM = " | ||
| + | echo " | ||
| + | exit 0 | ||
| + | fi | ||
| + | iconv -f $FROM -t $TO -o $FILE.tmp $FILE; ERROR=$? | ||
| + | if [[ $ERROR -eq 0 ]]; then | ||
| + | echo " | ||
| + | mv -f $FILE.tmp $FILE | ||
| + | else | ||
| + | echo "Error on $FILE" | ||
| + | fi | ||
| + | </ | ||
| + | |||
| + | Set the executable bit | ||
| + | <code bash> | ||
| + | chmod +x to-utf8.sh | ||
| + | </ | ||
| + | Do a conversion | ||
| + | <code bash> | ||
| + | ./ | ||
| + | </ | ||
| + | |||
| + | If you want to convert all files under a folder, do | ||
| + | |||
| + | <code bash> | ||
| + | find / | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== réduire la taille d'un PDF ===== | ||
| + | |||
| + | |||
| + | <code bash> | ||
| + | gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ | ||
| + | </ | ||
| Exporter un gif animé en image png | Exporter un gif animé en image png | ||
