Manual:Pywikibot/djvutext.py/zh

djvutext.py extracts the ocr text from a djvu page image and uploads it to the corresponding page in the page namespace on Wikisource. In order for the bot to function, a djvu file must be in the same folder pywikipediabot runs from and it must be identical to the djvu used for the index file on Wikisource.

On a blank page this script will leave a blank page and set the pagequality level=0 (without text) and the user= to the name of your bot (e.g. ).

参数
支持以下参数：


 * 在上传每个页面之前要求确认. （默认：覆盖页面时询问）
 * 在上传每个页面之前要求确认. （默认：覆盖页面时询问）


 * 本地djvu文件的文件名（即在您的PWB文件夹中）
 * 本地djvu文件的文件名（即在您的PWB文件夹中）


 * Wikisource上索引页面的名称
 * Wikisource上索引页面的名称


 * Page range to upload;  is optional (e.g. "-pages:1-"), and  is optional if end is stated
 * Page range to upload;  is optional (e.g. "-pages:1-"), and  is optional if end is stated

All other parameters will be regarded as part of the title of a single page, and the bot will only work on that single page.

Core only parameters

 * -summary:... : custom edit summary. Use quotes if edit summary contains spaces.
 * -force : overwrites existing text; optional, default False
 * -always : don't ask to confirm any of the changes