--help view displays a list of Main features and if they're used by the app (close #12)
This commit is contained in:
parent
d690632ca2
commit
7ae87629bf
2 changed files with 11 additions and 5 deletions
14
over/app.py
14
over/app.py
|
@ -383,9 +383,9 @@ class ConfigFile:
|
|||
|
||||
class Main:
|
||||
default_features = {
|
||||
"config_file": False,
|
||||
"auto_add_help": True,
|
||||
"handle_exceptions": True
|
||||
"config_file": (False, "Maintains and uses a config file in the XDG config directory (usually ~/config/appname)."),
|
||||
"auto_add_help": (True, "Generates the program's help and state view."),
|
||||
"handle_exceptions": (True, "Displays human-readable stack traces when unhandled exceptions are raised.")
|
||||
}
|
||||
|
||||
"""
|
||||
|
@ -417,7 +417,7 @@ class Main:
|
|||
if feature_name in features:
|
||||
self.features[feature_name] = features[feature_name]
|
||||
else:
|
||||
self.features[feature_name] = self.default_features[feature_name]
|
||||
self.features[feature_name] = self.default_features[feature_name][0]
|
||||
|
||||
for feature_name in features:
|
||||
if feature_name not in self.default_features:
|
||||
|
@ -529,6 +529,12 @@ class Main:
|
|||
print(" <W>%s<.>-<c>%s<.> licensed under the <W>%s<.>" %(self.name, self.version, self.license))
|
||||
print(" using over-%s" %(version.str))
|
||||
|
||||
# Main features
|
||||
print("")
|
||||
print("[<W>over.app.Main features<.>]")
|
||||
for feature_name in self.features:
|
||||
print(" %s: <B>%s<.> (%s)" %(" <G>ON<.>" if self.features[feature_name] else "<R>OFF<.>", feature_name, self.default_features[feature_name][1]))
|
||||
|
||||
# App docs
|
||||
print("")
|
||||
for chapter, paragraphs in (alternate_docs or self.docs).items():
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
major = 1 # VERSION_MAJOR_IDENTIFIER
|
||||
minor = 99 # VERSION_MINOR_IDENTIFIER
|
||||
# VERSION_LAST_MM 1.99
|
||||
patch = 4 # VERSION_PATCH_IDENTIFIER
|
||||
patch = 5 # VERSION_PATCH_IDENTIFIER
|
||||
str = ".".join(str(v) for v in (major, minor, patch))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue