User:Alex 21/script-plotlength

User:Alex 21/script-plotlength.js is a script that checks either 1) all of the plots for television episode summaries that are added through {{Episode list}} and determines whether they are in compliance with the WP:TVPLOT guideline; that is, if they are below 200 words, or 2) the plot for a film and checking that its summary is less than 700 words per WP:FILMPLOT.

Installation

edit

To install the script, add:

importScript('User:Alex 21/script-functions.js');
importScript('User:Alex 21/script-plotlength.js');

to Special:MyPage/common.js.

>>> User:Alex 21/script-functions.js is required to include multiple shared functions, and the custom "TV Scripts" header, many of which are used identically in a few of my other scripts - you only need to include it in Special:MyPage/common.js once. Follow the instructions at User:Alex 21/script-functions for installing scripts by Alex 21. <<<

There will be a "Plot length" link in the toolbox on the left on every article. Click it to determine the lengths of the plot(s) for the film or episode listing. You will be presented with an alert that either 1) shows which episodes are too long by their overall episode number and their length, or the fact that the films plot is too long or 2) states that the summary(s) are of acceptable length. For television episodes, double-episodes are accounted for with a limit of 400 words. Films are given a limit of 700 words. The summary(s) will have their individual length prepended to it, coloured accordingly:

  • "(150) ..." – summary is less than 200 words.
  • "(205) ..." – summary is only just over 200 words.
  • "(270) ..." – summary is well over 200 words.

For episode summaries that use the <hr /> tag (e.g. for episodic production notes), only the summary before the tag is counted. If there are one or more episodes of excess length, or the films plot length is of excess length, then {{Plot}} will be copied to your clipboard, dated with the current month and year. Open the edit page in a new tab and tag the summaries that are too long, using the prepended summary lengths as a guide.

The script determines the number of words by the number of spaces in the summary after any links and tags have been stripped; this does not make it 100%, but it will be close enough.

Bugs

edit

Please report any bugs on the talk page of the script's creator.

See also

edit