手册:Pywikibot/全域选项

From MediaWiki.org
Jump to navigation Jump to search
This page is a translated version of the page Manual:Pywikibot/Global Options and the translation is 59% complete.

Other languages:
Deutsch • ‎English • ‎català • ‎español • ‎français • ‎italiano • ‎polski • ‎čeština • ‎Ελληνικά • ‎русский • ‎العربية • ‎中文 • ‎日本語 • ‎한국어

Global arguments available for all bots

这些选项将覆盖user-config.py 设置中的配置。

全域选项
参数描述配置变量
-dir:路径 从路径给出的目录中读取bot的配置数据,而不是从默认目录中读取。  
-lang:xx 设置要使用的wiki的语言,覆盖user-config.py中的配置。xx应该是语言代码。 mylang
-family:xyz 设置你想要工作的wiki的系列,例如维基百科,维基词典,维基导游,...... 这将覆盖user-config.py中的配置。 family
-user:xyz 以用户'xyz'而不是默认用户名登录。 usernames
-daemonize:xyz Immediately return control to the terminal and redirect stdout and stderr to file xyz. (only use for bots that require no input from stdin).  
-help 显示帮助文本。  
-log Enable the log file, using the default filename 'script_name-bot.log' Logs will be stored in the logs subdirectory. log
-log:xyz 启用'xyz'作为文件名的日志文件。 logfilename
-nolog 禁用日志文件(如果默认启用)。  
-maxlag Sets a new maxlag parameter to a number of seconds. Defer bot edits during periods of database server lag. Default is set by config.py maxlag
-putthrottle:n
-pt:n
-put_throttle:n
Set the minimum time (in seconds) the bot will wait between saving pages. put_throttle
-debug:item
-debug
Enable the log file and include extensive debugging data for component "item" (for all components if the second form is used). debug_log
-verbose
-v
Have the bot provide additional console output that may be useful in debugging. verbose_output
-cosmeticchanges
-cc
Toggles the cosmetic_changes setting made in config.py or user-config.py to its inverse and overrules it. All other settings and restrictions are untouched. cosmetic_changes
-simulate 禁用对服务器的写入。 Useful for testing and debugging of new code (if given, doesn't do any real changes, but only shows what would have been changed). simulate
-<config var>:n 您可以使用所有给定的数字配置变量作为选项,并使用命令行进行修改。