gtfs-structures 0.43.0

Read GTFS (public transit timetables) files
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use gtfs_structures::Gtfs;

/// prints some stats about the GTFS given as a cli argument
fn main() {
    let file_path = std::env::args()
        .nth(1)
        .expect("you should put the path of the file to load");

    println!("reading file {}", &file_path);
    let gtfs = Gtfs::new(&file_path);

    match gtfs {
        Ok(g) => {
            g.print_stats();
        }
        Err(e) => eprintln!("error: {e:?}"),
    }
}