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

View File

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