TDM is a short for Tram Data Merger, a simple script for merging .tgf data from a tram vehicle with data from information system.
This script is written in Ruby and uses several gems, that are needed for execution. These gems are listed in Gemfile. Install these gems before using the script (sudo permissions might be needed):
# install bundler
gem install bundler
# use bundler to install gems in Gemfile
bundle installSeveral gem dependencies are required to be installed before usage, see setup before use.
To use the tool, data from information system are need in a specific format, that the helper script is_splitter.rb provides. Run the script in command line (providing you have ruby installed), like so:
ruby lib/is_splitter.rb exampleISFile1.csvThe script will generate separate split IS files for each vehicle in the data/is/ folder. The main.rb script file can be than run in the command line, with .tgf.txt file paths in arguments, like so:
ruby lib/main.rb exampleFile1.tgf.txt foo/exampleFile2.tgf.txtThe program will merge .tgf.txt files from file paths in arguments with IS vehicle files, and write a merged .csv file, with the same name in the specified destination.