These instructions are best followed in a freshly started browser, since the update script requires a fairly large amount of memory. It is known to work on recent versions of
Firefox and
Chrome, although for presently unknown reasons the buttons do not always appear in Chrome. The map update process requires an account at
Wikimedia Commons.
Basic procedure
If you have not already done so, you will need to include the following in your vector.js file (
Special:MyPage/vector.js):
// script for updating NRHP progress pageimportScript('User:Magicpiano/NRBot/UpdateNRHPProgress.js');// script for updating map dataimportScript('User:Magicpiano/NRBot/NRHPmap.js');
Data update process
Navigate to
WP:NRHPPROGRESS. You should eventually see two buttons at the top, one labeled "Update Statistics", the other "Generate SVG Output". If they do not appear, do hard refreshes on the page (Shift-F5) until they do.
Click on "Update Statistics". This will run a script that takes about 5-10 minutes. It creates a status box below the button giving some indication of progress, at the end of which you should be informed that the page has been edited. If there were popups noting failures, record the names of the affected pages.
Refresh the page, and examine it for obvious errors or inconsistencies. If the final edit failed, make repairs as needed and rerun the script.
Map update process
This process requires the use of a text editor on your computer. Although you are editing SVG files, it is not recommended to use an SVG editor, due to the nature of the changes. Also, do not use Microsoft Word, or other word processing editor that adds formatting directives. Notepad on Windows or Gedit on Linux are useful for this task.
One by one, open each of these files in your text editor.
You first need to identify and remove a section of text to remove. It begins with (and includes) the comment header for ALABAMA, and ends just before the </style> tag that is just before the line containing <g id="county-group" class="counties">, which may be located by searching for "county-group". This entire block of formatting is deleted.
Save the file, and verify that it correctly displays in an image viewing program capable of rendering SVGs.
One by one, upload new versions of each map to Commons.
After uploading each file, do a
server purge of that file. This ensures that the entire Wikimedia server farm will soon get correct copies of the file.
Update the progress page to reflect the date on which you did the update. You should also then server purge the progress page.
Issues to watch for
There are a number of changes to the underlying pages that may affect the update script performance or ability to complete. If these are detected, the described corrections should be made, and the script should be rerun.
If listing pages have been moved or redirected, the script may fail on those pages. Messages will pop up, and you should record the affected page names. Correction typically involves updating the table in
WP:NRHPPROGRESS to use the proper non-redirected link and name for the page.
The script is somewhat picky about formatting in the listing pages, including the presence of whitespace in some areas. If a page fails to be processed by the script, you should examine that page's history for recent changes that may have an impact. Examine changed areas of the page for extraneous whitespace, removing if necessary.
If listing pages have been split or merged, and the progress page has not been updated to reflect that activity, counts in affected states will be off. This is presently not easy to detect, and a potential source of error in the data, since counts are either omitted or duplicated. If they differences are small, the state totals may not be obviously wrong. Correction consists of editing the affected state tables on the progress page to reflect the current structure of the listing pages.