Beispiel #1
0
def doc(directive=None, list=None):
    """
    Show Format and all options for a runestone directive
    """
    if list:
        print("Runestone Directives List")
        print("  ", "\n   ".join(sorted(cmap.keys())))
        return

    if directive:
        directive = directive[0]
        if directive in cmap:
            print(cmap[directive].__doc__)
        else:
            print("""Unknown Directive.  Possible values are""")
            print("  ", "\n   ".join(sorted(cmap.keys())))
def doc(directive=None,list=None):
    """
    Show Format and all options for a runestone directive
    """
    if list:
        print("Runestone Directives List")
        print("  ", "\n   ".join(sorted(cmap.keys())))
        return

    if directive:
        directive = directive[0]
        if directive in cmap:
            print(cmap[directive].__doc__)
        else:
            print("""Unknown Directive.  Possible values are""")
            print("  ", "\n   ".join(sorted(cmap.keys())))
def help(command=None):
    if not command:
        print("""Available Commands:
build  [--all]   * build the current project
deploy           * deploy the current proejct using rsync
serve [--port]   * start a simple webserver for the current project
help             * list all runestone directives
update           * Get a new copy of the _templates folder

or type help <directive> for doc on a runestone directive""")
    else:
        command = command[0]
        if command in cmap:
            print(cmap[command].__doc__)
        elif command == 'list':
            print("Runestone Directives List")
            print("  ", "\n   ".join(sorted(cmap.keys())))
        else:
            print("""Unknown Directive.  Possible values are""")
            print("  ", "\n   ".join(sorted(cmap.keys())))
def help(command=None):
    if not command:
        print("""Available Commands:
build  [--all]   * build the current project
deploy           * deploy the current proejct using rsync
serve [--port]   * start a simple webserver for the current project
help             * list all runestone directives
update           * Get a new copy of the _templates folder

or type help <directive> for doc on a runestone directive""")
    else:
        command = command[0]
        if command in cmap:
            print(cmap[command].__doc__)
        elif command == 'list':
            print("Runestone Directives List")
            print("  ", "\n   ".join(sorted(cmap.keys())))
        else:
            print("""Unknown Directive.  Possible values are""")
            print("  ", "\n   ".join(sorted(cmap.keys())))