X-Git-Url: https://projects.mako.cc/source/mw/blobdiff_plain/91a75d581414a615069575e7c7f1dbcfacf00560..c0e09dfbc9ca43f6753a26664b33b64905c81748:/src/mw/clicommands.py diff --git a/src/mw/clicommands.py b/src/mw/clicommands.py index a0fb016..de08cb6 100644 --- a/src/mw/clicommands.py +++ b/src/mw/clicommands.py @@ -174,11 +174,16 @@ class DiffCommand(CommandBase): class CommitCommand(CommandBase): def __init__(self): - CommandBase.__init__(self, 'commit', 'commit changes to wiki') + usage = '[FILES]' + CommandBase.__init__(self, 'commit', 'commit changes to wiki', usage) self.shortcuts.append('ci') self.parser.add_option('-m', '--message', dest='edit_summary', help='don\'t prompt for edit summary and ' 'use this instead') + self.parser.add_option('--bot', dest='bot', action='store_true', + help='mark actions as a bot (won\'t affect ' + 'anything if you don\'t have the bot right', + default=False) def _do_command(self): self._die_if_no_init() @@ -230,6 +235,8 @@ class CommitCommand(CommandBase): 'md5': textmd5, 'summary': edit_summary, } + if self.options.bot: + data['bot'] = 'bot' response = self.api.call(data) if response['edit']['result'] == 'Success': data = {