aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/parse-sanpi-hyo.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/parse-sanpi-hyo.py')
-rw-r--r--scripts/parse-sanpi-hyo.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/scripts/parse-sanpi-hyo.py b/scripts/parse-sanpi-hyo.py
index 4af544e..5cda611 100644
--- a/scripts/parse-sanpi-hyo.py
+++ b/scripts/parse-sanpi-hyo.py
@@ -278,8 +278,21 @@ def main(path, label):
else:
out_cols.append((f"{s}({len(g)}人)", g))
+ # 安竹洋平・伊藤央・石津はるかの列は、議決結果の右にまとめて並べる
+ def _lead(h):
+ for i, key in enumerate(("安竹", "伊藤央", "石津")):
+ if key in h:
+ return i
+ return 9
+ out_cols.sort(key=lambda col: _lead(col[0]))
+
+ # 会派名だけを示す議員は、氏名を出さない
+ drop = re.compile(r"\s*(?:水口かずえ|中倉茂和|岡田しんぺい)")
+ out_cols = [(drop.sub("", h).strip(), idx) for h, idx in out_cols]
+
print(f"\n### {label}\n")
- print("| 議案 | 議決結果 | " + " | ".join(h for h, _ in out_cols) + " |")
+ heads = [f'<span class="sanpi-me">{h}</span>' if ME in h else h for h, _ in out_cols]
+ print("| 議案 | 議決結果 | " + " | ".join(heads) + " |")
print("|---|---|" + "---|" * len(out_cols))
for d in data:
cells = []