aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorYasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com>2026-10-03 14:55:04 +0900
committerYasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com>2026-10-03 14:55:04 +0900
commit27483644d7ba9e819dbb5f64844270dd499f45ff (patch)
tree9a82bfc89df4a8be267e3dd06e602e8b98fd6090 /scripts
parentc23c8fb5c547540c0705bef900340c9a6e358126 (diff)
sanpi.mdx: 賛否一覧表の列を整理し、スマホで読みやすくする
安竹洋平・伊藤央・石津はるかの列を議決結果の右にまとめ、水口かずえ・中倉茂和・岡田しんぺいの氏名は外して会派名だけにした。安竹の列はセル全体に色を付ける。スマホでは表を横スクロールにし、議案名は省略表示+ホバー/タップで全文表示とした。生成側の scripts/parse-sanpi-hyo.py も同じ並び・氏名なしで出力するよう修正した。
Diffstat (limited to 'scripts')
-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 = []