Jump to content

User:ScottMHoward/LDRbot

From Wikipedia, the free encyclopedia

LDRbot (meaning List-Defined References bot) is, in fact, not a bot at all. LDRbot generates coding on an external server that is manually processed by Scott M. Howard within Wikipedia. The LDRbot program is not a Wikipedia-authorized bot. Its only function is to retrieve wikitext from Wikipedia and externally convert the coding as defined below. No edits are made to Wikipedia automatically.

If you wish to report a bug or have any comments, suggestions or complaints about LDRbot, please begin a discussion on the author's talk page.

Tasks performed

[edit]

LDRbot accomplishes the following tasks (all tasks are optional):

  • Creates names for unnamed references
  • Uses an available URL in the style [domain][-#]
  • Uses the style ref[#] if no URL is available
  • Converts all reference calls to the {{r}} system (optional)
  • Combines back-to-back references to a single {{r|ref1|ref2}} tag
  • Codes all references to include name="" (with quotes)
  • Removes all line-breaks within single references
  • Consolidates all commented-out references to a single section of the {{reflist}}
  • Applies 30em to all {{reflist}} templates
  • Converts all dates found within an article that include a day, month, and year to any of the 5 date formats accepted by WP:DATEFORMAT:
  • MMMM D, YYYY; "September 8, 1982" (choice)
  • D MMMM YYYY; "8 September 1982" (choice)
  • MMM D, YYYY; "Sep 8, 1982" (choice)
  • D MMM YYYY; "8 Sep 1982" (choice)
  • YYYY-MM-DD; "1982-09-08" (choice)
  • Ignores dates within the {{reflist}} (option)
  • Converts the following & codes to their respective characters:
  • – to
  • — to
  • Converts all award template redirects to {{won}} and {{nom}}
  • Converts all <br> tags to <br />

Current known bugs

[edit]
  • Should not work with references which have a group parameter defined. (untested)
  • Should not work with articles which have more than one {{reflist}} (untested)
  • Will combine {{r|ref1|ref2|...}} further than the template's 5-reference limit.
  • Date conversion does not ignore filenames or other items which must have a static-formatted dates.
  • Date conversion is not limited to dates within references; url and title, for example, are modified as well.
  • Date conversion ignores short dates; will not convert "September 8" to "Sep 8" or "Sep 8" to "8 Sep", etc.

Revisions

[edit]

Rev. 1

[edit]
  • Creation: Implements LDR, Converts references to {{r}} (optional), performs minor &amp; conversions.

Rev. 2

[edit]
  • Added: Now converts award template redirects to {{won}} and {{nom}}
  • Modified: {{reflist|colwidth=30em}}{{reflist|30em}}
  • Modified: &amp; code conversion is now optional
  • Bugfix: Now combines {{r|ref1}}{{r|ref2}}{{r|ref3}}... into {{r|ref1|ref2|ref3|...}}

Rev. 3

[edit]
  • Bugfix: Now ignores &nbsp; when converting &amp; codes
  • Bugfix: Now ignores all references not found in the current {{reflist}} that are commented out

Rev. 4

[edit]
  • Bugfix: Now ignores &#124; ('|'), &#93; (']') and &sect ('§') when converting &amp; codes.

Rev. 5

[edit]
  • Remove: No longer converts most &amp; codes--too problematic. Only converts &ndash; and &mdash; to and , respectively.

Rev. 6

[edit]
  • Added: Now converts all <br> tags to <br />.

Rev. 7

[edit]
  • Added: Now converts all dates which include a month, day, and year within an article to any of the five formats found at WP:DATEFORMAT with an option to ignore dates within the {{reflist}}.