Пример #1
0
    def __init__(self, argv, def_values):
        MoinScript.__init__(self, argv, def_values)

        self.parser.add_option(
            "-u", "--user", dest="homepage_creator",
            help="User as whom the homepage creation operation will be performed as."
            )

        self.parser.add_option(
            "-t", "--template_page", dest="template_page",
            help="The template page which should be used for the homepage creation"
            )

        self.parser.add_option(
            "-n", "--name", dest="user_homepage",
            help="The name of the user the homepage should be created for."
            )

        self.parser.add_option(
            "-g", "--group", dest="name_of_group_page",
            help="The name of the group page to select users for creating their homepages."
            )

        self.parser.add_option(
            "-a", "--all-users", dest="all_users", action="store_true",
            help="The name of the group page to select users for creating their homepages."
            )
 def __init__(self, argv, def_values):
     MoinScript.__init__(self, argv, def_values)
     self.parser.add_option(
         "--py-append", metavar="FILENAME", dest="py_append_file",
         help="Append python code with editlog user ids."
     )
     self.parser.add_option(
         "--py-exec", metavar="FILENAME", dest="py_exec_file",
         help="Execute python code to read editlog user ids."
     )
     self.parser.add_option(
         "--show", dest="show", action="store_true",
         help="Show all inactive users."
     )
     self.parser.add_option(
         "--disable", dest="disable", action="store_true",
         help="Disable all inactive users."
     )
     self.parser.add_option(
         "--remove", dest="remove", action="store_true",
         help="Remove all inactive users."
     )
     self.parser.add_option(
         "--interactive", dest="interactive", action="store_true",
         help="Show data and ask before deleting/disabling users."
     )
Пример #3
0
 def __init__(self, argv, def_values):
     MoinScript.__init__(self, argv, def_values)
     self.parser.add_option(
         "--py-append",
         metavar="FILENAME",
         dest="py_append_file",
         help="Append python code with editlog user ids.")
     self.parser.add_option(
         "--py-exec",
         metavar="FILENAME",
         dest="py_exec_file",
         help="Execute python code to read editlog user ids.")
     self.parser.add_option("--show",
                            dest="show",
                            action="store_true",
                            help="Show all inactive users.")
     self.parser.add_option("--disable",
                            dest="disable",
                            action="store_true",
                            help="Disable all inactive users.")
     self.parser.add_option("--remove",
                            dest="remove",
                            action="store_true",
                            help="Remove all inactive users.")
     self.parser.add_option(
         "--interactive",
         dest="interactive",
         action="store_true",
         help="Show data and ask before deleting/disabling users.")
Пример #4
0
 def __init__(self, argv, def_values):
     MoinScript.__init__(self, argv, def_values)
     self.parser.add_option(
         "-k",
         "--key",
         dest="key",
         action="store",
         type='string',
         help="The key you want to set/change in the new revision")
     self.parser.add_option(
         "-v",
         "--value",
         dest="value",
         action="store",
         type='string',
         help="The system page version you would like to create.")
     self.parser.add_option(
         "-r",
         "--remove",
         dest="remove",
         action="store_true",
         default=False,
         help="If you want to delete the key given, add this flag.")
     self.parser.add_option(
         "-p",
         "--pattern",
         dest="pattern",
         action="store",
         type='string',
         default=".*",
         help=
         "Only perform the operation on items whose names match the pattern."
     )
Пример #5
0
 def __init__(self, argv, def_values):
     MoinScript.__init__(self, argv, def_values)
     self.parser.add_option(
         "--all",
         action="store_true",
         dest="all_wikis",
         help="when given, update all wikis that belong to this farm")
Пример #6
0
 def __init__(self, argv, def_values):
     MoinScript.__init__(self, argv, def_values)
     self.parser.add_option(
         "--url", dest="url", default="",
         help="Specify the location of the events RSS feed"
     )
     self.parser.add_option(
         "--template", dest="template", default="EventTemplate",
         help="Specify the template used to make the event pages"
     )
     self.parser.add_option(
         "--categories", dest="categories", default="CategoryEvents",
         help="Specify the categories to which the event pages will belong"
     )
     self.parser.add_option(
         "--author", dest="author", default="EventImporter",
         help="Specify the author of the event pages"
     )
     self.parser.add_option(
         "--parent", dest="parent", default="",
         help="Specify the parent page of the event pages"
     )
     self.parser.add_option(
         "--overwrite", dest="overwrite", action="store_true",
         help="Request that existing pages be overwritten"
     )
     self.parser.add_option(
         "--delete", dest="delete", action="store_true",
         help="Request that event pages associated with the feed be deleted"
     )
Пример #7
0
    def __init__(self, argv, def_values):
        MoinScript.__init__(self, argv, def_values)

        self.parser.add_option(
            "-u", "--user", dest="homepage_creator",
            help="User as whom the homepage creation operation will be performed as."
            )

        self.parser.add_option(
            "-t", "--template_page", dest="template_page",
            help="The template page which should be used for the homepage creation"
            )

        self.parser.add_option(
            "-n", "--name", dest="user_homepage",
            help="The name of the user the homepage should be created for."
            )

        self.parser.add_option(
            "-g", "--group", dest="name_of_group_page",
            help="The name of the group page to select users for creating their homepages."
            )

        self.parser.add_option(
            "-a", "--all-users", dest="all_users", action="store_true",
            help="The name of the group page to select users for creating their homepages."
            )
Пример #8
0
 def __init__(self, argv, def_values):
     MoinScript.__init__(self, argv, def_values)
     self._addFlag("usersunique",
         "Makes user names unique (by appending the ID to"
         " name and email, disabling subscribed pages and"
         " disabling all, but the latest saved user account);"
         " default is to SHOW what will be happening, you"
         " need to give the --save option to really do it."
     )
     self._addFlag("emailsunique",
         "Makes user emails unique;"
         " default is to show, use --save to save it."
     )
     self._addFlag("wikinames",
         "Convert user account names to wikinames (camel-case)."
     )
     self._addFlag("lastsaved",
         "Normally the account most recently USED will"
         " survive and the others will be disabled."
         " Using --lastsaved, the account most recently"
         " SAVED will survive."
     )
     self._addFlag("save",
         "If specified as LAST option, will allow the other"
         " options to save user accounts back to disk."
         " If not specified, no settings will be changed permanently."
     )
     self._addFlag("removepasswords",
         "Remove pre-1.1 cleartext passwords from accounts."
     )
Пример #9
0
 def __init__(self, argv, def_values):
     MoinScript.__init__(self, argv, def_values)
     self.parser.add_option("--uid",
                            metavar="UID",
                            dest="uid",
                            help="Disable the user with user id UID.")
     self.parser.add_option("--name",
                            metavar="NAME",
                            dest="uname",
                            help="Disable the user with user name NAME.")
Пример #10
0
 def __init__(self, argv, def_values):
     MoinScript.__init__(self, argv, def_values)
     self.parser.add_option("-f",
                            "--from-address",
                            dest="from_address",
                            help="use as from: for email.")
     self.parser.add_option("-s",
                            "--subject",
                            dest="subject",
                            help="use as subject: for email.")
Пример #11
0
 def __init__(self, argv, def_values):
     MoinScript.__init__(self, argv, def_values)
     self.parser.add_option(
         "--uid", metavar="UID", dest="uid",
         help="Disable the user with user id UID."
     )
     self.parser.add_option(
         "--name", metavar="NAME", dest="uname",
         help="Disable the user with user name NAME."
     )
Пример #12
0
 def __init__(self, argv, def_values):
     MoinScript.__init__(self, argv, def_values)
     self.parser.add_option(
         "--files", metavar="FILES", dest="file_list",
         help="filename of file list, e.g. files.lst (one file per line)"
     )
     self.parser.add_option(
         "--mode", metavar="MODE", dest="mode",
         help="either add (unconditionally add to index), update (update an existing index) or rebuild (remove and add)"
     )
Пример #13
0
 def __init__(self, argv, def_values):
     MoinScript.__init__(self, argv, def_values)
     self.parser.add_option(
         "-f", "--from-address", dest="from_address",
         help="use as from: for email."
     )
     self.parser.add_option(
         "-s", "--subject", dest="subject",
         help="use as subject: for email."
     )
Пример #14
0
 def __init__(self, argv, def_values):
     MoinScript.__init__(self, argv, def_values)
     self.parser.add_option(
         "--files", metavar="FILES", dest="file_list",
         help="filename of file list, e.g. files.lst (one file per line)"
     )
     self.parser.add_option(
         "--mode", metavar="MODE", dest="mode",
         help="either add (unconditionally add), update (conditional update), rebuild (complete 1-stage index rebuild)"
              " or buildnewindex and usenewindex (complete 2-stage index rebuild)"
     )
Пример #15
0
 def __init__(self, argv, def_values):
     MoinScript.__init__(self, argv, def_values)
     self.parser.add_option(
         "--files", metavar="FILES", dest="file_list",
         help="filename of file list, e.g. files.lst (one file per line)"
     )
     self.parser.add_option(
         "--mode", metavar="MODE", dest="mode",
         help="either add (unconditionally add), update (conditional update), rebuild (complete 1-stage index rebuild)"
              " or buildnewindex and usenewindex (complete 2-stage index rebuild)"
     )
Пример #16
0
 def __init__(self, argv, def_values):
     MoinScript.__init__(self, argv, def_values)
     self.parser.add_option(
         "--author", dest="author", default="IrcLogImporter",
         help="Use AUTHOR for edit history / RecentChanges"
     )
     self.parser.add_option(
         "--file-dir", dest="file_dir", default='.',
         help="read files from DIRECTORY"
     )
     self.parser.add_option("--acl", dest="acl", default="", help="Set a specific ACL for the pages.")
Пример #17
0
    def __init__(self, argv, def_values):
        MoinScript.__init__(self, argv, def_values)

        self.parser.add_option(
            "--name", metavar="NAME", dest="username",
            help="remove sessions only for user NAME (default: all users)"
        )
        self.parser.add_option(
            "--all", action="store_true", dest="all_sessions",
            help="remove all sessions (default: remove outdated sessions)"
        )
Пример #18
0
 def __init__(self, argv, def_values):
     MoinScript.__init__(self, argv, def_values)
     self.parser.add_option(
         "-p",
         "--pattern",
         dest="pattern",
         action="store",
         type='string',
         default=".*",
         help=
         "You can limit the operation on certain items whose names match the given pattern."
     )
Пример #19
0
 def __init__(self, argv, def_values):
     MoinScript.__init__(self, argv, def_values)
     self.parser.add_option("--uid", metavar="UID", dest="uid", help="Reset password for the user with user id UID.")
     self.parser.add_option(
         "--name", metavar="NAME", dest="uname", help="Reset password for the user with user name NAME."
     )
     self.parser.add_option(
         "-a", "--all-users", dest="all_users", action="store_true", help="Reset password for ALL users."
     )
     self.parser.add_option(
         "--notify",
         dest="notify",
         action="store_true",
         help="Notify user(s), send them an E-Mail with a password reset link.",
     )
     self.parser.add_option(
         "--subject",
         metavar="SUBJECT",
         dest="subject",
         help="Subject text for the password reset notification E-Mail.",
     )
     self.parser.add_option(
         "--text-intro",
         metavar="TEXT_INTRO",
         dest="text_intro",
         help="Intro text for the password reset notification E-Mail. Default: empty.",
     )
     self.parser.add_option(
         "--text-msg",
         metavar="TEXT_MSG",
         dest="text_msg",
         help="Main text for the password reset notification E-Mail. Default: use the builtin standard message",
     )
     self.parser.add_option(
         "--text-data",
         metavar="TEXT_DATA",
         dest="text_data",
         help="Data template text for the password reset notification E-Mail. Default: use the builtin standard data template",
     )
     self.parser.add_option(
         "--text-from-file",
         metavar="TEXT_DATA",
         dest="text_file",
         help="Read full template for the password reset notification E-Mail from the given file, overrides --text-intro/msg/data. Default: None",
     )
     self.parser.add_option(
         "--skip-invalid",
         dest="skip_invalid",
         action="store_true",
         help="If a user's password hash is already invalid (pw is already reset), skip this user.",
     )
     self.parser.add_option("-v", "--verbose", dest="verbose", action="store_true", help="Verbose operation.")
Пример #20
0
 def __init__(self, argv, def_values):
     MoinScript.__init__(self, argv, def_values)
     self.parser.add_option(
         "-v",
         "--verbose",
         dest="verbose",
         action="store_true",
         help="Provide progress information while performing the migration")
     self.parser.add_option("-f",
                            "--fails",
                            dest="show_failed",
                            action="store_true",
                            help="Print failed migration items")
Пример #21
0
    def __init__(self, argv, def_values):
        MoinScript.__init__(self, argv, def_values)

        self.parser.add_option(
            "--name",
            metavar="NAME",
            dest="username",
            help="remove sessions only for user NAME (default: all users)")
        self.parser.add_option(
            "--all",
            action="store_true",
            dest="all_sessions",
            help="remove all sessions (default: remove outdated sessions)")
Пример #22
0
 def __init__(self, argv, def_values):
     MoinScript.__init__(self, argv, def_values)
     self.parser.add_option(
         "--files", metavar="FILES", dest="file_list",
         help="filename of file list, e.g. files.lst (one file per line)"
     )
     self.parser.add_option(
         "--mode", metavar="MODE", dest="mode",
         help="either add (unconditionally add), update (conditional update), rebuild (complete 1-stage index rebuild)"
              " or buildnewindex and usenewindex (complete 2-stage index rebuild)"
     )
     self.parser.add_option(
         "--count", metavar="COUNT", dest="count",
         help="for queued indexing only: how many queue entries to process in this indexing run"
     )
Пример #23
0
 def __init__(self, argv, def_values):
     MoinScript.__init__(self, argv, def_values)
     self.parser.add_option(
         "--files", metavar="FILES", dest="file_list",
         help="filename of file list, e.g. files.lst (one file per line)"
     )
     self.parser.add_option(
         "--mode", metavar="MODE", dest="mode",
         help="either add (unconditionally add), update (conditional update), rebuild (complete 1-stage index rebuild)"
              " or buildnewindex and usenewindex (complete 2-stage index rebuild)"
     )
     self.parser.add_option(
         "--count", metavar="COUNT", dest="count",
         help="for queued indexing only: how many queue entries to process in this indexing run"
     )
Пример #24
0
 def __init__(self, argv, def_values):
     MoinScript.__init__(self, argv, def_values)
     self.parser.add_option('--acl', dest='acl', default='', metavar='ACL',
             help='Set a specific ACL for the wiki page')
     self.parser.add_option('--author', dest='author', metavar='AUTHOR',
             default='PageImporter',
             help='Use AUTHOR for edit history / RecentChanges')
     self.parser.add_option('--comment', dest='comment', metavar='COMMENT',
             default='', help='COMMENT for edit history / RecentChanges')
     self.parser.add_option('--file', dest='file', default='',
             metavar='FILE', help='Read the wiki page from the given file')
     self.parser.add_option('--no-backup', dest='revision_backup',
             default=True, action='store_false',
             help="Suppress making a page backup per revision")
     self._update_option_help('--page',
             'Name of the wiki page which should be imported')
Пример #25
0
 def __init__(self, argv, def_values):
     MoinScript.__init__(self, argv, def_values)
     self.parser.add_option(
         "--author",
         dest="author",
         default="IrcLogImporter",
         help="Use AUTHOR for edit history / RecentChanges")
     self.parser.add_option("--file-dir",
                            dest="file_dir",
                            default='.',
                            help="read files from DIRECTORY")
     self.parser.add_option("--acl",
                            dest="acl",
                            default="",
                            help="Set a specific ACL for the pages.")
     self._update_option_help(
         "--page", "page name prefix for the irc logs to be imported")
Пример #26
0
 def __init__(self, argv, def_values):
     MoinScript.__init__(self, argv, def_values)
     self.parser.add_option(
         "--docs",
         dest="docs",
         help=
         "Set the documents directory. Default: use builtin MoinMoin/web/static/htdocs"
     )
     self.parser.add_option(
         "--user",
         dest="user",
         help="Set the user to change to. UNIX only. Default: Don't change")
     self.parser.add_option(
         "--group",
         dest="group",
         help="Set the group to change to. UNIX only. Default: Don't change"
     )
     self.parser.add_option("--port",
                            dest="port",
                            type="int",
                            help="Set the port to listen on. Default: 8080")
     self.parser.add_option(
         "--hostname",
         "--interface",
         dest="hostname",
         help=
         "Set the ip/hostname to listen on. Use \"\" for all interfaces. Default: localhost"
     )
     self.parser.add_option("--start",
                            dest="start",
                            action="store_true",
                            help="Start server in background.")
     self.parser.add_option("--stop",
                            dest="stop",
                            action="store_true",
                            help="Stop server in background.")
     self.parser.add_option(
         "--pidfile",
         dest="pidfile",
         help="Set file to store pid of moin daemon in. Default: moin.pid")
     self.parser.add_option(
         "--debug",
         dest="debug",
         help=
         "Debug mode of server. off: no debugging (default), web: for browser based debugging, external: for using an external debugger."
     )
Пример #27
0
 def __init__(self, argv, def_values):
     MoinScript.__init__(self, argv, def_values)
     self.parser.add_option(
         "--uid", metavar="UID", dest="uid",
         help="Reset password for the user with user id UID."
     )
     self.parser.add_option(
         "--name", metavar="NAME", dest="uname",
         help="Reset password for the user with user name NAME."
     )
     self.parser.add_option(
         "-a", "--all-users", dest="all_users", action="store_true",
         help="Reset password for ALL users."
     )
     self.parser.add_option(
         "--notify", dest="notify", action="store_true",
         help="Notify user(s), send them an E-Mail with a password reset link."
     )
     self.parser.add_option(
         "--subject", metavar="SUBJECT", dest="subject",
         help="Subject text for the password reset notification E-Mail."
     )
     self.parser.add_option(
         "--text-intro", metavar="TEXT_INTRO", dest="text_intro",
         help="Intro text for the password reset notification E-Mail. Default: empty."
     )
     self.parser.add_option(
         "--text-msg", metavar="TEXT_MSG", dest="text_msg",
         help="Main text for the password reset notification E-Mail. Default: use the builtin standard message"
     )
     self.parser.add_option(
         "--text-data", metavar="TEXT_DATA", dest="text_data",
         help="Data template text for the password reset notification E-Mail. Default: use the builtin standard data template"
     )
     self.parser.add_option(
         "--text-from-file", metavar="TEXT_DATA", dest="text_file",
         help="Read full template for the password reset notification E-Mail from the given file, overrides --text-intro/msg/data. Default: None"
     )
     self.parser.add_option(
         "--skip-invalid", dest="skip_invalid", action="store_true",
         help="If a user's password hash is already invalid (pw is already reset), skip this user."
     )
     self.parser.add_option(
         "-v", "--verbose", dest="verbose", action="store_true",
         help="Verbose operation."
     )
Пример #28
0
 def __init__(self, argv, def_values):
     MoinScript.__init__(self, argv, def_values)
     self.parser.add_option(
         "--docs", dest="docs",
         help="Set the documents directory. Default: wiki/htdocs or /usr/share/moin/htdocs"
     )
     self.parser.add_option(
         "--user", dest="user",
         help="Set the user to change to. UNIX only. Default: Don't change"
     )
     self.parser.add_option(
         "--group", dest="group",
         help="Set the group to change to. UNIX only. Default: Don't change"
     )
     self.parser.add_option(
         "--port", dest="port", type="int",
         help="Set the port to listen on. Default: 8080"
     )
     self.parser.add_option(
         "--interface", dest="interface",
         help="Set the ip to listen on. Use \"\" for all interfaces. Default: localhost"
     )
     self.parser.add_option(
         "--serverClass", dest="serverClass",
         help="Set the server model to use. Choices: ThreadPool, serverClass, Forking, Simple. Default: ThreadPool"
     )
     self.parser.add_option(
         "--threadLimit", dest="threadLimit", type="int",
         help="Set the maximum number of threads to use. Default: 10"
     )
     self.parser.add_option(
         "--requestQueueSize", dest="requestQueueSize", type="int",
         help="Set the size of the request queue. Default: 50"
     )
     self.parser.add_option(
         "--start", dest="start", action="store_true",
         help="Start server in background."
     )
     self.parser.add_option(
         "--stop", dest="stop", action="store_true",
         help="Stop server in background."
     )
     self.parser.add_option(
         "--pidfile", dest="pidfile",
         help="Set file to store pid of moin daemon in. Default: moin.pid"
     )
Пример #29
0
 def __init__(self, argv, def_values):
     MoinScript.__init__(self, argv, def_values)
     self.parser.add_option(
         "--name", metavar="NAME", dest="uname",
         help="Set the wiki user name to NAME."
     )
     self.parser.add_option(
         "--alias", metavar="ALIAS", dest="ualiasname",
         help="Set the wiki user alias name to ALIAS (e.g. the real name if NAME is cryptic)."
     )
     self.parser.add_option(
         "--email", metavar="EMAIL", dest="email",
         help="Set the user's email address to EMAIL."
     )
     self.parser.add_option(
         "--password", metavar="PASSWORD", dest="password",
         help="Set the user's password to PASSWORD."
     )
Пример #30
0
 def __init__(self, argv, def_values):
     MoinScript.__init__(self, argv, def_values)
     self.parser.add_option("--name",
                            metavar="NAME",
                            dest="uname",
                            help="Set the wiki user name to NAME.")
     self.parser.add_option(
         "--alias",
         metavar="ALIAS",
         dest="ualiasname",
         help=
         "Set the wiki user alias name to ALIAS (e.g. the real name if NAME is cryptic)."
     )
     self.parser.add_option("--email",
                            metavar="EMAIL",
                            dest="email",
                            help="Set the user's email address to EMAIL.")
     self.parser.add_option("--password",
                            metavar="PASSWORD",
                            dest="password",
                            help="Set the user's password to PASSWORD.")
Пример #31
0
 def __init__(self, argv, def_values):
     MoinScript.__init__(self, argv, def_values)
     self.parser.add_option(
         "--docs", dest="docs",
         help="Set the documents directory. Default: use builtin MoinMoin/web/static/htdocs"
     )
     self.parser.add_option(
         "--user", dest="user",
         help="Set the user to change to. UNIX only. Default: Don't change"
     )
     self.parser.add_option(
         "--group", dest="group",
         help="Set the group to change to. UNIX only. Default: Don't change"
     )
     self.parser.add_option(
         "--port", dest="port", type="int",
         help="Set the port to listen on. Default: 8080"
     )
     self.parser.add_option(
         "--hostname", "--interface", dest="hostname",
         help="Set the ip/hostname to listen on. Use \"\" for all interfaces. Default: localhost"
     )
     self.parser.add_option(
         "--start", dest="start", action="store_true",
         help="Start server in background."
     )
     self.parser.add_option(
         "--stop", dest="stop", action="store_true",
         help="Stop server in background."
     )
     self.parser.add_option(
         "--pidfile", dest="pidfile",
         help="Set file to store pid of moin daemon in. Default: moin.pid"
     )
     self.parser.add_option(
         "--debug", dest="debug",
         help="Debug mode of server. off: no debugging (default), web: for browser based debugging, external: for using an external debugger."
     )
Пример #32
0
def execute(xmlrpcobj, their_secret, argv):
    request = xmlrpcobj.request
    their_secret = xmlrpcobj._instr(their_secret)

    our_secret = request.cfg.secrets['xmlrpc/RemoteScript']

    if our_secret != their_secret:
        return u"Invalid password"

    try:
        logging.info("RemoteScript argv: %r" % argv)
        MoinScript(argv).run(showtime=0)
    except Exception, err:
        logging.exception('An exception occurred.')
        return xmlrpcobj._outstr(str(err))
Пример #33
0
 def __init__(self, argv, def_values):
     MoinScript.__init__(self, argv, def_values)
     self._addFlag("usersunique",
         "Makes user names unique (by appending the ID to"
         " name and email, disabling subscribed pages and"
         " disabling all, but the latest saved user account);"
         " default is to SHOW what will be happening, you"
         " need to give the --save option to really do it."
     )
     self._addFlag("emailsunique",
         "Makes user emails unique;"
         " default is to show, use --save to save it."
     )
     self._addFlag("wikinames",
         "Convert user account names to wikinames (camel-case)."
     )
     self._addFlag("save",
         "If specified as LAST option, will allow the other"
         " options to save user accounts back to disk."
         " If not specified, no settings will be changed permanently."
     )
     self._addFlag("removepasswords",
         "Remove pre-1.1 cleartext passwords from accounts."
     )
Пример #34
0
 def __init__(self, argv, def_values):
     MoinScript.__init__(self, argv, def_values)
     self.parser.add_option("-t",
                            "--target-dir",
                            dest="target_dir",
                            help="Write reduced wiki data to DIRECTORY.")
Пример #35
0
 def __init__(self, argv, def_values):
     MoinScript.__init__(self, argv, def_values)
     self.parser.add_option(
         "-s",
         "--save",
         dest="save",
         action="store_true",
         help="Save (serialize) storage contents to a xml file.")
     self.parser.add_option(
         "-l",
         "--load",
         dest="load",
         action="store_true",
         help="Load (unserialize) storage contents from a xml file.")
     self.parser.add_option(
         "-f",
         "--file",
         dest="xml_file",
         action="store",
         type="string",
         help="Filename of xml file to use [Default: use stdin/stdout].")
     self.parser.add_option(
         "--nrevs",
         dest="nrevs",
         action="store",
         type="int",
         default=0,
         help=
         "Serialize only the last n revisions of each item [Default: all everything]."
     )
     self.parser.add_option(
         "--exceptnrevs",
         dest="exceptnrevs",
         action="store",
         type="int",
         default=0,
         help=
         "Serialize everything except the last n revisions of each item [Default: everything]."
     )
     self.parser.add_option(
         "--ndays",
         dest="ndays",
         action="store",
         type="int",
         default=0,
         help=
         "Serialize only the last n days of each item [Default: everything]."
     )
     self.parser.add_option(
         "--exceptndays",
         dest="exceptndays",
         action="store",
         type="int",
         default=0,
         help=
         "Serialize everything except the last n days of each item [Default: everything]."
     )
     self.parser.add_option(
         "--nhours",
         dest="nhours",
         action="store",
         type="int",
         default=0,
         help=
         "Serialize only the last n hours of each item [Default: everything]."
     )
     self.parser.add_option(
         "--exceptnhours",
         dest="exceptnhours",
         action="store",
         type="int",
         default=0,
         help=
         "Serialize everything except the last n hours of each item [Default: everything]."
     )
Пример #36
0
 def __init__(self, argv, def_values):
     MoinScript.__init__(self, argv, def_values)
Пример #37
0
"""

import sys, os

# a) Configuration of Python's code search path
#    If you already have set up the PYTHONPATH environment variable for the
#    stuff you see below, you don't need to do a1) and a2).

# a1) Path of the directory where the MoinMoin code package is located.
#     Needed if you installed with --prefix=PREFIX or you didn't use setup.py.
#sys.path.insert(0, 'PREFIX/lib/python2.4/site-packages')

# a2) Path of the directory where wikiconfig.py / farmconfig.py is located.
moinpath = os.path.abspath(os.path.normpath(os.path.dirname(sys.argv[0])))
sys.path.insert(0, moinpath)
os.chdir(moinpath)

# b) Configuration of moin's logging
#    If you have set up MOINLOGGINGCONF environment variable, you don't need this!
#    You also don't need this if you are happy with the builtin defaults.
#    See wiki/config/logging/... for some sample config files.
from MoinMoin import log
log.load_config('wikiserverlogging.conf')

from MoinMoin.script import MoinScript

if __name__ == '__main__':
    sys.argv = ["moin.py", "server", "standalone"]
    MoinScript().run()

Пример #38
0
 def __init__(self, argv, def_values):
     MoinScript.__init__(self, argv, def_values)
 def __init__(self, argv, def_values):
     MoinScript.__init__(self, argv, def_values)
     self.parser.add_option(
         "-t", "--target-dir", dest="target_dir",
         help="Write reduced wiki data to DIRECTORY."
     )
Пример #40
0
 def __init__(self, argv=None, def_values=None):
     MoinScript.__init__(self, argv, def_values)
Пример #41
0
def run():
    from MoinMoin.script import MoinScript
    MoinScript().run(showtime=0)
Пример #42
0
 def __init__(self, argv, def_values):
     MoinScript.__init__(self, argv, def_values)
     self.parser.add_option(
         "--all", action="store_true", dest="all_wikis",
         help="when given, update all wikis that belong to this farm"
     )