added a list of colors to ---help
This commit is contained in:
parent
b967fc12fb
commit
8996bb9d04
1 changed files with 12 additions and 0 deletions
12
over/docs.py
12
over/docs.py
|
@ -2,6 +2,7 @@
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
|
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
from .text import ansi_colors
|
||||||
|
|
||||||
over_docs = OrderedDict()
|
over_docs = OrderedDict()
|
||||||
over_docs["What"] = ["<G>over<.> is a Python 3 library that attempts to provide essential and convenient application functionality. Configuration, command line parsing, text handling and output, a non-interactive help system, human-readable exception processing, subprocess execution and many more are available."]
|
over_docs["What"] = ["<G>over<.> is a Python 3 library that attempts to provide essential and convenient application functionality. Configuration, command line parsing, text handling and output, a non-interactive help system, human-readable exception processing, subprocess execution and many more are available."]
|
||||||
|
@ -18,6 +19,17 @@ over_docs["Options"] = [
|
||||||
over_docs["Configuration sources"] = ["Each option can take its state either from (in order) the application default value, the config file, or the command line. Combining multiple sources (e.g. extending values in the config file with the command line) is not permitted - a new source always resets the option's state. It is possible for an option to have no value."]
|
over_docs["Configuration sources"] = ["Each option can take its state either from (in order) the application default value, the config file, or the command line. Combining multiple sources (e.g. extending values in the config file with the command line) is not permitted - a new source always resets the option's state. It is possible for an option to have no value."]
|
||||||
over_docs["Config File"] = ["If enabled by the application, a config file will be generated when first executed. The config file will be populated with all known options, their descriptions and some instructions on how to proceed. If a newer version of the application that offers more configurable options is executed, the config file will be automatically updated."]
|
over_docs["Config File"] = ["If enabled by the application, a config file will be generated when first executed. The config file will be populated with all known options, their descriptions and some instructions on how to proceed. If a newer version of the application that offers more configurable options is executed, the config file will be automatically updated."]
|
||||||
|
|
||||||
|
colors = []
|
||||||
|
|
||||||
|
for code, (_, name) in ansi_colors.items():
|
||||||
|
c = "<C><<%s><.>: <%s>%s<.>" %(code, code, name)
|
||||||
|
|
||||||
|
if code == "k":
|
||||||
|
c += ' (this one says "black")'
|
||||||
|
|
||||||
|
colors.append(c)
|
||||||
|
|
||||||
|
over_docs["Available Colors"] = colors
|
||||||
|
|
||||||
config_file_header = """# Configuration file for %s-%s
|
config_file_header = """# Configuration file for %s-%s
|
||||||
# Generated by over-%s
|
# Generated by over-%s
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue