falkon.sgorava.xyz/convert.sh
Juraj Oravec 0758a391c7
Initial commit
Signed-off-by: Juraj Oravec <jurajoravec@mailo.com>
2022-04-27 23:19:52 +02:00

6 lines
333 B
Bash
Executable File

#!/bin/bash
find content/qml -type f -name "*.md" -exec sed -i '1 s/#/---\ntitle:/; 1 s/.*[^0-9]\([0-9]\+\)[^0-9]*$/\0\nnumber: \1/;1 s/$/\n---\n/; s|\.\./|/|g' {} \;
find content/python -type f -name "*.md" -exec sed -i '1 s/#/---\ntitle:/; 1 s/.*[^0-9]\([0-9]\+\)[^0-9]*$/\0\nnumber: \1/;1 s/$/\n---\n/; s|\.\./|/|g' {} \;
exit 0