first scripts

This commit is contained in:
Aron Petau 2025-05-05 23:35:33 +02:00
parent 178586c47a
commit 3bd579da3c
269 changed files with 96 additions and 3285 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 273 KiB

View file

@ -1,21 +0,0 @@
#!/bin/bash
# Regex pattern for ISO date format filenames like 2019-06-01-something.md
pattern='^[0-9]{4}-[0-9]{2}-[0-9]{2}-.+\.md$'
echo "Processing markdown files in $(pwd)"
echo
for file in *.md; do
# Skip if no matching files (glob doesn't find anything)
[ -e "$file" ] || continue
if [[ "$file" =~ $pattern ]]; then
basename="${file%.md}"
mkdir -p "$basename"
mv "$file" "$basename/index.md"
echo "✔ Processed: $file$basename/index.md"
else
echo "✘ Skipped (pattern mismatch): $file"
fi
done

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 212 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 328 KiB