projects
/
homepage.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
decode html entities from imported files
[homepage.git]
/
decode-html-entities.sh
diff --git a/decode-html-entities.sh
b/decode-html-entities.sh
new file mode 100755
(executable)
index 0000000..
f2b5e42
--- /dev/null
+++ b/
decode-html-entities.sh
@@ -0,0
+1,9
@@
+#!/bin/bash
+cd $(realpath "${BASH_SOURCE%/*}/src")
+
+files=$(find -name '*.md')
+
+for file in $files; do
+ cat "$file" | python3 -c 'import html,sys; print(html.unescape(sys.stdin.read()), end="")' > "$file.new"
+ mv "$file.new" "$file"
+done