Wikipedia:WikiProject National Register of Historic Places/Progress/Instructions

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

edit

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 page
importScript('User:Magicpiano/NRBot/UpdateNRHPProgress.js');
// script for updating map data
importScript('User:Magicpiano/NRBot/NRHPmap.js');

Data update process

edit
  1. 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.
  2. 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.
  3. 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

edit

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.

  1. Click on "Generate SVG Output". This will run a fast script that populates Wikipedia:WikiProject National Register of Historic Places/Progress/SVG with data that can be used to update the maps.
  2. If you have not previously done so, save the following map files to your hard drive:
  3. One by one, open each of these files in your text editor.
    1. 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.
    2. In place of what you removed, paste in the block of formatting from Wikipedia:WikiProject National Register of Historic Places/Progress/SVG that matches the file you are editing.
    3. Save the file, and verify that it correctly displays in an image viewing program capable of rendering SVGs.
  4. One by one, upload new versions of each map to Commons.
    1. 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.
  5. 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

edit

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.

Credits

edit

These scripts were developed by User:Dudemanfellabra, and are currently maintained by User:Magicpiano. Please discuss issues with them at WT:NRHP, or the maintainer's talk page.