{"id":37694112,"url":"https://github.com/sugijotaro/sfc-bus-schedule","last_synced_at":"2026-01-16T12:46:10.024Z","repository":{"id":287135335,"uuid":"962529760","full_name":"sugijotaro/sfc-bus-schedule","owner":"sugijotaro","description":"SFCのバス情報を提供するAPI","archived":false,"fork":false,"pushed_at":"2025-11-22T02:59:33.000Z","size":156,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-22T04:25:32.573Z","etag":null,"topics":["api","bus","csv","json","schedule","yaml"],"latest_commit_sha":null,"homepage":"https://sugijotaro.github.io/sfc-bus-schedule/data/v1/flat/from_sfc_weekday.json","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sugijotaro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-04-08T09:40:47.000Z","updated_at":"2025-11-22T02:59:25.000Z","dependencies_parsed_at":"2025-04-10T06:34:46.504Z","dependency_job_id":"63bed269-be87-4b3c-acdf-fc14160b955e","html_url":"https://github.com/sugijotaro/sfc-bus-schedule","commit_stats":null,"previous_names":["sugijotaro/sfc-bus-schedule"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sugijotaro/sfc-bus-schedule","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sugijotaro%2Fsfc-bus-schedule","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sugijotaro%2Fsfc-bus-schedule/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sugijotaro%2Fsfc-bus-schedule/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sugijotaro%2Fsfc-bus-schedule/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sugijotaro","download_url":"https://codeload.github.com/sugijotaro/sfc-bus-schedule/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sugijotaro%2Fsfc-bus-schedule/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478738,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","bus","csv","json","schedule","yaml"],"created_at":"2026-01-16T12:46:09.938Z","updated_at":"2026-01-16T12:46:09.997Z","avatar_url":"https://github.com/sugijotaro.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SFC Bus Schedule API\n\n慶應義塾大学 湘南藤沢キャンパス(SFC)と、電車最寄駅である湘南台駅の間を運行するバスの時刻表を、APIライクに利用できる形式で提供するプロジェクトです。\n\n## 特徴\n\n- **シンプルなデータ管理**: YAMLとCSVファイルで時刻表を管理\n  - YAML: バス路線の基本情報（停留所、経由地など）\n  - CSV: 時刻表データ\n- **自動JSON生成**: 管理用ファイルから自動的にJSONを生成\n- **コントリビューションしやすさ**: プログラミングの知識がなくても時刻表の更新が可能\n\n## データ構造\n\n### ルート情報 (YAML)\n`config/routes.yaml`に以下の情報を管理:\n- 路線名\n- 行き先\n- 経由地\n- 停留所情報\n- 時刻表CSVファイルのパス\n\n### 時刻表データ (CSV)\n各路線の時刻表をCSVファイルで管理:\n- 平日\n- 土曜日\n- 日曜日・祝日\n\n### 生成されるJSON\n\n#### 路線別JSON (`data/v1/route/`)\n各路線の詳細情報と時刻表を提供します。\n\n例: `sho19_from_saturday.json`\n```json\n{\n  \"route_id\": \"sho19\",\n  \"path_id\": \"sho19_from\",\n  \"name\": \"湘南台駅西口行\",\n  \"origin\": \"慶応大学\",\n  \"destination\": \"湘南台駅西口\",\n  \"via\": \"宮原・慶応大学\",\n  \"stops\": [\n    {\n      \"name\": \"慶応大学\",\n      \"cumulative_time\": 0\n    },\n    // ... その他の停留所\n  ],\n  \"timetable\": [\n    {\n      \"time\": 7,\n      \"minute\": 18\n    },\n    // ... その他の時刻\n  ]\n}\n```\n\n#### フラットJSON (`data/v1/flat/`)\n各バス便の詳細情報を提供します。停留所ごとの到着時刻も含まれます。\n\n例: `from_sfc_saturday.json`\n```json\n[\n  {\n    \"id\": \"sho190718\",\n    \"time\": 7,\n    \"minute\": 18,\n    \"scheduleType\": \"saturday\",\n    \"routeCode\": \"sho19\",\n    \"routeName\": \"湘19\",\n    \"name\": \"湘南台駅西口行\",\n    \"origin\": \"慶応大学\",\n    \"destination\": \"湘南台駅西口\",\n    \"via\": \"宮原・慶応大学\",\n    \"metadata\": {\n      \"stops\": [\n        {\n          \"name\": \"慶応大学\",\n          \"cumulative_time\": 0,\n          \"arrival\": {\n            \"time\": 7,\n            \"minute\": 18\n          }\n        },\n        // ... その他の停留所と到着時刻\n      ]\n    }\n  },\n  // ... その他のバス便\n]\n```\n\n### 臨時ダイヤの情報 (YAML)\n`config/special_schedules.yaml`で特定の日付に適用する臨時ダイヤを管理します。\n\n- `date`: 臨時ダイヤを適用する日付 (YYYY-MM-DD)\n- `description`: 臨時ダイヤの説明（例：オープンキャンパスダイヤ）\n- `type`: 臨時ダイヤのユニークID\n- `routes`: その日に運行する路線情報（`routes.yaml`と同じ形式）\n\n#### 臨時ダイヤのメタデータ (`data/v1/special_schedules.json`)\n適用されるすべての臨時ダイヤの情報を一覧で提供します。クライアント側はまずこのファイルを参照し、当日に適用される臨時ダイヤがあるか確認します。\n```json\n[\n  {\n    \"date\": \"2025-07-05\",\n    \"description\": \"慶應義塾大学湘南藤沢キャンパス「七夕祭」開催に伴う臨時便の運行および起終点の変更\",\n    \"type\": \"special_20250705\"\n  }\n]\n```\n\n#### 臨時ダイヤの時刻表JSON (`data/v1/special/{type}/`)\n臨時ダイヤが適用される日は、専用ディレクトリ内に時刻表JSONが生成されます。\n- `to_sfc.json`: SFC行きの全便\n- `from_sfc.json`: SFC発の全便\n\n例: `data/v1/special/special_20250705/to_sfc.json`\n\n## APIの利用方法\n\n生成されたJSONは以下のURLで直接アクセス可能です：\n\n### 通常ダイヤ\n- 路線別JSON: `https://sugijotaro.github.io/sfc-bus-schedule/data/v1/route/{route_id}_{direction}_{schedule_type}.json`\n  - 例: `https://sugijotaro.github.io/sfc-bus-schedule/data/v1/route/sho19_from_saturday.json`\n\n- フラットJSON: `https://sugijotaro.github.io/sfc-bus-schedule/data/v1/flat/{direction}_{schedule_type}.json`\n  - 例: `https://sugijotaro.github.io/sfc-bus-schedule/data/v1/flat/from_sfc_saturday.json`\n\n### 臨時ダイヤ\n- 臨時ダイヤメタデータ: `https://sugijotaro.github.io/sfc-bus-schedule/data/v1/special_schedules.json`\n- 臨時ダイヤ時刻表: `https://sugijotaro.github.io/sfc-bus-schedule/data/v1/special/{type}/{direction}_sfc.json`\n  - 例: `https://sugijotaro.github.io/sfc-bus-schedule/data/v1/special/special_20250705/to_sfc.json`\n\nこれらのURLに直接アクセスすることで、JSONデータを取得できます。CORSも有効になっているため、Webアプリケーションから直接利用可能です。\n\n## ブランチ構成\n\n- `main`: 安定版のリリースブランチ\n- `develop`: 開発用ブランチ\n- `feature/*`: 新機能開発用ブランチ\n- `hotfix/*`: 緊急バグ修正用ブランチ\n\n## コントリビューション方法\n\n1. 時刻表の更新\n   - 該当するCSVファイルを編集\n   - 時刻の追加・修正は簡単なCSV編集で可能\n\n2. 路線情報の更新\n   - `config/routes.yaml`を編集\n   - 新しい停留所の追加や経路変更を反映\n\n3. 新しい路線の追加\n   - 新しいYAMLエントリの追加\n   - 対応するCSVファイルの作成\n\n## 使用方法\n\n1. リポジトリのクローン\n```bash\ngit clone https://github.com/sugijotaro/sfc-bus-schedule.git\n```\n\n2. JSONの生成\n```bash\npython generate_json_v1.py\n```\n\n## ライセンス\n\nMIT License\n\n## コントリビュータ\n\n[コントリビュータ一覧](CONTRIBUTORS.md) ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsugijotaro%2Fsfc-bus-schedule","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsugijotaro%2Fsfc-bus-schedule","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsugijotaro%2Fsfc-bus-schedule/lists"}