Jump to content

User:Dušan Kreheľ/Bot:Merging identical references by the bot

From Meta, a Wikimedia project coordination wiki

What is going on

[edit]

Description

[edit]

Multiple simple references with the same content are replaced template by one reference definition and the other uses are called via reference names. New reference definitions may be stored in {{Reflist}}.

Example

[edit]

Input:

<ref>Text</ref>
<ref>Text</ref>
<ref name="something">Text</ref>
<ref>Text2</ref>
<!-- <ref>Text</ref> -->

Output:

<ref name="Unnamed-20230319001122">Text</ref>
<ref name="Unnamed-20230319001122"/>
<ref name="something">Text</ref>
<ref>Text2</ref>
<!-- <ref>Text</ref> -->

Online examples

[edit]

Look on ptwiki.

Terms and the detail definitions

[edit]

Simple identical references

[edit]

The first reference tag with none key or group parameter are changing.

The right first reference tag

[edit]
<ref>

The wrong first reference tags

[edit]
<ref name="something">
<ref group="something">
<ref name="something" group="something2">

Reference name

[edit]

The reference name is unique on the actual update page.

Syntax

[edit]
PREFIX + INDEX + "-" + DATE
  • PREFIX: Localized text of "Unnamed_".
  • DATE: The UTC date in format YYYYMMDDHHMMSS.
  • INDEX: The number of the change in actual page change incremented at every new reference definition. If the reference is as the one, so INDEX is none/empty.

The implementation does not generate reference naming based on the content of the reference. When created, reference names are unique throughout the Wikimedia.

Example
[edit]
Unnamed-20230319001122
Unnamed_3-20230319001122

Syntax (deprected)

[edit]
PREFIX + DATE + "-" + INDEX
  • PREFIX: Localized text of "Unnamed-".
  • DATE: The UTC date in format YYYYMMDDHHMMSS.
  • INDEX: The number of the change in actual page change incremented at every new reference definition. If the reference is as the one, so INDEX is none/empty.


Example
[edit]
Unnamed-20230319001122
Unnamed-20230319001122-3

Reference name (deprected)

[edit]

The reference name is unique in Wikimedia Movement.

Syntax

[edit]
PREFIX + TIME + INDEX
  • PREFIX: Localized text of "Unnamed-".
  • TIME: The count seconds (in Unix time) from 2022-02-22 22:22:22 UTC) as the tetrasexagesimal number with the digits (0-63): 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzżž (On 2023-03-15 it changed -_ on żž).
  • INDEX: The number of the change in actual page change incremented at every new reference definition.

Example

[edit]
Unnamed-10649374-1

Reference name (deprected n. 2)

[edit]

The reference name is unique on the actual update page.

Syntax

[edit]
PREFIX + INDEX
  • PREFIX: Localized text of "Unnamed-".
  • INDEX: The number of the change in actual page change incremented at every new reference definition. If the reference is as the one, so INDEX is none/empty.

Example

[edit]
Unnamed-2

Implementation

[edit]
  • In it, newly defined references are not added to Reflist template.
  • Namespace: Main / 0.
  • Local wikis:
    • jawiki: The reference with the content string "access-date" and "accessdate" are skipping.


See also

[edit]