Task explanation
editQuite often authors and editors are linked to their article directly in |author=
and |editor=
fields, but the article name and displayed part differ. Even more inconsistent if |first=
or |last=
are linked alone or both to the same target. These links should be placed in the |authorlink=
and |editor-link=
fields instead. This makes parsing easier, potentially allowing automatic generation of hidden metadata parser/scraper info for external tools, such as, already produced COinS. It also makes potential changes to linking possible from the main citation templates. The bot won't change unpiped links.
- Algorithm
If |first=
and |last=
are set; and |author=
and |authorlink=
are not set
- If
|first=
is a piped1 wikilink and|last=
is text- Strip wikilink from
|first=
and move to|authorlink=
- Strip wikilink from
- If
|last=
is a piped wikilink and|first=
is text- Strip wikilink from
|last=
and move to|authorlink=
- Strip wikilink from
- If both
|first=
and|last=
are piped wikilinks to the same target- Strip wikilink from
|last=
and move to|authorlink=
- Strip wikilink from
If |author=
is set; and |first=
, |last=
, and |authorlink=
are not set
If|author=
is a piped wikilink to different targetStrip wikilink from|author=
and move to|authorlink=
- Temporarily disabled pending discussion
The logic is applied to numbered fields as well: |author=
, |author1=
, |author2=
.. |author8=
; as well as |editor=
, |editor-first=
, |editor-last=
, |editor-link=
group and numbered fields thereof.
- 1 If the link is not piped, then the target article is only the visible part of the link, which needs human review. For example, with
|last=[[Smith]]
and|first=John
, is the target really Smith?