mirror of
https://github.com/moparisthebest/xeps
synced 2024-11-22 01:02:17 -05:00
extract-metadata.py: Add tag info to xeplist.xml
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
e4fdc477b7
commit
ac1eda3476
@ -101,6 +101,12 @@ def extract_xep_metadata(document):
|
|||||||
else:
|
else:
|
||||||
last_call = None
|
last_call = None
|
||||||
|
|
||||||
|
tags = []
|
||||||
|
tags_elem = minidom_find_child(header, "tags")
|
||||||
|
if tags_elem is not None:
|
||||||
|
for child in minidom_children(tags_elem):
|
||||||
|
tags.append(minidom_get_text(child))
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"last_revision": {
|
"last_revision": {
|
||||||
"version": last_revision_version,
|
"version": last_revision_version,
|
||||||
@ -113,6 +119,7 @@ def extract_xep_metadata(document):
|
|||||||
"sig": sig,
|
"sig": sig,
|
||||||
"abstract": abstract,
|
"abstract": abstract,
|
||||||
"shortname": shortname,
|
"shortname": shortname,
|
||||||
|
"tags": tags,
|
||||||
"title": title,
|
"title": title,
|
||||||
"approver": approver,
|
"approver": approver,
|
||||||
"last_call": last_call,
|
"last_call": last_call,
|
||||||
@ -137,6 +144,12 @@ def make_metadata_element(number, metadata, accepted, *, protoname=None):
|
|||||||
if metadata["shortname"] is not None:
|
if metadata["shortname"] is not None:
|
||||||
result.append(text_element("shortname", metadata["shortname"]))
|
result.append(text_element("shortname", metadata["shortname"]))
|
||||||
|
|
||||||
|
if metadata["tags"]:
|
||||||
|
tags = etree.Element("tags")
|
||||||
|
for tag in metadata["tags"]:
|
||||||
|
tags.append(text_element("tag", tag))
|
||||||
|
result.append(tags)
|
||||||
|
|
||||||
if metadata["last_revision"]["version"] is not None:
|
if metadata["last_revision"]["version"] is not None:
|
||||||
last_revision = metadata["last_revision"]
|
last_revision = metadata["last_revision"]
|
||||||
revision_el = etree.Element("last-revision")
|
revision_el = etree.Element("last-revision")
|
||||||
|
Loading…
Reference in New Issue
Block a user