From 7de36af3c6ffcc25832a6ff2303ba6c4c1101de5 Mon Sep 17 00:00:00 2001 From: stuebinm Date: Sun, 4 Dec 2022 22:03:43 +0100 Subject: a couple more features (filtering, read from file & pipe) --- Readme.md | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) (limited to 'Readme.md') diff --git a/Readme.md b/Readme.md index a34e921..f754362 100644 --- a/Readme.md +++ b/Readme.md @@ -3,33 +3,36 @@ 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 188 crates, it might be suspected that it gives a *slightly* over-engineered +At 197 crates, it might be suspected that it gives a *slightly* over-engineered answer. ~~~ -Usage: showrt [OPTIONS] +Usage: showrt [OPTIONS] [URL_OR_FILE] Arguments: - uri of the GTFS RT feed to fetch & display + [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 - -i, --ignore-nonfatal ignore things that look wrong as long as possible - --no-colors don't do terminal colours - -h, --help Print help information - -V, --version Print version information + --json emit the feed as json + -f, --filter-trip 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: - - fetch feeds from some url - - display feeds in protobuf pseudo-format, optionally with fancy colours - - dump the entire feed as json to process it with `jq` & friends + - 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: - - open local files (why do people even have these?) - - play nice with (input-)pipes - - optionally convert all dates into something more human-friendly than seconds - since the unix epoch + - disable colours in case of pipes - optionally collapse translations that contain only one language in the output -- cgit v1.2.3