moinsetup

Changeset

22:fed4e7bc8248
2010-07-01 Paul Boddie raw files shortlog changelog graph Added help text for the supported methods.
moinsetup.py (file)
     1.1 --- a/moinsetup.py	Sat Jun 26 20:34:54 2010 +0200
     1.2 +++ b/moinsetup.py	Thu Jul 01 00:15:27 2010 +0200
     1.3 @@ -69,6 +69,11 @@
     1.4  note = status
     1.5  error = status
     1.6  
     1.7 +def format(s, indent):
     1.8 +    return re.sub("\n\s+", "\n" + " " * indent, s)
     1.9 +
    1.10 +# Classes.
    1.11 +
    1.12  class Configuration:
    1.13  
    1.14      "A class representing the configuration."
    1.15 @@ -158,6 +163,27 @@
    1.16  
    1.17      "A class for installing and initialising MoinMoin."
    1.18  
    1.19 +    method_names = (
    1.20 +        "setup",
    1.21 +        "setup_wiki",
    1.22 +        "install_moin",
    1.23 +        "install_data",
    1.24 +        "configure_moin",
    1.25 +        "edit_moin_script",
    1.26 +        "edit_moin_web_script",
    1.27 +        "add_superuser",
    1.28 +        "make_site_files",
    1.29 +        "make_post_install_script",
    1.30 +        "reconfigure_moin",
    1.31 +        "install_theme",
    1.32 +        "install_extension_package",
    1.33 +        "install_plugins",
    1.34 +        "install_actions",
    1.35 +        "install_macros",
    1.36 +        "install_theme_resources",
    1.37 +        "edit_theme_stylesheet"
    1.38 +        )
    1.39 +
    1.40      # NOTE: Need to detect Web server user.
    1.41  
    1.42      web_user = "www-data"
    1.43 @@ -840,6 +866,13 @@
    1.44          print
    1.45          print "Arguments:"
    1.46          print Installation.__init__.__doc__
    1.47 +        print
    1.48 +        print "Methods:"
    1.49 +        print
    1.50 +        for method_name in Installation.method_names:
    1.51 +            doc = getattr(Installation, method_name).__doc__.strip()
    1.52 +            print "%-30s%-s" % (method_name, format(doc, 30))
    1.53 +        print
    1.54          sys.exit(1)
    1.55  
    1.56      # Obtain and perform the method.