Compare commits
No commits in common. "035bf49e516a6f0760b4a62d0eca83fa790ba6a7" and "224ead80dbb7e85b0168101820b595e803426c92" have entirely different histories.
035bf49e51
...
224ead80db
4 changed files with 3 additions and 103 deletions
|
@ -1,7 +1,7 @@
|
|||
alias mountws='sshfs greg@greg.workstreams.ch:/home/greg/ work/ws-dev/'
|
||||
alias mountcloud='sshfs debian@trolliet.info:/home/debian/ work/ragcloud1/'
|
||||
alias syncMusic='rsync -av --delete /media/ragnas/music/ /media/HDD2/music_bck/'
|
||||
alias syncHome='rsync -av --delete /media/ragnas/raghnarok/ /media/HDD1/raghnarok_bck/'
|
||||
alias syncMusic='rsync -avc --delete /media/ragnas/music/ /media/HDD2/music_bck/'
|
||||
alias syncHome='rsync -avc --delete /media/ragnas/raghnarok/ /media/HDD1/raghnarok_bck/'
|
||||
|
||||
alias syncOgnonDocuments="rsync -amv --delete /home/raghnarok/Nextcloud/Ognon/* /home/raghnarok/ragnas/backup/ognon/"
|
||||
|
||||
|
|
|
@ -48,9 +48,6 @@ config.set('content.javascript.enabled', True, '*://mastodon.zaclys.com')
|
|||
config.set('content.javascript.enabled', True, '*://*.melvoridle.com')
|
||||
config.set('content.javascript.enabled', True, '*://*.raiffeisen.ch')
|
||||
config.set('content.javascript.enabled', True, '*://*.cmnet.ch')
|
||||
config.set('content.javascript.enabled', True, '*://*.inubo.ch')
|
||||
|
||||
config.set('colors.webpage.darkmode.enabled', True)
|
||||
|
||||
c.url.default_page = 'https://searx.info'
|
||||
c.hints.mode = "number"
|
||||
|
@ -65,8 +62,6 @@ c.url.searchengines = {
|
|||
'imdb':'https://www.imdb.com/find?q={}',
|
||||
'mdn':'https://developer.mozilla.org/en-US/search?q={}',
|
||||
'deb':'https://tracker.debian.org/pkg/{}',
|
||||
'mjk':'https://www.mojeek.com/search?q={}',
|
||||
'php':'https://www.php.net/manual-lookup.php?pattern={}&scope=quickref',
|
||||
}
|
||||
|
||||
#Fonts
|
||||
|
|
|
@ -51,6 +51,7 @@ bbb bigbluebutton instance FSN https://bbb.webconf.ch/
|
|||
conférence gesticullée peertube https://tube.conferences-gesticulees.net/
|
||||
ip location country geolocation https://ipgeolocation.io/
|
||||
blob opera google https://artsandculture.google.com/experiment/blob-opera/AAHWrq360NcGbw?cp=e30.
|
||||
girl https://mastodon.zaclys.com/web/accounts/46336
|
||||
amigurumi whale https://loopsandlovecrochet.com/2019/03/15/whale-amigurumi/
|
||||
amigurumi spider crochet https://yarnsociety.com/patterns/sharlotte-the-spider/assembly/
|
||||
amigurumi owl crochet hibou https://loopsandlovecrochet.com/2018/02/22/owl-amigurumi/
|
||||
|
@ -82,16 +83,3 @@ journal hacker https://www.journalduhacker.net/
|
|||
cactus sports http://cactus-sports.ch/magasin/contact.html
|
||||
opentopomap osm hill https://opentopomap.org/#map=12/46.3052/7.0680
|
||||
data world stats graph https://ourworldindata.org/
|
||||
vim cheatsheet key bindings https://vim.rtorr.com/
|
||||
icon svg https://iconduck.com/
|
||||
150e anarchisme st-imier informatique conférence https://annuel2.framapad.org/p/9esk-2fls5k6shz-d5?lang=fr
|
||||
ssl checker test https://www.ssllabs.com/ssltest/analyze.html
|
||||
anancus chatons https://anancus.ynh.fr/wiki/doku.php
|
||||
translate libretranslate traduction https://translate.fedilab.app/
|
||||
translate deepl traduction https://www.deepl.com/translator
|
||||
abag brasserie genève http://brasseursartisans.ch/
|
||||
abig brasserie genève http://abig.beer/
|
||||
minume wiki https://wiki.minume.ch/fr/Outils/Partenaires_Outils
|
||||
messagerie messaging app comparaison https://www.securemessagingapps.com/
|
||||
culture accessible https://culture-accessible.ch/
|
||||
ign carte comparaison temps histoire https://remonterletemps.ign.fr/
|
||||
|
|
|
@ -1,83 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ "$#" -ne 2 ]
|
||||
then
|
||||
maxwidth=800
|
||||
else
|
||||
maxwidth=$2
|
||||
fi
|
||||
|
||||
check_replace(){
|
||||
# Si le thumbnail généré est plus gros que l'original (ça arrive régulièrement surtout avec les png) on garde l'original et on le copie comme si c'était le thumbnail.
|
||||
size_orig=$(stat -c %s $1)
|
||||
size_thumb=$(stat -c %s $2)
|
||||
if [ "$size_orig" -lt "$size_thumb" ]; then
|
||||
rm "$2"
|
||||
cp "$1" "$2"
|
||||
fi
|
||||
}
|
||||
|
||||
thumbnail(){
|
||||
echo -en "Processing image \e[0;34m$2\e[0m :"
|
||||
extension="$(echo $2 | awk -F\. '{print $NF}')"
|
||||
thumbname="$(dirname $2)/$(basename -s .$extension $2).thumb.$extension"
|
||||
thumbwebpname="$(dirname $2)/$(basename -s .$extension $2).thumb.webp"
|
||||
thumbavifname="$(dirname $2)/$(basename -s .$extension $2).thumb.avif"
|
||||
|
||||
maxwidth=$1
|
||||
jpegq=75
|
||||
webpq=55
|
||||
cavifq=35
|
||||
|
||||
# Si une image est un thumbnail on la considère comme déjà bien traitée.
|
||||
if [[ $2 == *".thumb."* ]]; then
|
||||
echo -e " \e[0;31mest un thumb !\e[0m"
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Si une image a déjà un thumbnail, on la considère comme déjà traitée et donc on y retouche pas.
|
||||
if [ -f "$(dirname $2)/$(basename -s .$extension $2).thumb.$extension" ]; then
|
||||
echo -e " \e[0;31ma déjà un thumb !\e[0m"
|
||||
return 0
|
||||
fi
|
||||
|
||||
case "$extension" in
|
||||
jpg | jpeg | JPG | JPEG )
|
||||
/usr/bin/convert -resize $maxwidth\> -quality 100 "$2" "$thumbname.LOSSLESS"
|
||||
/usr/bin/convert -quality $jpegq "$thumbname.LOSSLESS" "$thumbname"
|
||||
/usr/bin/convert -quality $webpq "$thumbname.LOSSLESS" "$thumbwebpname"
|
||||
/usr/bin/cavif --quiet --quality $cavifq "$thumbname.LOSSLESS" --output "$thumbavifname"
|
||||
rm "$thumbname.LOSSLESS"
|
||||
jpegoptim --quiet --strip-all "$2"
|
||||
check_replace "$2" "$thumbname"
|
||||
;;
|
||||
png | PNG)
|
||||
# Ce con de pngcrush a tendance à faire n'importe quoi si on lui dit de réécrire par dessus les images, du coup on passe par un fichier temporaire qu'on renomme par la suite.
|
||||
pngcrush -warn "$2" "$2.tmp"
|
||||
mv -f "$2.tmp" "$2"
|
||||
usr/bin/convert -resize $maxwidth\> "$2" "$thumbname"
|
||||
/usr/bin/convert -resize $maxwidth\> -quality $webpq "$2" "$thumbwebpname"
|
||||
pngcrush -warn "$thumbname" "$thumbname.tmp"
|
||||
mv -f "$thumbname.tmp" "$thumbname"
|
||||
check_replace "$2" "$thumbname"
|
||||
|
||||
/usr/bin/convert -resize $maxwidth\> -quality 100 "$2" "$thumbname.LOSSLESS"
|
||||
/usr/bin/cavif --quiet --quality $cavifq "$thumbname.LOSSLESS" --output "$thumbavifname"
|
||||
rm "$thumbname.LOSSLESS"
|
||||
|
||||
|
||||
;;
|
||||
esac
|
||||
sizeorig=$(stat -c %s $2 | numfmt --to=iec --padding=3)
|
||||
sizethumb=$(stat -c %s $thumbname | numfmt --to=iec --padding=3)
|
||||
sizewebp=$(stat -c %s $thumbwebpname | numfmt --to=iec --padding=3)
|
||||
sizeavif=$(stat -c %s $thumbavifname | numfmt --to=iec --padding=3)
|
||||
echo -e "\e[0;32mOK\e[0;m : orig : $sizeorig > $sizethumb ; webp:$sizewebp ; avif:$sizeavif"
|
||||
}
|
||||
|
||||
|
||||
export -f thumbnail
|
||||
export -f check_replace
|
||||
|
||||
find $1 -name '*.jpg' -or -name '*.jpeg' -or -name '*.JPG' -or -name '*.JPEG' -or -name '*.png' -or -name '*.PNG' | parallel --jobs 16 thumbnail $maxwidth
|
||||
|
Loading…
Reference in a new issue