summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com>2026-11-23 09:51:30 +0900
committerYasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com>2026-11-23 09:51:30 +0900
commitaa591b1fd65253f925138b3ad5d1b9688b2a9122 (patch)
tree3f12b512feb851ea91da6fe95e0809ab2adc6aba
parentbe3c9c978843453c46a599792450d9750d005630 (diff)
events.json: 図書館イベントの出典に図書館ページを併記
- 秋のおはなし工作会・図書館のスペシャルおはなし会の source に図書館のページを追加 - update-library-dates.mjs: 市報など他の出典を併記している行は自動同期しない (図書館カレンダーに誤りがある事例があるため)
-rw-r--r--scripts/update-library-dates.mjs12
-rw-r--r--src/data/schedule/events.json4
2 files changed, 14 insertions, 2 deletions
diff --git a/scripts/update-library-dates.mjs b/scripts/update-library-dates.mjs
index 74b9302..a41fae1 100644
--- a/scripts/update-library-dates.mjs
+++ b/scripts/update-library-dates.mjs
@@ -109,6 +109,7 @@ async function main() {
const inTable = new Map();
const changes = [];
+ const skipped = [];
for (const row of rows) {
const m = (row.source || '').match(LIB_SOURCE_RE);
@@ -116,6 +117,13 @@ async function main() {
const id = m[1];
inTable.set(id, { name: row.title, datesCell: row.date, row });
+ // 市報など他の出典を併記している行は、そちらの日付を優先して自動同期しない
+ // (図書館のカレンダーに誤りがある事例が判明しているため)。
+ if (/市報/.test(row.source || '')) {
+ skipped.push(row.title);
+ continue;
+ }
+
const ev = events.get(id);
if (!ev || ev.dates.size === 0) continue;
const next = formatDates(ev.dates, ev.dates.size === 1);
@@ -123,6 +131,10 @@ async function main() {
}
console.log(`図書館の予定: カレンダー ${events.size}件 / 表 ${inTable.size}件(${months}か月分を取得)`);
+ if (skipped.length > 0) {
+ console.log('(市報の日付を優先し、自動同期しない行)');
+ for (const name of skipped) console.log(`- ${name}`);
+ }
if (changes.length === 0) {
console.log('日付の変更はありません。');
diff --git a/src/data/schedule/events.json b/src/data/schedule/events.json
index 03b1fe2..39b5184 100644
--- a/src/data/schedule/events.json
+++ b/src/data/schedule/events.json
@@ -1342,7 +1342,7 @@
"title": "📚 秋のおはなし工作会",
"place": "午後2時から午後3時まで/中央図書館",
"note": "4歳児から小学生10人。おはなしや絵本の内容にちなんだ、まつぼっくりツリーを作ります。11月5日午前10時から12日午後5時までに申込みフォームへ(多数は抽選し、11月14日までに通知予定)。中央図書館 042-345-1246",
- "source": "市報こだいら11月5日号6面"
+ "source": "市報こだいら11月5日号6面/<a href=\"https://library.kodaira.ed.jp/viewer/info.html?id=400\">図書館のページ</a>"
},
{
"date": "12月5日(土)",
@@ -2336,7 +2336,7 @@
"title": "📚 図書館のスペシャルおはなし会(12月)",
"place": "午後3時30分から4時まで/市内8館",
"note": "日頃、各図書館で行っているおはなし会のスペシャル版です。4歳〜小学生と保護者。中央12月1日、花小金井12月2日、仲町12月9日、喜平12月9日、大沼12月9日、上宿12月10日、小川西町12月20日、津田12月23日。定員は各館30〜80人程度で、受付開始日は11月12日〜12月1日。問合せは各館。",
- "source": "市報こだいら11月20日号6面"
+ "source": "市報こだいら11月20日号6面/<a href=\"https://library.kodaira.ed.jp/viewer/info.html?id=402\">図書館のページ</a>"
},
{
"date": "12月20日(日)",