update script -> readme

This commit is contained in:
2025-07-10 13:51:19 +03:00
parent 9de26bb595
commit 733c96cd36
2 changed files with 25 additions and 3 deletions

View File

@@ -1,4 +1,5 @@
# Wallpapers Collection # Wallpapers Collection
<a name="top"></a>
## Table of Contents ## Table of Contents
- [Cat Latte](#cat-latte) - [Cat Latte](#cat-latte)
@@ -15,6 +16,8 @@
## Cat Latte ## Cat Latte
**[⇧ back to top](#top)**
### akira — _14M_ ### akira — _14M_
<img src="Cat Latte/akira.png" alt="akira" /> <img src="Cat Latte/akira.png" alt="akira" />
@@ -126,6 +129,8 @@
## Catppuccin Macchiato ## Catppuccin Macchiato
**[⇧ back to top](#top)**
### 20_lakeside_sunset — _2.9M_ ### 20_lakeside_sunset — _2.9M_
<img src="Catppuccin Macchiato/20_lakeside_sunset.png" alt="20_lakeside_sunset" /> <img src="Catppuccin Macchiato/20_lakeside_sunset.png" alt="20_lakeside_sunset" />
@@ -181,6 +186,8 @@
## Code Garden ## Code Garden
**[⇧ back to top](#top)**
### art — _13M_ ### art — _13M_
<img src="Code Garden/art.png" alt="art" /> <img src="Code Garden/art.png" alt="art" />
@@ -332,6 +339,8 @@
## Cosmic Blue ## Cosmic Blue
**[⇧ back to top](#top)**
### 1 — _6.6M_ ### 1 — _6.6M_
<img src="Cosmic Blue/1.png" alt="1" /> <img src="Cosmic Blue/1.png" alt="1" />
@@ -351,6 +360,8 @@
## Dracula ## Dracula
**[⇧ back to top](#top)**
### cat — _308K_ ### cat — _308K_
<img src="Dracula/cat.png" alt="cat" /> <img src="Dracula/cat.png" alt="cat" />
@@ -386,6 +397,8 @@
## Grukai ## Grukai
**[⇧ back to top](#top)**
### Boxes — _40K_ ### Boxes — _40K_
<img src="Grukai/Boxes.png" alt="Boxes" /> <img src="Grukai/Boxes.png" alt="Boxes" />
@@ -449,6 +462,8 @@
## Monterey Frost ## Monterey Frost
**[⇧ back to top](#top)**
### Mojave-nord-dark — _144K_ ### Mojave-nord-dark — _144K_
<img src="Monterey Frost/Mojave-nord-dark.png" alt="Mojave-nord-dark" /> <img src="Monterey Frost/Mojave-nord-dark.png" alt="Mojave-nord-dark" />
@@ -532,6 +547,8 @@
## Nightbrew ## Nightbrew
**[⇧ back to top](#top)**
### abstract — _196K_ ### abstract — _196K_
<img src="Nightbrew/abstract.png" alt="abstract" /> <img src="Nightbrew/abstract.png" alt="abstract" />
@@ -571,6 +588,8 @@
## Tundra ## Tundra
**[⇧ back to top](#top)**
### tundra2 — _15M_ ### tundra2 — _15M_
<img src="Tundra/tundra2.png" alt="tundra2" /> <img src="Tundra/tundra2.png" alt="tundra2" />

View File

@@ -3,9 +3,10 @@ set -euo pipefail
OUT="README.md" OUT="README.md"
# Header & TOC # Header + hidden anchor + TOC
cat > "$OUT" <<EOF cat > "$OUT" <<EOF
# Wallpapers Collection # Wallpapers Collection
<a name="top"></a>
## Table of Contents ## Table of Contents
EOF EOF
@@ -20,7 +21,7 @@ done
echo -e "\n---\n" >> "$OUT" echo -e "\n---\n" >> "$OUT"
# Folders with image entries # Sections for each folder and images
for dir in */; do for dir in */; do
dir_name="${dir%/}" dir_name="${dir%/}"
anchor=$(printf '%s' "$dir_name" \ anchor=$(printf '%s' "$dir_name" \
@@ -30,11 +31,13 @@ for dir in */; do
echo "## ${dir_name}" >> "$OUT" echo "## ${dir_name}" >> "$OUT"
echo "" >> "$OUT" echo "" >> "$OUT"
echo "**[⇧ back to top](#top)**" >> "$OUT"
echo "" >> "$OUT"
for img in "${dir}"*.{png,jpg,jpeg,gif}; do for img in "${dir}"*.{png,jpg,jpeg,gif}; do
[ -f "$img" ] || continue [ -f "$img" ] || continue
fn="$(basename "${img%.*}")" fn="$(basename "${img%.*}")"
rel="$(echo "$img" | sed 's|^\./||')" rel="$(echo "$img" | sed 's|^\./||')"
# Get filesize in human-readable format
size=$(du -h "$img" | cut -f1) size=$(du -h "$img" | cut -f1)
echo "### ${fn} — _${size}_ " >> "$OUT" echo "### ${fn} — _${size}_ " >> "$OUT"