summaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2023-06-08 22:19:31 +0200
committerThomas Voss <mail@thomasvoss.com> 2023-06-08 22:19:31 +0200
commit13e17134e57936460f2453d586b90fb8c857f404 (patch)
tree9ea2a1b121fc7051e3015297ba84e56aa48abe36 /scripts
parent8e869ad44f9d5d0c311d5e5fc77e771b00aa8237 (diff)
Sync the changelog
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/changelog-dates.sed36
1 files changed, 36 insertions, 0 deletions
diff --git a/scripts/changelog-dates.sed b/scripts/changelog-dates.sed
new file mode 100755
index 0000000..6bdde24
--- /dev/null
+++ b/scripts/changelog-dates.sed
@@ -0,0 +1,36 @@
+#!/bin/sed -Ef
+
+/<section id=[0-9]{2}-[0-9]{2}-[0-9]{4}[ >]/ {
+ h
+
+ s/.*<section id=([0-9]{2})-([0-9]{2})-([0-9]{4})[ >].*/\1 of \2, \3/
+
+ s/^0//
+
+ /^[^1]?1 / { s| |<sup>st</sup> |; b out }
+ /^[^1]?2 / { s| |<sup>nd</sup> |; b out }
+ /^[^1]?3 / { s| |<sup>rd</sup> |; b out }
+ s| |<sup>th</sup> |
+
+ :out
+
+ s/of 01/of January/
+ s/of 02/of February/
+ s/of 03/of March/
+ s/of 04/of April/
+ s/of 05/of May/
+ s/of 06/of June/
+ s/of 07/of July/
+ s/of 08/of August/
+ s/of 09/of September/
+ s/of 10/of October/
+ s/of 11/of November/
+ s/of 12/of December/
+
+ x
+}
+
+/<!-- DATE -->/ {
+ G
+ s/(.*)<!-- DATE -->(.*)\n(.*)/\1\3\2/
+}