This commit is contained in:
Thomas Baruchel 2022-11-05 11:37:18 +01:00
parent d16cbdbffc
commit 5c09e23172

View File

@ -15,6 +15,10 @@ html = docutils.core.publish_parts(open(filename, mode="r").read(),
def extract_docinfos(html):
"""
Parse the publish_parts dictionary and return a dictionary containing
the docinfos from the RsT document.
"""
soup1 = bs4.BeautifulSoup(html["docinfo"], 'html.parser')
return { tr.find("th").text:
tr.find("td").text