3.7. covid19_update_readme

This CLI is designed for use by an external service to update the top-level README.rst with the latest COVID-19 cumulative cases and deaths for one of the top-N MSAs. It uses data encoded in covid19_topN_LATEST.json, whether located in an external website or in a local directory, generated by covid19_movie_updates, and applies it to the template README_template.rst, to generate README.rst.

Its help output, when running covid19_movie_updates -h, is the following,

usage: covid19_update_readme [-h] [-m MAINURL] [-d DIRNAME] [-j JSON] [--noverify]

optional arguments:
  -h, --help            show this help message and exit
  -m MAINURL, --mainurl MAINURL
                        Name of the URL where the COVID-19 summary data lives. Default is https://tanimislam.github.io/covid19movies.
  -d DIRNAME, --dirname DIRNAME
                        Directory in which the README.rst lives, for the covid19_stats repository. Default is /g/g12/islam5/.local/src/covid19_stats/docsrc/source/cli.
  -j JSON, --json JSON  Optional argument. If defined give the JSON file that contains the summary COVID-19 cases and deaths information of the top N MSAs.
  --noverify            If chosen, then do not verify necessary SSL connections.

Here are the flags and their meanings,

  • -m or --mainurl specifies the website into which the COVID-19 movie and figure updates live. Its (hard-coded) default is https://tanimislam.sfo3.digitaloceanspaces.com/covid19movies.

  • -d or --dirname specifies the top-level location of the covid19_stats repository, in which README.rst lives. The default is the current working directory.

    Note

    This will generate a README.rst in any directory. However, if README.rst does not exist there, it will create a new file.

  • --noverify means to optionally not verify SSL connections, for example if one is in a restricted environment. The default is to verify SSL connections.

  • -j or --json optionally specifies the filename for covid19_topN_LATEST.json; if it is specified, then use summary data in this file instead of from the external website. I developed this functionality because the web server updates were often too slow.