--- a/maxious-canberra-transit-feed/extracttimes.rb +++ b/maxious-canberra-transit-feed/extracttimes.rb @@ -7,7 +7,7 @@ timetable = {"stop_times" => [], "between_stops" => [], "short_name" => short_name} time_points = table.xpath('tr[1]//th').map do |tp| if tp.content != "\302\240" && tp.content != "" && tp.content != "
" - timing_point = tp.content.squeeze(" ").gsub("\r\n Platform"," - Platform").strip + timing_point = tp.content.squeeze(" ").gsub("\r\n Platform"," - Platform").gsub(" - "," - ").gsub("\n","").strip end end time_points.delete(nil) @@ -16,7 +16,7 @@ periodtimes = [] table.css('tr').each do |row| times = row.css('td').map do |cell| - #TODO convert to GTFS time + #TODO convert to GTFS time ie. replace " AM" with a time = cell.content.squeeze(" ").strip end if not times.empty?