Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

Commit

Permalink
fix: XML indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ninpnin committed Feb 9, 2024
1 parent 3007ff5 commit 0d97284
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyriksdagen/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ def write_protocol(prot_elem, prot_path):
"""
Writes the protocol lxml element (`prot_elem`) to the specified path (`prot_path`).
"""
prot_elem = format_texts(prot_elem)
prot_elem = format_texts(prot_elem, padding=10)
b = etree.tostring(
prot_elem,
pretty_print=True,
Expand Down
2 changes: 1 addition & 1 deletion scripts/fix_capitalized_dashes.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def main(args):
elem.text = re.sub(pattern, r"\1\3", txt)
# e.match(string)

root = format_texts(root)
root = format_texts(root, padding=10)

b = etree.tostring(
root, pretty_print=True, encoding="utf-8", xml_declaration=True
Expand Down
2 changes: 1 addition & 1 deletion scripts/reclassify.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def main(args):
root = etree.parse(protocol_path, parser).getroot()

root = reclassify(root, classifier, exclude=["date", "speaker"])
root = format_texts(root)
root = format_texts(root, padding=10)
b = etree.tostring(root, pretty_print=True, encoding="utf-8", xml_declaration=True)

with open(protocol_path, "wb") as f:
Expand Down
2 changes: 1 addition & 1 deletion scripts/resegment.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def main(args):
(pattern_db["start"] <= year) & (pattern_db["end"] >= year)
]
root = find_introductions(root, pattern_db, intro_ids, minister_db=None)
root = format_texts(root)
root = format_texts(root, padding=10)
b = etree.tostring(
root, pretty_print=True, encoding="utf-8", xml_declaration=True
)
Expand Down

0 comments on commit 0d97284

Please sign in to comment.