Skip to content

davidjrice/atco

Repository files navigation

ATCO-CIF

ATCO-CIF is the format of choice for UK public transport authorities. This is a ruby library that reads .cif files and gives you JSON back.

USAGE

Currently this library is under-development and has several things left to do before it is perfect (see the TODO.md list ).

  • clone this library git clone [email protected]:davidjrice/atco.git
  • or install the gem gem install atco
  • start an irb session (with the helper console command) bin/console

Code example, for more detailed internal api usage see the spec files.

require "rubygems"
require "atco"

result = Atco.parse("filename.cif")
result = Atco.parse("data/SVRTMAO009A-20091005.cif")

=> {
  header: {}, # Atco::Header
  locations: [], # Atco::Location
  journeys: {
    "journey_identifier": {} # Atco::Journey
  },
  unparsed: [
    {line: "unparsed line", line_number:1234}
  ]
}

Author & Contributors

The ATCO-CIF Ruby library was originally authored by David Rice @davidjrice in response to an FOI request to Translink for there timetable data as part of an OpenDataNI initiative.

See CONTRIBUTORS.md

About

ATCO-CIF to JSON parser/converter

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages