fix script again

This commit is contained in:
2025-07-10 12:26:41 +03:00
parent cb942fbf0b
commit 81360ff4b6
2 changed files with 72 additions and 72 deletions

128
README.md
View File

@@ -10,261 +10,261 @@
### akira
![akira](Cat Latte/akira.png)
<img src="Cat Latte/akira.png" alt="akira" width="300" />
### cloud
![cloud](Cat Latte/cloud.png)
<img src="Cat Latte/cloud.png" alt="cloud" width="300" />
### comfy
![comfy](Cat Latte/comfy.png)
<img src="Cat Latte/comfy.png" alt="comfy" width="300" />
### girls
![girls](Cat Latte/girls.png)
<img src="Cat Latte/girls.png" alt="girls" width="300" />
### macchiato
![macchiato](Cat Latte/macchiato.png)
<img src="Cat Latte/macchiato.png" alt="macchiato" width="300" />
### palm_trees
![palm_trees](Cat Latte/palm_trees.png)
<img src="Cat Latte/palm_trees.png" alt="palm_trees" width="300" />
### samurai_girl
![samurai_girl](Cat Latte/samurai_girl.png)
<img src="Cat Latte/samurai_girl.png" alt="samurai_girl" width="300" />
### samurai_girl_chill
![samurai_girl_chill](Cat Latte/samurai_girl_chill.png)
<img src="Cat Latte/samurai_girl_chill.png" alt="samurai_girl_chill" width="300" />
### totoro
![totoro](Cat Latte/totoro.png)
<img src="Cat Latte/totoro.png" alt="totoro" width="300" />
### wings
![wings](Cat Latte/wings.png)
<img src="Cat Latte/wings.png" alt="wings" width="300" />
### yosemite
![yosemite](Cat Latte/yosemite.png)
<img src="Cat Latte/yosemite.png" alt="yosemite" width="300" />
### clouds_realism
![clouds_realism](Cat Latte/clouds_realism.jpg)
<img src="Cat Latte/clouds_realism.jpg" alt="clouds_realism" width="300" />
### dragon_ball
![dragon_ball](Cat Latte/dragon_ball.jpg)
<img src="Cat Latte/dragon_ball.jpg" alt="dragon_ball" width="300" />
### dreamy
![dreamy](Cat Latte/dreamy.jpg)
<img src="Cat Latte/dreamy.jpg" alt="dreamy" width="300" />
### fantasy-girl
![fantasy-girl](Cat Latte/fantasy-girl.jpg)
<img src="Cat Latte/fantasy-girl.jpg" alt="fantasy-girl" width="300" />
### flower
![flower](Cat Latte/flower.jpg)
<img src="Cat Latte/flower.jpg" alt="flower" width="300" />
### frieren-2
![frieren-2](Cat Latte/frieren-2.jpg)
<img src="Cat Latte/frieren-2.jpg" alt="frieren-2" width="300" />
### frieren-3
![frieren-3](Cat Latte/frieren-3.jpg)
<img src="Cat Latte/frieren-3.jpg" alt="frieren-3" width="300" />
### jon_snow
![jon_snow](Cat Latte/jon_snow.jpg)
<img src="Cat Latte/jon_snow.jpg" alt="jon_snow" width="300" />
### sakura_zenitsu
![sakura_zenitsu](Cat Latte/sakura_zenitsu.jpg)
<img src="Cat Latte/sakura_zenitsu.jpg" alt="sakura_zenitsu" width="300" />
### samurai_bebop
![samurai_bebop](Cat Latte/samurai_bebop.jpg)
<img src="Cat Latte/samurai_bebop.jpg" alt="samurai_bebop" width="300" />
### samurai_bebop_alone
![samurai_bebop_alone](Cat Latte/samurai_bebop_alone.jpg)
<img src="Cat Latte/samurai_bebop_alone.jpg" alt="samurai_bebop_alone" width="300" />
### scissors
![scissors](Cat Latte/scissors.jpg)
<img src="Cat Latte/scissors.jpg" alt="scissors" width="300" />
### shrine
![shrine](Cat Latte/shrine.jpg)
<img src="Cat Latte/shrine.jpg" alt="shrine" width="300" />
### frieren-1
![frieren-1](Cat Latte/frieren-1.jpeg)
<img src="Cat Latte/frieren-1.jpeg" alt="frieren-1" width="300" />
### frieren-4
![frieren-4](Cat Latte/frieren-4.jpeg)
<img src="Cat Latte/frieren-4.jpeg" alt="frieren-4" width="300" />
### train_tokyo
![train_tokyo](Cat Latte/train_tokyo.gif)
<img src="Cat Latte/train_tokyo.gif" alt="train_tokyo" width="300" />
## Code Garden
### art
![art](Code Garden/art.png)
<img src="Code Garden/art.png" alt="art" width="300" />
### aurora
![aurora](Code Garden/aurora.png)
<img src="Code Garden/aurora.png" alt="aurora" width="300" />
### journey
![journey](Code Garden/journey.png)
<img src="Code Garden/journey.png" alt="journey" width="300" />
### rising
![rising](Code Garden/rising.png)
<img src="Code Garden/rising.png" alt="rising" width="300" />
### snow
![snow](Code Garden/snow.png)
<img src="Code Garden/snow.png" alt="snow" width="300" />
### spike
![spike](Code Garden/spike.png)
<img src="Code Garden/spike.png" alt="spike" width="300" />
### zen
![zen](Code Garden/zen.png)
<img src="Code Garden/zen.png" alt="zen" width="300" />
### beer
![beer](Code Garden/beer.jpg)
<img src="Code Garden/beer.jpg" alt="beer" width="300" />
### bunnies
![bunnies](Code Garden/bunnies.jpg)
<img src="Code Garden/bunnies.jpg" alt="bunnies" width="300" />
### cabin
![cabin](Code Garden/cabin.jpg)
<img src="Code Garden/cabin.jpg" alt="cabin" width="300" />
### calligraphy
![calligraphy](Code Garden/calligraphy.jpg)
<img src="Code Garden/calligraphy.jpg" alt="calligraphy" width="300" />
### citrus
![citrus](Code Garden/citrus.jpg)
<img src="Code Garden/citrus.jpg" alt="citrus" width="300" />
### deer
![deer](Code Garden/deer.jpg)
<img src="Code Garden/deer.jpg" alt="deer" width="300" />
### drive
![drive](Code Garden/drive.jpg)
<img src="Code Garden/drive.jpg" alt="drive" width="300" />
### ducks
![ducks](Code Garden/ducks.jpg)
<img src="Code Garden/ducks.jpg" alt="ducks" width="300" />
### fires
![fires](Code Garden/fires.jpg)
<img src="Code Garden/fires.jpg" alt="fires" width="300" />
### fox
![fox](Code Garden/fox.jpg)
<img src="Code Garden/fox.jpg" alt="fox" width="300" />
### friends
![friends](Code Garden/friends.jpg)
<img src="Code Garden/friends.jpg" alt="friends" width="300" />
### gojo
![gojo](Code Garden/gojo.jpg)
<img src="Code Garden/gojo.jpg" alt="gojo" width="300" />
### ivy
![ivy](Code Garden/ivy.jpg)
<img src="Code Garden/ivy.jpg" alt="ivy" width="300" />
### kayle
![kayle](Code Garden/kayle.jpg)
<img src="Code Garden/kayle.jpg" alt="kayle" width="300" />
### landscape
![landscape](Code Garden/landscape.jpg)
<img src="Code Garden/landscape.jpg" alt="landscape" width="300" />
### love
![love](Code Garden/love.jpg)
<img src="Code Garden/love.jpg" alt="love" width="300" />
### magic
![magic](Code Garden/magic.jpg)
<img src="Code Garden/magic.jpg" alt="magic" width="300" />
### messmer
![messmer](Code Garden/messmer.jpg)
<img src="Code Garden/messmer.jpg" alt="messmer" width="300" />
### nebula
![nebula](Code Garden/nebula.jpg)
<img src="Code Garden/nebula.jpg" alt="nebula" width="300" />
### oasis
![oasis](Code Garden/oasis.jpg)
<img src="Code Garden/oasis.jpg" alt="oasis" width="300" />
### pyramid
![pyramid](Code Garden/pyramid.jpg)
<img src="Code Garden/pyramid.jpg" alt="pyramid" width="300" />
### recluse
![recluse](Code Garden/recluse.jpg)
<img src="Code Garden/recluse.jpg" alt="recluse" width="300" />
### sbr
![sbr](Code Garden/sbr.jpg)
<img src="Code Garden/sbr.jpg" alt="sbr" width="300" />
### sunset
![sunset](Code Garden/sunset.jpg)
<img src="Code Garden/sunset.jpg" alt="sunset" width="300" />
### transit
![transit](Code Garden/transit.jpg)
<img src="Code Garden/transit.jpg" alt="transit" width="300" />
### trina
![trina](Code Garden/trina.jpg)
<img src="Code Garden/trina.jpg" alt="trina" width="300" />
### walk
![walk](Code Garden/walk.jpg)
<img src="Code Garden/walk.jpg" alt="walk" width="300" />
### window
![window](Code Garden/window.jpg)
<img src="Code Garden/window.jpg" alt="window" width="300" />
### yorha
![yorha](Code Garden/yorha.jpg)
<img src="Code Garden/yorha.jpg" alt="yorha" width="300" />
### e33
![e33](Code Garden/e33.jpeg)
<img src="Code Garden/e33.jpeg" alt="e33" width="300" />

View File

@@ -2,19 +2,17 @@
set -euo pipefail
OUT="README.md"
ROOT="$(pwd)"
# Header & TOC start
# Header & TOC
cat > "$OUT" <<EOF
# Wallpapers Collection
## Table of Contents
EOF
# TOC: folders only
for dir in */; do
dir_name="${dir%/}"
anchor=$(printf '%s' "${dir_name}" \
anchor=$(printf '%s' "$dir_name" \
| tr '[:upper:]' '[:lower:]' \
| sed 's/ /-/g; s/[^a-z0-9-]//g')
echo "- [${dir_name}](#${anchor})" >> "$OUT"
@@ -22,21 +20,23 @@ done
echo -e "\n---\n" >> "$OUT"
# Sections: folder content
# Folders with images
for dir in */; do
dir_name="${dir%/}"
anchor=$(printf '%s' "${dir_name}" \
anchor=$(printf '%s' "$dir_name" \
| tr '[:upper:]' '[:lower:]' \
| sed 's/ /-/g; s/[^a-z0-9-]//g')
echo "## ${dir_name}" >> "$OUT"
echo "" >> "$OUT"
for img in "${dir}"*.{png,jpg,jpeg,gif}; do
[ -f "$img" ] || continue
fn="$(basename "${img%.*}")"
rel="${dir}$(basename "$img")"
rel="$(echo "$img" | sed 's|^\./||')"
echo "### ${fn}" >> "$OUT"
echo "" >> "$OUT"
echo "![${fn}](${rel})" >> "$OUT"
echo "<img src=\"${rel}\" alt=\"${fn}\" width=\"300\" />" >> "$OUT"
echo "" >> "$OUT"
done
echo "" >> "$OUT"