diff options
author | Thomas Voss <mail@thomasvoss.com> | 2023-10-29 22:39:48 +0100 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2023-10-29 22:39:48 +0100 |
commit | 9cad508b5c98ca1029460807249cafb712f28f1e (patch) | |
tree | 2ad62d1ca57b7dc691550865cb7fb0b55c26da34 /scripts/changelog-dates.sed | |
parent | c88b4c2d0842dfbb32fa744dde781601b9e4e7cf (diff) |
Migrate the site to GSP and a Makefile
Diffstat (limited to 'scripts/changelog-dates.sed')
-rwxr-xr-x | scripts/changelog-dates.sed | 58 |
1 files changed, 26 insertions, 32 deletions
diff --git a/scripts/changelog-dates.sed b/scripts/changelog-dates.sed index 6bdde24..fec1d97 100755 --- a/scripts/changelog-dates.sed +++ b/scripts/changelog-dates.sed @@ -1,36 +1,30 @@ #!/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 +/start/ { + iStart of the Changelog + Q } -/<!-- DATE -->/ { - G - s/(.*)<!-- DATE -->(.*)\n(.*)/\1\3\2/ -} +s/([0-9]{2})-([0-9]{2})-([0-9]{4})/\1 of \2, \3/ + +s/^0// + +/^[^1]?1 / { s| |@sup{-st} |; b out } +/^[^1]?2 / { s| |@sup{-nd} |; b out } +/^[^1]?3 / { s| |@sup{-rd} |; b out } + s| |@sup{-th} | + +: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/ |