From f8dd1a42125d43cfa6eac7aa1682b1faa278adab Mon Sep 17 00:00:00 2001 From: lilydjwg Date: Thu, 1 Jul 2021 19:38:17 +0800 Subject: [PATCH] docs: add an inline sample config also fix the code block display --- docs/usage.rst | 28 ++++++++++++++++++++-------- nvchecker/api.py | 2 +- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/docs/usage.rst b/docs/usage.rst index 1125428..7b1f362 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -44,7 +44,19 @@ To see available options:: Run with one or more software version files:: - nvchecker -c config_file + nvchecker -c config_file.toml + +A simple config file may look like: + +.. code-block:: toml + + [nvchecker] + source = "github" + github = "lilydjwg/nvchecker" + + [python-toml] + source = "pypi" + pypi = "toml" You normally will like to specify some "version record files"; see below. @@ -110,7 +122,7 @@ Configuration Files ------------------- The software version source files are in `toml`_ format. The *key name* is the name of the software. Following fields are used to tell nvchecker how to determine the current version of that software. -See ``sample_source.toml`` for an example. +See `sample_source.toml `_ for an example. Configuration Table ~~~~~~~~~~~~~~~~~~~ @@ -142,12 +154,12 @@ keyfile Sample ``keyfile.toml``: - ```toml - [keys] - # https://github.com/settings/tokens - # scope: repo -> public_repo - github = "ghp_" - ``` + .. code-block:: toml + + [keys] + # https://github.com/settings/tokens + # scope: repo -> public_repo + github = "ghp_" Global Options ~~~~~~~~~~~~~~ diff --git a/nvchecker/api.py b/nvchecker/api.py index cd9b991..ee008a1 100644 --- a/nvchecker/api.py +++ b/nvchecker/api.py @@ -8,4 +8,4 @@ from .util import ( ) from .sortversion import sort_version_keys -from .ctxvars import tries, proxy, user_agent, httptoken, entry_waiter +from .ctxvars import tries, proxy, user_agent, httptoken, entry_waiter, verify_cert