Skip to content

Add support for -V option

Finn requested to merge finn02/undertime-archive:enhance/version into master

@anarcat Sorry for delay, can you take a look into this pull request?

Here's, the output of some commands after changes:

$ ./undertime -V
undertime 2.3.2
$ ./undertime -h
usage: undertime [-h] [-s HOUR] [-e HOUR] [-d WHEN] [--no-colors]
                 [--no-default-zone] [--no-unique] [--no-overlap]
                 [--overlap-min N]
                 [-f {fancy_grid,github,grid,html,jira,latex,latex_booktabs,latex_raw,mediawiki,moinmoin,orgtbl,pipe,plain,presto,pretty,psql,rst,simple,textile,tsv,youtrack,fancy_grid_nogap}]
                 [--config CONFIG] [-v] [--debug] [-l] [--selftest] [-V]
                 [timezones [timezones ...]]

pick a meeting time

positional arguments:
  timezones             time zones to show [default: current time zone]

optional arguments:
  -h, --help            show this help message and exit
  -s HOUR, --start HOUR
                        start of working day, in hours [default: 9]
  -e HOUR, --end HOUR   end of working day, in hours [default: 17]
  -d WHEN, --date WHEN  target date for the meeting, for example "in two
                        weeks" [default: now]
  --no-colors, --colors
                        show colors [default: True]
  --no-default-zone, --default-zone
                        show current time zone first [default: True]
  --no-unique, --unique
                        deduplicate time zone offsets [default: True]
  --no-overlap, --overlap
                        show zones overlap in column "n" [default: True]
  --overlap-min N       minimum overlap between zones [default: 0]
  -f {fancy_grid,github,grid,html,jira,latex,latex_booktabs,latex_raw,mediawiki,moinmoin,orgtbl,pipe,plain,presto,pretty,psql,rst,simple,textile,tsv,youtrack,fancy_grid_nogap}, --format {fancy_grid,github,grid,html,jira,latex,latex_booktabs,latex_raw,mediawiki,moinmoin,orgtbl,pipe,plain,presto,pretty,psql,rst,simple,textile,tsv,youtrack,fancy_grid_nogap}
                        output format (fancy_grid_nogap)
  --config CONFIG
  -v, --verbose         enable verbose messages
  --debug               enable debugging messages
  -l, --list-zones      show valid time zones and exit
  --selftest            run test suite and exit
  -V, --version         print version number and exit

Shows all times of day for the given time zones. This can be useful to select
a common meeting time across multiple time zones easily. This takes into
account daylight savings and whatnot, and can schedule meetings in the future.
Default settings are taken from ~/.config/undertime.yml. Dates are parsed with
the dateparser or parsedatetime modules, if available, in that order, see
https://dateparser.readthedocs.io/en/latest/ and
https://github.com/bear/parsedatetime.

and some screenshots of newer man page:

undertime-man-3 undertime-man-1 undertime-man-2

Merge request reports