This script is used to update the statistics on the WP:NRHP Progress page. Any questions about its output or inner workings should be addressed to User:Dudemanfellabra.
Anyone can use this script by adding
mw.loader.load('/?title=User:Dudemanfellabra/UpdateNRHPProgress.js&action=raw&ctype=text/javascript');
to the bottom of their personal JavaScript page. The script generates a button at the top of the Progress page which reads "Update Statistics". Clicking on that button will start the script, which will then check all ~4000 lists under the scope of WP:NRHP for statistics on total number of listings, total number of pictures uploaded, total number of articles created, and quality statistics (e.g. number of stubs, start+, untagged, etc.). The script and automatically adds the updated statistics to the Progress page and saves the output at the end.
When the "Update Statistics" button is clicked, the script does the following actions:
|image=
parameter is non-blank). If any error is encountered at this stage, a fatal error is triggered (explained
below), and the user is asked to skip the county that produced errors or try to query the county again.To prevent the script from writing gibberish to the Progress page, if at any time during execution the script encounters an error while parsing the wikitext of a given list, it will ask the user how to proceed. The script will identify the problematic list, and the user will have the option to make the script retry that county (in case of connectivity/unknown issues) or to skip the problematic county in favor of later manually updating it. The following error messages may be encountered:
If any other error other than the above is encountered, the script simply retries the query after a brief pause. The most common error encountered is the API returning a warning that the "rate limit"–the number of API queries per unit time–has been exceeded, so the script should slow itself down. If too many of these errors are encountered, the script throttles itself by increasing the gap between each subsequent API query. At the end of execution, these less serious errors are written to the JavaScript console for examination by the user.
This script is used to update the statistics on the WP:NRHP Progress page. Any questions about its output or inner workings should be addressed to User:Dudemanfellabra.
Anyone can use this script by adding
mw.loader.load('/?title=User:Dudemanfellabra/UpdateNRHPProgress.js&action=raw&ctype=text/javascript');
to the bottom of their personal JavaScript page. The script generates a button at the top of the Progress page which reads "Update Statistics". Clicking on that button will start the script, which will then check all ~4000 lists under the scope of WP:NRHP for statistics on total number of listings, total number of pictures uploaded, total number of articles created, and quality statistics (e.g. number of stubs, start+, untagged, etc.). The script and automatically adds the updated statistics to the Progress page and saves the output at the end.
When the "Update Statistics" button is clicked, the script does the following actions:
|image=
parameter is non-blank). If any error is encountered at this stage, a fatal error is triggered (explained
below), and the user is asked to skip the county that produced errors or try to query the county again.To prevent the script from writing gibberish to the Progress page, if at any time during execution the script encounters an error while parsing the wikitext of a given list, it will ask the user how to proceed. The script will identify the problematic list, and the user will have the option to make the script retry that county (in case of connectivity/unknown issues) or to skip the problematic county in favor of later manually updating it. The following error messages may be encountered:
If any other error other than the above is encountered, the script simply retries the query after a brief pause. The most common error encountered is the API returning a warning that the "rate limit"–the number of API queries per unit time–has been exceeded, so the script should slow itself down. If too many of these errors are encountered, the script throttles itself by increasing the gap between each subsequent API query. At the end of execution, these less serious errors are written to the JavaScript console for examination by the user.