From 7ae87629bf5e7ec32ee17ed04298df45afef8757 Mon Sep 17 00:00:00 2001 From: Martinez Date: Wed, 18 May 2016 13:17:56 +0200 Subject: [PATCH] --help view displays a list of Main features and if they're used by the app (close #12) --- over/app.py | 14 ++++++++++---- over/version.py | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/over/app.py b/over/app.py index 50c922f..7f0cd8c 100644 --- a/over/app.py +++ b/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(" %s<.>-%s<.> licensed under the %s<.>" %(self.name, self.version, self.license)) print(" using over-%s" %(version.str)) + # Main features + print("") + print("[over.app.Main features<.>]") + for feature_name in self.features: + print(" %s: %s<.> (%s)" %(" ON<.>" if self.features[feature_name] else "OFF<.>", feature_name, self.default_features[feature_name][1])) + # App docs print("") for chapter, paragraphs in (alternate_docs or self.docs).items(): diff --git a/over/version.py b/over/version.py index 12b2768..b2f1dee 100644 --- a/over/version.py +++ b/over/version.py @@ -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))