Skip to content

This is a plugin (tool) for the Cheshire Cat project, allowing the Cat to retireve real time transit data in GTFS format.

License

Notifications You must be signed in to change notification settings

marcocagnoli/cheshire-cat-gtfs-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 

Repository files navigation

What is this?

This is a plugin (tool) for the Cheshire Cat Project, allowing the Cat to retrieve real time transit data from a GTFS feed. You can ask the cat waiting times for buses arriving to a specific bus stop.

Install

Download the gtfs folder into the cheshire-cat/core/cat/plugins one.

Add python-dateutil==2.8.2 to cheshire-cat/core/requirements.txt and then run command

docker-compose build --no-cache

Configuration

To retrieve information, the plugin use the Transit Land API. Transit Land collects GTFS feeds worldwide, so you can configure the cat to give transit information - potentially - from every city in the world. Actually you can configure only one city at time. In order to use the plugin, you will need:

  • A Transit Land API key (a free plan is available).
  • A Onestop ID, a unique ID for a GTFS feed (ideally, a feed should cover a city or a region). Use their search engine to find out the right Onestop ID for you. Please, note that several feeds will not contain real time data, in such a situation the cat will provide only scheduled timetables.
  • Set the appropriate GTFS feed timezone to obtain reliable information.

Write these two values into the gtfs-config.py file.

Theorically, tha cat should be able to make appropriate questions to auto configure itself but at the momento this process doesn't work as expected.

Usage

Ask the cat something like "I'm at bus stop 74637, can you tell me next buses arrivals?". For example, in Rome, following values are valid stop codes:

  • 74637
  • 70100
  • 72962

Output

The cat will answer with a list of buses qrriving to the bus stop. For each bus, he will give you the following information:

  • Route name
  • Company managing the service
  • Direction
  • Estimated (when real time data available) arriving date and time. If no real time data available, scheduled information are provided.
  • Waiting time in minutes (estimated or scheduled).

About

This is a plugin (tool) for the Cheshire Cat project, allowing the Cat to retireve real time transit data in GTFS format.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages