first scripts
This commit is contained in:
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 |
|
@ -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 |
Loading…
Add table
Add a link
Reference in a new issue