Manual:Pywikibot/Global Options

Jump to: navigation, search

Other languages:
العربية • ‎català • ‎Deutsch • ‎Ελληνικά • ‎English • ‎español • ‎français • ‎italiano • ‎日本語 • ‎русский

Global arguments available for all bots

These options will override the configuration in settings.

Name Description Default/config name compat core
-dir:PATH Read the bot's configuration data from directory given by PATH, instead of from the default directory.
-lang:xx Set the language of the wiki you want to work on. xx should be the language code. mylang
-family:xyz Set the family of the wiki you want to work on, e.g. wikipedia, wiktionary, commons, wikitravel, …. family
-user:xyz Log in as user 'xyz' instead of the default username.
-daemonize:xyz Immediately return control to the terminal and redirect stdout and stderr to xyz (only use for bots that require no input from stdin).
-help Show a help text for the invoked script.
-log Enable the logfile. Logs will be stored in the logs subdirectory.
-log:xyz Enable the logfile, using xyz as the filename.
-nolog Disable the logfile (if it's enabled by default).
-maxlag Sets a new maxlag parameter to a number of seconds. Defer bot edits during periods of database server lag. maxlag
Enable the logfile and include extensive debugging data for component "item" (for all components if the second form is used).
Set the minimum time (in seconds) the bot will wait between saving pages. put_throttle
Make the program output more detailed messages than usual to the standard output about its current work, or progress, while it is proceeding. This may be helpful when debugging or dealing with unusual situations. not selected
Toggles the cosmetic_changes setting made in or to its inverse and overrules it. All other settings and restrictions are untouched. not selected
-simulate Disables writing to the server. Useful for testing and debugging of new code (if given, doesn't do any real changes, but only shows what would have been changed).
-<config_var>:n You may use all given numeric config variables as option and modify it with command line.
For instance, the delay config variable can be set using -delay:1 so that the cooldown period would be 1 days (as opposed to the default of 7 days).