# HG changeset patch # User Paul Boddie # Date 1277936127 -7200 # Node ID fed4e7bc824818bce5d503bdf29ef2ef4ca77fb0 # Parent 0a00875173bfd5576bedb3237d5c5facaef78b3f Added help text for the supported methods. diff -r 0a00875173bf -r fed4e7bc8248 moinsetup.py --- a/moinsetup.py Sat Jun 26 20:34:54 2010 +0200 +++ b/moinsetup.py Thu Jul 01 00:15:27 2010 +0200 @@ -69,6 +69,11 @@ note = status error = status +def format(s, indent): + return re.sub("\n\s+", "\n" + " " * indent, s) + +# Classes. + class Configuration: "A class representing the configuration." @@ -158,6 +163,27 @@ "A class for installing and initialising MoinMoin." + method_names = ( + "setup", + "setup_wiki", + "install_moin", + "install_data", + "configure_moin", + "edit_moin_script", + "edit_moin_web_script", + "add_superuser", + "make_site_files", + "make_post_install_script", + "reconfigure_moin", + "install_theme", + "install_extension_package", + "install_plugins", + "install_actions", + "install_macros", + "install_theme_resources", + "edit_theme_stylesheet" + ) + # NOTE: Need to detect Web server user. web_user = "www-data" @@ -840,6 +866,13 @@ print print "Arguments:" print Installation.__init__.__doc__ + print + print "Methods:" + print + for method_name in Installation.method_names: + doc = getattr(Installation, method_name).__doc__.strip() + print "%-30s%-s" % (method_name, format(doc, 30)) + print sys.exit(1) # Obtain and perform the method.