diff --git a/blog/feed.xml b/blog/feed.xml index 6acf8a3..fb257ec 100644 --- a/blog/feed.xml +++ b/blog/feed.xml @@ -5,7 +5,7 @@ askiiart.net blog The feed for askiiart.net but just the blog, I guess https://askiiart.net/blog/ - Thu, 07 Mar 2024 05:17:23 +0000 + Wed, 13 Mar 2024 01:44:19 +0000 300 https://askiiart.net/til/300.html diff --git a/blog/marlin-boot-animations.html b/blog/marlin-boot-animations.html index e932b3a..036caa6 100755 --- a/blog/marlin-boot-animations.html +++ b/blog/marlin-boot-animations.html @@ -441,7 +441,7 @@
Linux Mint logo, as it would appear on a 128x64 display + title="Linux Mint logo, as it would appear on a 128x64 display" alt="Linux Mint logo, as it would appear on a 128x64 display" />
diff --git a/feed.xml b/feed.xml index 1e3c8fd..6158c98 100644 --- a/feed.xml +++ b/feed.xml @@ -5,7 +5,7 @@ askiiart.net The feed for askiiart.net, I guess https://askiiart.net - Thu, 07 Mar 2024 05:17:23 +0000 + Wed, 13 Mar 2024 01:44:19 +0000 300 https://askiiart.net/blog/300.html diff --git a/md2html.sh b/md2html.sh index 8ff9acc..e2e34bf 100755 --- a/md2html.sh +++ b/md2html.sh @@ -7,4 +7,5 @@ find . -name "*.md" | while read -r item; do echo "Currently processing ${item}" pandoc -f markdown-smart --data-dir . --template ${dir}/template.html -t html -o ${item}.html ${item}.md --metadata title="$(grep -m 1 -oP '(?<=^# ).*' ${item}.md | cat)" sed -i s/sourceCode\ /language-/g ${item}.html + python3 $dir/regex-chicanery.py ${item}.html done diff --git a/regex-chicanery.py b/regex-chicanery.py new file mode 100644 index 0000000..bdb1fc6 --- /dev/null +++ b/regex-chicanery.py @@ -0,0 +1,14 @@ +#!/usr/bin/env python3 +import re +import sys + +# add title attribute to img tags +filename = sys.argv[1] +with open(filename, 'r+') as f: + contents = ''.join(f.readlines()) + regexp = re.compile('alt="(.*?)"') + for match in regexp.finditer(contents): + contents = contents.replace(match.group(0), f'title="{match.group(1)}" {match.group(0)}') + +with open(filename, 'wt') as f: + f.write(contents) \ No newline at end of file diff --git a/til/feed.xml b/til/feed.xml index 533623f..5dd9a10 100644 --- a/til/feed.xml +++ b/til/feed.xml @@ -5,7 +5,7 @@ askiiart.net TIL The feed for askiiart.net but just TIL, I guess https://askiiart.net/til/ - Thu, 07 Mar 2024 05:17:23 +0000 + Wed, 13 Mar 2024 01:44:19 +0000 Akkoma in Docker https://askiiart.net/til/akkoma-in-docker.html