The gtfs database contains the information on which "pattern" stops at every stop.
Then, it should be possible to know the direction of a line. However, one cannot know the exact pattern (except when the arrivals come from Mato, perhaps).
It should be possible to open the detail of a line with the correct direction.