diff options
| author | Yasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com> | 2026-10-04 23:24:31 +0900 |
|---|---|---|
| committer | Yasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com> | 2026-10-04 23:24:31 +0900 |
| commit | bb0d752b04eae60b88ec162d07e9409483159d95 (patch) | |
| tree | a023bb7b3e87f31ecd840839b2031529ef050f40 /scripts/parse-sanpi-hyo.py | |
| parent | bbefd07f238dd0cecb82fa75d36ffcffe9613ef8 (diff) | |
sanpi.mdx: 賛否一覧に令和7年6月・4月臨時会・令和6年12月を追加
各表の下に安竹側・反対会派の賛否理由を簡潔に記載した。安竹列のセル着色、請願バッジ、見出しの改行、上部の会派別グラフ(安竹を先頭・太字、れ新(中倉)・市民(水口))を追加。生成スクリプトを同じ並び・氏名なし・請願バッジ・見出し改行に対応させた。
Diffstat (limited to 'scripts/parse-sanpi-hyo.py')
| -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}人)") |
