mark up release notes as articles
This commit is contained in:
parent
abc83cbed6
commit
9231fb02a4
@ -6,7 +6,7 @@ import lxml.html
|
|||||||
from lxml import etree
|
from lxml import etree
|
||||||
|
|
||||||
document = lxml.html.parse("static_tmp/releases.html").getroot()
|
document = lxml.html.parse("static_tmp/releases.html").getroot()
|
||||||
releases = document.body.cssselect("#changelog h3")
|
releases = document.body.cssselect("#changelog article")
|
||||||
|
|
||||||
updated = None
|
updated = None
|
||||||
entries = []
|
entries = []
|
||||||
@ -16,11 +16,7 @@ for release in releases:
|
|||||||
time = datetime.strptime(title, "%Y.%m.%d.%H").isoformat() + "Z"
|
time = datetime.strptime(title, "%Y.%m.%d.%H").isoformat() + "Z"
|
||||||
if updated is None:
|
if updated is None:
|
||||||
updated = time
|
updated = time
|
||||||
content = []
|
content = [etree.tostring(e).decode() for e in release.getchildren()[1:]]
|
||||||
element = release.getnext()
|
|
||||||
while element is not None and element.tag != "h3":
|
|
||||||
content.append(etree.tostring(element).decode())
|
|
||||||
element = element.getnext()
|
|
||||||
entry = f"""\
|
entry = f"""\
|
||||||
<entry>
|
<entry>
|
||||||
<id>https://grapheneos.org/releases#{title}</id>
|
<id>https://grapheneos.org/releases#{title}</id>
|
||||||
|
2920
static/releases.html
2920
static/releases.html
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user