{"id":24823896,"url":"https://github.com/rust-transit/gtfs-structure","last_synced_at":"2025-12-12T15:33:16.195Z","repository":{"id":31842451,"uuid":"129280178","full_name":"rust-transit/gtfs-structure","owner":"rust-transit","description":"Read a GTFS file","archived":false,"fork":false,"pushed_at":"2025-10-13T12:36:31.000Z","size":413,"stargazers_count":69,"open_issues_count":21,"forks_count":38,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-11-15T02:19:24.906Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rust-transit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2018-04-12T16:24:18.000Z","updated_at":"2025-11-13T03:43:25.000Z","dependencies_parsed_at":"2024-05-14T09:41:30.145Z","dependency_job_id":"1558f239-5382-4219-a72a-a16854de4327","html_url":"https://github.com/rust-transit/gtfs-structure","commit_stats":{"total_commits":251,"total_committers":18,"mean_commits":"13.944444444444445","dds":0.4581673306772909,"last_synced_commit":"25059ba6441fb8ce377fc24214c3b23af4d8f1f0"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rust-transit/gtfs-structure","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-transit%2Fgtfs-structure","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-transit%2Fgtfs-structure/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-transit%2Fgtfs-structure/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-transit%2Fgtfs-structure/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rust-transit","download_url":"https://codeload.github.com/rust-transit/gtfs-structure/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-transit%2Fgtfs-structure/sbom","scorecard":{"id":790648,"data":{"date":"2025-08-11","repo":{"name":"github.com/rust-transit/gtfs-structure","commit":"ec46073a3180dfaa13cefdd1e968fa94d08d319c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.3,"checks":[{"name":"Maintained","score":5,"reason":"5 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/publish.yml:1","Warn: no topLevel permission defined: .github/workflows/tests.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":10,"reason":"all changesets reviewed","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/rust-transit/gtfs-structure/publish.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/rust-transit/gtfs-structure/publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/rust-transit/gtfs-structure/tests.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/rust-transit/gtfs-structure/tests.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/rust-transit/gtfs-structure/tests.yml/main?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T07:26:30.410Z","repository_id":31842451,"created_at":"2025-08-23T07:26:30.410Z","updated_at":"2025-08-23T07:26:30.410Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27685506,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-12T02:00:06.775Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-01-30T20:01:55.741Z","updated_at":"2025-12-12T15:33:16.189Z","avatar_url":"https://github.com/rust-transit.png","language":"Rust","funding_links":[],"categories":["Producing Data","Rust","Recently Updated"],"sub_categories":["GTFS","[Jan 30, 2025](/content/2025/01/30/README.md)"],"readme":"# [GTFS](https://gtfs.org/) Model ![crates.io](https://img.shields.io/crates/v/gtfs-structures.svg) [![](https://docs.rs/gtfs-structures/badge.svg)](https://docs.rs/gtfs-structures)\n\nThe [General Transit Feed Specification](https://gtfs.org/) (GTFS) is a commonly used model to represent public transit data.\n\nThis crates brings [serde](https://serde.rs) structures of this model and helpers to read GTFS archives.\n\n## Using\n\nThis crates has 2 main entry-points.\n\n### Gtfs\nThe most common one is to create a `gtfs_structures::Gtfs`:\n\n```rust\n// Gtfs::new will try to guess if you provide a path, a local zip file or a remote zip file.\n// You can also use Gtfs::from_path or Gtfs::from_url\nlet gtfs = gtfs_structures::Gtfs::new(\"path_of_a_zip_or_directory_or_url\")?;\nprintln!(\"there are {} stops in the gtfs\", gtfs.stops.len());\n\n// This structure is the easiest to use as the collections are `HashMap`,\n// thus you can access an object by its id.\nlet route_1 = gtfs.routes.get(\"1\").expect(\"no route 1\");\nprintln!(\"{}: {:?}\", route_1.short_name, route_1);\n```\n\n### RawGtfs\n\nIf you want a lower level model, you can use `gtfs_structures::RawGtfs`:\n\n```rust\nlet raw_gtfs = RawGtfs::new(\"fixtures/basic\").expect(\"impossible to read gtfs\");\nfor stop in raw_gtfs.stops.expect(\"impossible to read stops.txt\") {\n    println!(\"stop: {}\", stop.name);\n}\n```\n\nInstead of easy to use `HashMap`, each collection is a `Result` with an error if something went wrong during the reading.\n\nThis makes it possible for example for a [GTFS validator](https://github.com/etalab/transport-validator/) to display better error messages.\n\n### Feature 'read-url'\n\nBy default the feature 'read-url' is activated. It makes it possible to read a Gtfs from an url.\n\n```rust\nlet gtfs = gtfs_structures::Gtfs::new(\"http://www.metromobilite.fr/data/Horaires/SEM-GTFS.zip\")?;\n```\n\nOr you can use the explicit constructor:\n```rust\nlet gtfs = gtfs_structures::Gtfs::from_url(\"http://www.metromobilite.fr/data/Horaires/SEM-GTFS.zip\")?;\n```\n\nIf you don't want the dependency to `reqwest`, you can remove this feature.\n\n## Building\n\nYou need an up to date rust tool-chain (commonly installed with [rustup](https://rustup.rs/)).\n\nBuilding is done with:\n\n`cargo build`\n\nYou can also run the unit tests:\n\n`cargo test`\n\nAnd run the examples by giving their names:\n\n`cargo run --example gtfs_reading`\n\n# Alternative\n\nIf you are interested in transit data, you can also use the really nice crate [transit_model](https://github.com/CanalTP/transit_model) that can also handle GTFS data.\n\nThe price to pay is a steeper learning curve (and a documentation that could be improved :roll_eyes:), but this crate provides very nice ergonomics to handle transit data and lots of utilities like data format conversions, datasets merge, ...\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frust-transit%2Fgtfs-structure","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frust-transit%2Fgtfs-structure","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frust-transit%2Fgtfs-structure/lists"}