User:JL-Bot

From Wikipedia, the free encyclopedia

This bot has three approved tasks:

  1. Fixing internal links that are incorrectly formatted using the external link syntax
  2. Removing stale under-construction templates
  3. Removing orphan templates from articles that are no longer orphans

It is written in Perl using the perlwikipedia framework.

[edit] Link Fixing

Further information: Wikipedia:Bots/Requests for approval/JL-Bot

This bot corrects links, only within articles & templates, to Wikipedia & sister sites that are incorrectly formatted using the external link syntax. It is conservative in the patterns that it matches. The following replacements are made:

[link:target name][[target|name]]
target[link:target][[target]]
[[target]][link:target][[target]]
[[target|name]][link:target][[target|name]]
<a href="link:target">name</a>[[target|name]]

where link: is to Wikipedia, Wikibooks, Wikinews, Wikisource, Wiktionary, Commons, Meta, or Mediawiki. It skips links to specific page revisions or otherwise have a query string.

It also fixes minor formatting errors with internal links, but only if an external to internal link fix is also made.

[edit] Stale Under-Construction Templates

Further information: Wikipedia:Bots/Requests for approval/JL-Bot 2

It is not uncommon for under-construction templates to be applied to an article and the article be "abandoned" by the tagger.

This bot will check articles that include article under-construction templates (as well as their associated redirects) for the time stamp of the last edit. If the last edit was more than 7 days ago, it removes the template. These templates currently include:

It does not search the article history to see when the template was actually added. If an article is actively being edited, it leaves it to the article editors to decide if the template is still needed.

In addition, it will also check for articles that include non-article under-construction templates (as well as their associated redirects) and remove them from the article. These templates are not meant to be used in the article space. These templates currently include:

[edit] Non-Applicable Orphan Templates

Further information: Wikipedia:Bots/Requests for approval/JL-Bot 3

The bot will check articles tagged as orphans (article with no incoming links from other articles). If the article has more than 4 article links (defined as main namespace minus named disambig pages [those with (disambig), (disambiguation), (name), (surname) in the title] minus the pseudo-namespaces [those starting with CAT:, MOS:, P:, & Transwiki:] minus lists [those starting with "List of" and "YYYY(s) in"]), it removes the template as it's no longer applicable.