Extension:Proofread Page/zh
Proofread Page 发行状态: 稳定版 |
|
---|---|
实现 | 页面操作 , ContentHandler , 标签 , API , 数据库 |
描述 | The Proofread Page extension can render a book either as a column of OCR text beside a column of scanned images, or broken into its logical organization (such as chapters or poems) using transclusion. |
作者 | ThomasV (original author) Tpt (current maintainer) |
最新版本 | continuous updates |
兼容性政策 | 快照跟随MediaWiki发布。 master分支不向后兼容。 |
MediaWiki | current master |
PHP | 7.0+ |
数据库更改 | 是 |
Composer | mediawiki/proofread-page |
表 | pr_index |
许可协议 | GNU通用公眾授權條款2.0或更新版本 |
下載 | |
帮助 | Help:Extension:ProofreadPage |
示例 | s:Index:Wind in the Willows (1913).djvu |
Page, Index |
|
|
|
|
|
|
|
前往translatewiki.net翻譯Proofread Page扩展 | |
問題 | 开启的任务 · 报告错误 |
The Proofread Page extension creates a book either:
- as a column of OCR text beside a column of scanned images, or
- broken into chapters or poems. The content of a document appears in the MediaWiki page (via transclusion).
这个扩展用于让对比文本和数字化原件更简单。
This extension shows the text in several ways without actually duplicating the original text.[1]
使用
此擴充功能安裝於所有維基文庫wiki。 有关语法,请参阅维基文库Proofread Page帮助文档。 之前也在维基别库上使用。
需求和建議
- Access to the command line is required if running the update script (maintenance/update.php) from the web browser fails (see Upgrade documentation and Update.php documentation).
- If you want to use DjVu files (optional but recommended), a native DjVu handler needs to be available for configuration.
參見Manual:How to use DjVu with MediaWiki 。
- In addition, use of ProofreadPage is highly improved by the use of the following extensions:
- LabeledSectionTransclusion (強烈建議)
- 引述 (default page footer contains
<references />
- Poem
- PdfHandler (可能需要额外的PHP包) — 增加PDF支持
- PagedTiffHandler
- 解析器函數
- TemplateStyles (Enables Index-specific CSS)
- Scribunto (Enables the proofreading Lua library)
安裝
扩展
- 下载文件,并将解压后的
ProofreadPage
文件夹移动到extensions/
目录中。
开发者和代码贡献人员应从Git安装扩展,输入:cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/ProofreadPage - 将下列代码放置在您的LocalSettings.php 的底部:
wfLoadExtension( 'ProofreadPage' );
- 运行更新脚本,它将自动创建此扩展必须依赖的数据库表。
- 完成 – 在您的wiki上导航至Special:Version,以验证已成功安装扩展。
產生縮圖
The extension links directly to image thumbnails which often don't exist. You must catch 404 errors and generate the missing thumbnails. You can do this with any one of these solutions:
- Set an Apache RewriteRule in .htaccess to thumb.php for missing thumbnails:
RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^/w/images/thumb/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/page([0-9]+)-?([0-9]+)px-.*$ /w/thumb.php?f=$1&p=$2&w=$3 [L,QSA]
- or set the Apache 404 handler to Wikimedia's thumb-handler.
This is a general-purpose 404 handler with Wikimedia-specific code, not simply a thumbnail generator.
ErrorDocument 404 /w/extensions/upload-scripts/404.php
- For MediaWiki >= 1.20, you can simply redirect to thumb_handler.php:
RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^/w/images/thumb/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/page([0-9]+)-?([0-9]+)px-.*$ /w/thumb_handler.php [L,QSA]
- 或在apache2.conf中:
ErrorDocument 404 /w/thumb_handler.php
If you encounter a problem similar to the following:
- phab:T301291 – PDF and DjVu files on Commons failed to be processed (no thumbnails, zero pages) but otherwise valid
- phab:T298417 – Undeleted DjVu files show incorrect metadata: 0x0 size, no page number info
- phab:T299521 – PDF file has 0x0 image size in Commons after uploading a new version while the page number is correct
尝试以下步骤:
- repair thumbnails for DjVu files of the core MediaWiki (for PDF use mimetype
application/pdf
)php maintenance/refreshImageMetadata.php --verbose --mime image/vnd.djvu --force
- needed for actualization info about the pages counts of the
Special:IndexPages
php maintenance/refreshLinks.php --namespace 252
命名空間
ProofreadPage create by default two custom namespaces named "Page" and "Index" in English with respectively ids 250 and 252.
Their names are translated if your wiki use another language. 完整列表.
You can customize their name or their ID: Create namespaces by hand and set their IDs in Manual:LocalSettings.php using $wgProofreadPageNamespaceIds global. You will do something like:
define( 'NS_PROOFREAD_PAGE', 250);
define( 'NS_PROOFREAD_PAGE_TALK', 251);
define( 'NS_PROOFREAD_INDEX', 252);
define( 'NS_PROOFREAD_INDEX_TALK', 253);
$wgExtraNamespaces[NS_PROOFREAD_PAGE] = 'Page';
$wgExtraNamespaces[NS_PROOFREAD_PAGE_TALK] = 'Page_talk';
$wgExtraNamespaces[NS_PROOFREAD_INDEX] = 'Index';
$wgExtraNamespaces[NS_PROOFREAD_INDEX_TALK] = 'Index_talk';
$wgProofreadPageNamespaceIds = array(
'index' => NS_PROOFREAD_INDEX,
'page' => NS_PROOFREAD_PAGE
);
Namespace id customization is not recommended and might not be supported in the future.
配置
- In order to use the page quality system, it is necessary to create five categories.
The names of these categories must be defined in MediaWiki:Proofreadpage_quality0_category to MediaWiki:Proofreadpage_quality4_category.
- Ensure that you have installed Extension:解析器函數
Configuration of index namespace
有关详细信息,请参阅Extension:Proofread Page/Index data configuration
- You need to create MediaWiki:Proofreadpage_index_template in order to display index pages.
This page is a template that receive as parameter entries of the edition form.
- You need to create MediaWiki:Proofreadpage_index_data_config.json that contain the configuration of the index form.
This new configuration page overrides MediaWiki:Proofreadpage_index_attributes and MediaWiki:Proofreadpage_js_attributes.
The configuration is a JSON array of properties. Here is the structure of a property in the array, all the parameters are optional, the default value are set:
{
"ID": { //id of the metadata (first parameter of proofreadpage_index_attributes)
"type": "string", //the property type (for compatibility reasons the values have not to be of this type). Possibles values: string, number, page. If set, the newly set values should be valid according to the type (e.g. for a number a valid number, for a page an existing wiki page...)
"size": 1, //only for the type string : number of lines of the input (third parameter of proofreadpage_index_attributes)
"values": {"a":"A", "b":"B","c":"C", "d":"D"}, //an array values : label that list the possible values (for compatibility reasons the stored values have not to be one of these)
"default": "", //the default value
"header": false, //add the property to MediaWiki:Proofreadpage_header_template template (true is equivalent to being listed in proofreadpage_js_attributes)
"label": "ID", //the label in the form (second parameter of proofreadpage_index_attributes)
"help": "", //a short help text
"delimiter": [], //list of delimiters between two part of values. By example ["; ", " and "] for strings like "J. M. Dent; E. P. Dutton and A. D. Robert"
"data": "" //proofreadpage's metadata type that the property is equivalent to
}
}
The data parameter can have for value:
"type", "language", "title", "author", "translator", "illustrator", "editor", "school", "year", "publisher", "place", "progress"
Page separator
The extension puts a separator between every transcluded page and the next, which is defined by wgProofreadPagePageSeparator
.
The default value is  
(a whitespace).
Set wgProofreadPagePageSeparator = ""
to suppress the separator.
Join hyphenated words across pages
When a word is hyphenated between a page and the next, the extension joins together the two halves of the word.
Example: his- and tory becomes history.
The "joiner" character is defined by wgProofreadPagePageJoiner
and defaults to '-' (the ASCII hyphen character).
Configure change tagging (optional)
See Change tagging to set up change tags.
用法
Creating your first page (example with DjVu)
- Before following these steps ensure you have followed the instructions in Manual:How to use DjVu with MediaWiki .
- (when and in which namespace is the DjVu file itself uploaded?)
- Create a page in the "Page" namespace (or the internationalized name if you use an not-English wiki).
For example if your namespace is 'Page' create Page:Carroll - Alice's Adventures in Wonderland.djvu
- Create the corresponding file for this page commons:File:Carroll - Alice's Adventures in Wonderland.djvu (or set 手册:$wgUseInstantCommons to
true
).
- Create the index page
Index:Carroll - Alice's Adventures in Wonderland.djvu
- Insert the tag
<pagelist />
in the Pages field to visualize the page list
- Insert the tag
- To edit page 5 of the book navigate to 'Page:Carroll - Alice's Adventures in Wonderland/5' and click edit
語法
此扩展引入了以下标记:
<pages>
, <pagelist>
注释
- ↑ Because the pages are not in the main namespace, they are not included in the statistical count of text units.
參見
- Sections
- Index data configuration
- Change tagging
- Lua library reference
- Page viewer
- Edit-in-Sequence — A new system (as of 2022) for proofreading without having to reload the entire page.
- Roadmap of the development
- API
- Metadata API — The
proofread
meta submodule - Proofread properties API — Proofreading-related properties of individual pages
- Index data API — Access index pages data (fields and categories)
- Index pagination API — List pages in a given index
- Metadata API — The
- Manual:How to use DjVu with MediaWiki
- PdfHandler — 为Proofread页面添加PDF支持
- 目前的完整描述和说明(英文)可在以下网址找到: s:Help:Proofread
- 使用统计信息可以在这里找到: https://phetools.toolforge.org/statistics.php
- ToDo and feature request list from the Community
- 正在撰写公有领域用户手册: Help:Extension:ProofreadPage
- MediaWiki:OCR.js - OCR脚本
此扩展用于一个或多个维基媒体项目。 这可能意味着扩展足够稳定、运作足够良好,可以用在这样的高流量的网站上。 请在维基媒体的CommonSettings.php和InitialiseSettings.php配置文件中查找此扩展的名称以查看哪些网站安装了该扩展。 特定wiki上的已安装的扩展的完整列表位于Special:Version页面。 |
此扩展在以下wiki农场/托管网站和/或软件包中提供: 這不是一份權威名單。 即使某些wiki农场/托管网站和/或软件包未在这里列出,它们也可能提供此扩展。 请检查你的wiki农场/托管网站或软件包以确认提供情况。 |
- Stable extensions/zh
- Page action extensions/zh
- ContentHandler extensions/zh
- Tag extensions/zh
- API extensions/zh
- Database extensions/zh
- Extensions supporting Composer/zh
- GPL licensed extensions/zh
- Extensions in Wikimedia version control/zh
- Extensions which add rights/zh
- BeforePageDisplay extensions/zh
- CanonicalNamespaces extensions/zh
- ChangeTagsListActive extensions/zh
- ContentHandlerDefaultModelFor extensions/zh
- EditFormPreloadText extensions/zh
- GetBetaFeaturePreferences extensions/zh
- GetDoubleUnderscoreIDs extensions/zh
- GetLinkColours extensions/zh
- GetPreferences extensions/zh
- ImageOpenShowImageInlineBefore extensions/zh
- InfoAction extensions/zh
- ListDefinedTags extensions/zh
- LoadExtensionSchemaUpdates extensions/zh
- MultiContentSave extensions/zh
- OutputPageParserOutput extensions/zh
- ParserFirstCallInit extensions/zh
- RecentChange save extensions/zh
- ScribuntoExternalLibraries extensions/zh
- ScribuntoExternalLibraryPaths extensions/zh
- SetupAfterCache extensions/zh
- SkinTemplateNavigation::Universal extensions/zh
- WgQueryPages extensions/zh
- All extensions/zh
- Extensions used on Wikimedia/zh
- Extensions included in Miraheze/zh
- Extensions included in WikiForge/zh
- Extension:ProofreadPage/zh
- View page extensions/zh
- Image extensions/zh
- Transcription extensions/zh