falkon.sgorava.xyz/convert.sh

6 lines
566 B
Bash
Raw Normal View History

#!/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|\.\./images|/images|g; s|\.\./extensions|https://git\.sgorava\.xyz/Falkon/FalkonTutorials/src/branch/master/qml/extensions|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|\.\./images|/images|g; s|\.\./extensions|https://git\.sgorava\.xyz/Falkon/FalkonTutorials/src/branch/master/python/extensions|g' {} \;
exit 0