Relegate assets to subdir (+ new pages)
This commit is contained in:
12
פילוסופיה/יוונית/assets/footnote-converter.sh
Normal file
12
פילוסופיה/יוונית/assets/footnote-converter.sh
Normal file
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
for wiki_file in $(find ./ -type f -name '*.md'); do
|
||||
echo "Found file: $(basename $wiki_file)"
|
||||
file_footnotes=$(grep -Eo "\^[0-9]{1,2}\^" $wiki_file)
|
||||
echo -e "Found footnotes:\n$file_footnotes"
|
||||
for footnote in $file_footnotes; do
|
||||
#Stip ^ signs
|
||||
footnote_index=$(echo $footnote | sed -e 's/\^//g')
|
||||
markdown_footnote="[^$footnote_index]"
|
||||
echo "Converted $footnote to $markdown_footnote"
|
||||
done
|
||||
done
|
||||
Reference in New Issue
Block a user