summaryrefslogtreecommitdiff
path: root/Readme.md
blob: f754362348bd88d711584ffabc95288245d04353 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# human-readable gtfs realtime feeds

a tool to answer to the question "how to check that the gtfs realtime feed says
what it's supposed to if for some unfortunate reason you can't read binary?".

At 197 crates, it might be suspected that it gives a *slightly* over-engineered
answer.

~~~
Usage: showrt [OPTIONS] [URL_OR_FILE]

Arguments:
  [URL_OR_FILE]  Either a file or an URI containing the gtfs realtime feed.
                 Omit this to read from stdin instead

Options:
      --json                   emit the feed as json
  -f, --filter-trip <TRIP_ID>  filter for FeedEntities affecting the given trip id
  -i, --ignore-content-type    ignore the Content-Type header (default is to 
                               abort if it's not application/octet-string)
      --no-colors              don't do terminal colours in output
  -h, --help                   Print help information
  -V, --version                Print version information
~~~

### Features:
 - read feeds from an url, a file, or from stdin
 - display feeds in fancy colours (or without them) and with timestamps in a
   more human-readable format than seconds since the unix epoch
 - dump the entire feed as json
 - be useful with pipes, e.g. fetch with `curl` or process with `jq`
 - filter for a specific trip (works well with `watch` to observe a single trip)
 - error messages with entirely too many arrows in them

### Still Todo:
 - disable colours in case of pipes
 - optionally collapse translations that contain only one language in the output