Erweiterung:Proofread Page

From mediawiki.org
Jump to navigation Jump to search
This page is a translated version of the page Extension:Proofread Page and the translation is 6% complete.
Other languages:
Deutsch • ‎English • ‎Türkçe • ‎español • ‎français • ‎čeština • ‎नेपाली • ‎中文 • ‎日本語
MediaWiki-Erweiterungen
OOjs UI icon advanced.svg
Proofread Page
Freigabestatus: stabil
Proofread Page editor.png
Einbindung Seitenaktivität , ContentHandler , Tag , API , Datenbank
Beschreibung 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.
Autor(en) ThomasV (original author)
Tpt (current maintainer)
Letzte Version continuous updates
Kompatibilitätspolitik Snapshots releases along with MediaWiki. Master is not backwards compatible.
MediaWiki current master
PHP 7.0+
MediaWiki 1.36 Not formally tested
MediaWiki 1.34 Not formally tested
MediaWiki 1.32 Not formally tested
Datenbankänderungen Ja
Tabellen pr_index
Lizenz GNU General Public License 2.0 oder neuer
Herunterladen
Beispiel s:Index:Wind in the Willows (1913).djvu
Page, Index
  • $wgProofreadPagePageJoiner
  • $wgProofreadPagePageSeparator
  • $wgProofreadPageNamespaceIds
  • $wgProofreadPagePageSeparatorPlaceholder
  • pagequality
  • pagequality-admin
Übersetze die Proofread Page-Erweiterung, wenn sie auf translatewiki.net verfügbar ist

Prüfe die Benutzungs- und Versionsmatrix.

Probleme Offene Aufgaben · Einen Fehler melden
Coolest Tool Award 2020 square logo.svg

Proofread Page extension

2020 Coolest Tool
Award Winner

in the category
Impact


Die Erweiterung Proofread Page erzeugt ein Buch entweder als

  1. Textspalte mit OCR-Texterkennung neben einer Spalte mit gescannten Bildern oder
  2. getrennt in Kapiteln bzw. Gedichten. Der Inhalt eines Dokuments erscheint in der MediaWiki-Seite (über Transklusion).

Die Erweiterung soll einen einfachen Vergleich des Textes mit der Digitalisierung des Originals ermöglichen.

Diese Erweiterung zeigt den Text auf verschiedene Arten an, ohne den Originaltext zu vervielfältigen.[1]

The extension is installed on all Wikisource wikis. For the syntax, see s:mul:Wikisource:ProofreadPage. It is also used on Bibliowiki.

Requirements and recommendations

  • Access to the command line is required if running the update script (maintenance/update.php) from the web browser fails (documentation here and here).
  • If you want to use DjVu files (optional but recommended), a native DjVu handler needs to be available for configuration.

See also Manual:How to use DjVu with MediaWiki .

  • In addition, use of ProofreadPage is highly improved by the use of the following extensions:

Installation

Extension

  • Die Erweiterung herunterladen und die Datei(en) in ein Verzeichnis namens ProofreadPage im Ordner extensions/ ablegen.
  • Folgenden Code am Ende der LocalSettings.php hinzufügen:
    wfLoadExtension( 'ProofreadPage' );
    
  • Führe das Aktualisierungsskript aus, welches automatisch die notwendigen Datenbanktabellen erstellt, die diese Erweiterung braucht.
  • Yes Erledigt – Zu Special:Version in dem Wiki (bei Einstellung auf deutsch nach Spezial:Version) navigieren, um die erfolgreiche Installierung der Erweiterung zu überprüfen.

Für Benutzer, die MediaWiki in der Version 1.24 und früher betreiben:

Die oben stehenden Anweisungen beschreiben die neue Installationsanweisung für diese Erweiterung unter der Verwendung von wfLoadExtension(). Wird diese Erweiterung in einer dieser früheren Versionen (MediaWiki 1.24 und früher)  – an Stelle von wfLoadExtension( 'ProofreadPage' ); – installiert, benutze:

require_once "$IP/extensions/ProofreadPage/ProofreadPage.php";

Thumbnailing

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]

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]
  • Or in apache2.conf:
    ErrorDocument 404 /w/thumb_handler.php
Warnung Warnung: There is an .htaccess file in the images directory that may interfere with any .htaccess rules you install.


Namespaces

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 an other language. Full list.

You can customize their name or their id: Create namespaces by hand and set their ids in 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.

Configuration

The names of these categories must be defined in MediaWiki:Proofreadpage_quality0_category to MediaWiki:Proofreadpage_quality4_category.

Configuration of index namespace

This page is a template that receive as parameter entries of the edition 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).

Usage

Creating your first page (example with DjVu)

  • (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 index page Index:Carroll - Alice's Adventures in Wonderland.djvu
    • Insert the tag ‎<pagelist /> in the Pages field to visualize the page list
  • To edit page 5 of the book navigate to 'Page:Carroll - Alice's Adventures in Wonderland/5' and click edit

Syntax

This extension introduces the following tags:

‎<pages>, ‎<pagelist>

Notes

  1. Because the pages are not in the main namespace, they are not included in the statistical count of text units.

See also