<feed xmlns='http://www.w3.org/2005/Atom'>
<title>yasutakeyohei.com/scripts/parse-sanpi-hyo.py, branch main</title>
<subtitle>公式ウェブサイトのソースコード（Astro + Starlight）</subtitle>
<id>https://cgit.yasutakeyohei.com/yasutakeyohei.com.git/atom/scripts/parse-sanpi-hyo.py?h=main</id>
<link rel='self' href='https://cgit.yasutakeyohei.com/yasutakeyohei.com.git/atom/scripts/parse-sanpi-hyo.py?h=main'/>
<link rel='alternate' type='text/html' href='https://cgit.yasutakeyohei.com/yasutakeyohei.com.git/'/>
<updated>2026-09-23T13:49:07Z</updated>
<entry>
<title>parse-sanpi-hyo.py ほか: 会派内で分かれた賛否をまとめて表示する</title>
<updated>2026-09-23T13:49:07Z</updated>
<author>
<name>Yasutake Yohei</name>
<email>61961825+yasutakeyohei@users.noreply.github.com</email>
</author>
<published>2026-09-23T13:49:07Z</published>
<link rel='alternate' type='text/html' href='https://cgit.yasutakeyohei.com/yasutakeyohei.com.git/commit/?id=ef6198546f3ff120598ec50f51f52feb1b15b530'/>
<id>urn:sha1:ef6198546f3ff120598ec50f51f52feb1b15b530</id>
<content type='text'>
会派内で賛否が割れた場合、その会派の全議員を列にしていたため、令和7年3月は17列と横に長くなっていた。

同じ票の議員は「会派（人数）」にまとめ、異なる議員だけ名前を出して列を分ける方式に変えた。議長・副議長など全議案で表決に加わらない議員は、まとめた列に含める（別の列にしない）。

これで令和7年3月の表は13列になった。あわせて凡例に「退場」を追記した。
</content>
</entry>
<entry>
<title>parse-sanpi-hyo.py: 罫線が無い年度に対応し、件名の抽出を修正</title>
<updated>2026-09-23T00:57:34Z</updated>
<author>
<name>Yasutake Yohei</name>
<email>61961825+yasutakeyohei@users.noreply.github.com</email>
</author>
<published>2026-09-23T00:57:34Z</published>
<link rel='alternate' type='text/html' href='https://cgit.yasutakeyohei.com/yasutakeyohei.com.git/commit/?id=23565ef2a5cfe3fe2a599e8b36fdf191892d2c4c'/>
<id>urn:sha1:23565ef2a5cfe3fe2a599e8b36fdf191892d2c4c</id>
<content type='text'>
議員列は、議員名のx座標をクラスタリングして作る方式に変更した。令和8年6月のPDFには列の縦罫線がほとんど無く、罫線では列を作れなかったため。

同じ議案でも、セルの高さの違いで賛否記号のyが最大9pxずれる。議案どうしの行間は17px以上あるので、その間を取って13px以内は同じ行にまとめる。

件名は中央揃えの複数行になるため、単純に連結すると号数欄・議決結果欄が件名の途中に挟まる。議決結果は「いちばん右にある議決語」だけを採用し、その語だけを件名から取り除く。
</content>
</entry>
<entry>
<title>parse-sanpi-hyo.py: 令和8年3月のレイアウトに対応</title>
<updated>2026-09-23T00:37:14Z</updated>
<author>
<name>Yasutake Yohei</name>
<email>61961825+yasutakeyohei@users.noreply.github.com</email>
</author>
<published>2026-09-23T00:37:14Z</published>
<link rel='alternate' type='text/html' href='https://cgit.yasutakeyohei.com/yasutakeyohei.com.git/commit/?id=d9b4276d838c1cdaa89f3be2fbe98b7c9719a921'/>
<id>urn:sha1:d9b4276d838c1cdaa89f3be2fbe98b7c9719a921</id>
<content type='text'>
表の縦罫線を上下の幅で判定して文字の輪郭線を除き（列がずれる原因だった）、会派名の行をページ内から探し、議決結果の印は部分一致で判定するようにした。令和8年3月定例会は8議案すべてで検算が一致。令和8年6月定例会はレイアウトがさらに異なる（冒頭が全会一致の欄、会派が9つ）ため未対応で、続けて対応する。
</content>
</entry>
<entry>
<title>parse-sanpi-hyo.py: 表を生成できるようにし、gen-sanpi-table.py は削除</title>
<updated>2026-09-23T00:27:49Z</updated>
<author>
<name>Yasutake Yohei</name>
<email>61961825+yasutakeyohei@users.noreply.github.com</email>
</author>
<published>2026-09-23T00:27:49Z</published>
<link rel='alternate' type='text/html' href='https://cgit.yasutakeyohei.com/yasutakeyohei.com.git/commit/?id=0655bca9adb74837310d18b5c688760b41133662'/>
<id>urn:sha1:0655bca9adb74837310d18b5c688760b41133662</id>
<content type='text'>
上部の「会派名（議員数）」を読み、縦罫線で列を区切り、前後の中点で行のテキストをまとめ、PDFの合計欄と突き合わせて検算するようにした。令和7年12月定例会では、会派・議員27人が市の会派名簿と一致し、4議案すべてで賛成・反対数がPDFの合計と一致した。これで表まで一括生成できるようになったため、重複する gen-sanpi-table.py は削除した。
</content>
</entry>
<entry>
<title>parse-sanpi-hyo.py: 罫線で列を区切り、合計欄で検算する方式に変更</title>
<updated>2026-09-23T00:11:52Z</updated>
<author>
<name>Yasutake Yohei</name>
<email>61961825+yasutakeyohei@users.noreply.github.com</email>
</author>
<published>2026-09-23T00:11:52Z</published>
<link rel='alternate' type='text/html' href='https://cgit.yasutakeyohei.com/yasutakeyohei.com.git/commit/?id=2e9dae139d7bcb00d94aa31a71e9206d0f454d8d'/>
<id>urn:sha1:2e9dae139d7bcb00d94aa31a71e9206d0f454d8d</id>
<content type='text'>
従来は表のセル抽出と会派の区切りの推測に頼っていて、会派や議員ごとの列がずれることがあった。上部の「会派名（議員数）」を読み、縦罫線で列を厳密に区切って議員名と賛否記号を割り当て、PDFに載っている議案ごとの賛成・反対の合計と突き合わせて検算する方式にした。令和7年12月定例会で、会派・議員27人が市の会派名簿と一致し、4議案の賛成・反対数もPDFの合計とすべて一致することを確認。（表の生成側 gen-sanpi-table.py は、この出力に合わせて後日更新が必要）
</content>
</entry>
<entry>
<title>sanpi.mdx ほか: 議案の賛否一覧の試作（下書き）を追加</title>
<updated>2026-09-22T06:04:15Z</updated>
<author>
<name>Yasutake Yohei</name>
<email>61961825+yasutakeyohei@users.noreply.github.com</email>
</author>
<published>2026-09-22T06:04:15Z</published>
<link rel='alternate' type='text/html' href='https://cgit.yasutakeyohei.com/yasutakeyohei.com.git/commit/?id=97b848288482ab3c6dd277c3ccdcca3eced7d52e'/>
<id>urn:sha1:97b848288482ab3c6dd277c3ccdcca3eced7d52e</id>
<content type='text'>
小平市議会の「議案に対する各議員の賛否一覧」PDFから、会派ごと・議員ごとの賛否を抽出するスクリプト（scripts/）と、試作ページを追加した。ページは draft: true のため本番ビルドには含まれない（開発サーバーでのみ表示）。
</content>
</entry>
</feed>
