diff options
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/parse-sanpi-hyo.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/scripts/parse-sanpi-hyo.py b/scripts/parse-sanpi-hyo.py index 5cda611..5c2da66 100644 --- a/scripts/parse-sanpi-hyo.py +++ b/scripts/parse-sanpi-hyo.py @@ -291,7 +291,12 @@ def main(path, label): out_cols = [(drop.sub("", h).strip(), idx) for h, idx in out_cols] print(f"\n### {label}\n") - heads = [f'<span class="sanpi-me">{h}</span>' if ME in h else h for h, _ in out_cols] + # 「名前(会派)」の見出しは2行に分ける + heads = [ + f'<span class="sanpi-me">{h.replace("(", "<br />(", 1)}</span>' if ME in h + else h.replace("(", "<br />(", 1) + for h, _ in out_cols + ] print("| 議案 | 議決結果 | " + " | ".join(heads) + " |") print("|---|---|" + "---|" * len(out_cols)) for d in data: @@ -308,6 +313,9 @@ def main(path, label): ic, mark = kekka_icon(d["kekka"]) kekka = f'<span class="sanpi-kekka {ic}" title="{d["kekka"]}">{mark}</span>' if ic else d["kekka"] title = (d["no"] + " " + d["name"]).strip() + # 採択・不採択は請願(議案は可決・否決)。請願だと分かるように印を付ける + if "採択" in d["kekka"]: + title = '<span class="sanpi-shugan">請願</span>' + title print(f"| {title} | {kekka} | " + " | ".join(cells) + " |") print(f"\n(会派: " + " / ".join(f"{s}({n})" for s, _, n in parties) + f" = {total}人)") |
