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

From Meta, a Wikimedia project coordination wiki
Jump to navigation Jump to search

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-pL-d-1">Text</ref>
<ref name="Unnamed-pL-d-1"/>
<ref name="something">Text</ref>
<ref>Text2</ref>
<!-- <ref>Text</ref> -->

Online examples[edit]

Look on eswiki.

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 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-_.
  • INDEX: The number of the change in actual page change incremented at every new reference definition.

Example[edit]

Unnamed-10649374-1

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.

Source code[edit]

See also[edit]