section built from the .
"""
# Get the date
mydate = ""
+ mytitle = d.find("h1").text
try:
mydate = find_date(d)
except dateutil.parser.ParserError:
pass
print("""
+ %s
%s
%s
@@ -84,8 +86,8 @@ def build_entry(d):
""" % (
- d.find("h1").text,
- mydate, d
+ base_url + "#" + mytitle.lower().replace(" ", "-"),
+ mytitle, mydate, d
))
@@ -126,6 +128,6 @@ print("""
for d in divs:
# don't handle subsections
if d.find_parent("div"): continue
- build_entry(d)
+ build_entry(d, meta["original-source"])
print("")