diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d4b4ec5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +# Contents generated by the Python script. +/public_data diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d164396 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM python:3-slim + +WORKDIR /app + +COPY requirements.txt . + +RUN pip install --no-cache-dir -r requirements.txt + +COPY ./parse_gtfs.py . + +CMD ["python", "parse_gtfs.py"] diff --git a/README.md b/README.md new file mode 100644 index 0000000..dae17f1 --- /dev/null +++ b/README.md @@ -0,0 +1,38 @@ +# GTFS GTT Checker + +## Usage with Docker Compose + +You can execute the one-shot command with: + +``` +docker compose up +``` + +Look into the `public_data/` directory. It should contain these files: + +``` +$ tree public_data + +public_data/ +├── agency.txt.gz +├── calendar_dates.txt.gz +├── calendar.txt.gz +├── fare_attributes.txt.gz +├── fare_rules.txt.gz +├── feed_info.txt.gz +├── routes.txt.gz +├── shapes.txt.gz +├── stop_attributes.txt.gz +├── stops.txt.gz +├── stop_times.txt.gz +├── timetable_pages.txt.gz +├── timetable_stop_order.txt.gz +├── timetables.txt.gz +├── trips_booking.txt.gz +├── trips.txt.gz +├── vehicle_categories.txt.gz +├── vehicles.txt.gz +└── versions.json +``` + +The suggestion is to add the `docker compose up` in a crontab, every some minutes. diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..2171ec4 --- /dev/null +++ b/compose.yaml @@ -0,0 +1,6 @@ +services: + gtfs-parser: + build: . + command: python parse_gtfs.py + volumes: + - ./public_data:/app/public_data diff --git a/public_data/versions.json b/public_data/versions.json deleted file mode 100644 index 8105e91..0000000 --- a/public_data/versions.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "agency.txt": { - "hash": "81a082be1ae1417e66e90112e41070ab", - "last_modified": "2026-05-25T13:14:41+00:00", - "version_int": 0 - }, - "calendar.txt": { - "hash": "d9dd433a4ce48c2c45eac61c5730f9c6", - "last_modified": "2026-08-29T04:19:36+00:00", - "version_int": 45 - }, - "calendar_dates.txt": { - "hash": "13c12eb40ff548ac7a6173fb6979aa08", - "last_modified": "2026-08-29T04:19:36+00:00", - "version_int": 45 - }, - "fare_attributes.txt": { - "hash": "e205ad05d08e9ec7577543a6e63a3baf", - "last_modified": "2026-05-25T13:14:41+00:00", - "version_int": 0 - }, - "fare_rules.txt": { - "hash": "18d8f39bf420f026db5830dcba6643af", - "last_modified": "2026-05-25T13:14:41+00:00", - "version_int": 0 - }, - "feed_info.txt": { - "hash": "9cda9d84598e4b2e65e95514abd606ee", - "last_modified": "2026-08-29T04:19:36+00:00", - "version_int": 44 - }, - "routes.txt": { - "hash": "3ac24b68f5c23a2302f3d55721a566af", - "last_modified": "2026-08-29T04:19:36+00:00", - "version_int": 12 - }, - "shapes.txt": { - "hash": "dd6ee5715f302bee074792641d7de172", - "last_modified": "2026-08-29T04:19:36+00:00", - "version_int": 44 - }, - "stops.txt": { - "hash": "5711a150162443fe2cb8ae077aa9b1f4", - "last_modified": "2026-08-29T04:19:36+00:00", - "version_int": 32 - }, - "stop_attributes.txt": { - "hash": "3f96d2ff730355e2263fcf2517340eae", - "last_modified": "2026-08-02T01:14:31+00:00", - "version_int": 6 - }, - "stop_times.txt": { - "hash": "ef3ef312f242cd9591db7b5576dcc49a", - "last_modified": "2026-08-29T04:19:36+00:00", - "version_int": 45 - }, - "timetables.txt": { - "hash": "d5182fa62e3265d5698592f50b321051", - "last_modified": "2026-08-29T04:19:39+00:00", - "version_int": 44 - }, - "timetable_pages.txt": { - "hash": "e8dbeb29a644315a2a9fd67d9b6c3438", - "last_modified": "2026-08-29T04:19:39+00:00", - "version_int": 11 - }, - "timetable_stop_order.txt": { - "hash": "18b2adb0e0fb52d8d5f774ee6bbcfcac", - "last_modified": "2026-08-20T23:58:20+00:00", - "version_int": 5 - }, - "trips.txt": { - "hash": "6fc1aad76db7f7e295a1f846ab701658", - "last_modified": "2026-08-29T04:19:39+00:00", - "version_int": 43 - }, - "trips_booking.txt": { - "hash": "ae84f0680d75f61200e9066cd2758fb9", - "last_modified": "2026-05-25T13:14:44+00:00", - "version_int": 0 - }, - "vehicles.txt": { - "hash": "aec9f9aa6d66908aa438e7d36a17d98b", - "last_modified": "2026-08-29T04:19:39+00:00", - "version_int": 21 - }, - "vehicle_categories.txt": { - "hash": "d90ab450e388cf22ca40a8ed450909d5", - "last_modified": "2026-07-05T01:23:37+00:00", - "version_int": 2 - } -} \ No newline at end of file