User talk:Dudemanfellabra

From Wikipedia, the free encyclopedia
Jump to: navigation, search

A couple of things[edit]

  1. Despite your edit, lines with multiple refnums are still encountering gibberish. See National Register of Historic Places listings in Butler County, Kentucky for an example; I just now edited the page, so it's not a caching thing.
  2. Is there any chance that we could have a tracking category for lines (other than Image and Summary) that have parameters with no information whatsoever? While adding the date_delisted parameter to all Pennsylvania counties, I noticed that many entries didn't have refnums. I'd find it quite a headache to look through tons of entries on tons of lists to catch the occasional entry with no refnum, so a tracking category would surely be simpler. You've already set it up to display as <Ref. # missing>, so I imagine that getting it to transclude a tracking category in the same situation would work the same way.

Please don't take this as a complaint, either "you're slow" or "you're making a mess" or anything else — I'm just bringing this up in case you have the chance to work on it at some point. Nyttend (talk) 21:07, 2 March 2014 (UTC)

No offense taken.
  1. I just edited the Butler County list to fix the problem. Multiple refnums should be separated by commas or comments per the documentation.
  2. The bot is supposed to output a list of all articles with missing/misformatted refnums to User:NationalRegisterBot/NRISOnly like it does everything else, but it's not finding any. Can you show me an example the next time you find one of a site that doesn't have a refnum and isn't caught by the bot? As you expected, adding a category was easy (in fact, there was already a Category:NRHP list missing refnum from old WLM stuff that I just hijacked), but if functionality is not working in the bot, I'd like to fix it as well.--Dudemanfellabra (talk) 21:34, 2 March 2014 (UTC)
Thanks! I had no idea that the separator was significant. Lancaster County, Pennsylvania has a missing refnum (Jackson's Mill Covered Bridge, the first former listing), but it doesn't appear at User:NationalRegisterBot/NRISOnly, and its only appearance in the bot's userspace is on User:NationalRegisterBot/AllNRHPPages/Duplications regarding three border-straddling sites. Nyttend (talk) 21:46, 2 March 2014 (UTC)
Ah, yes my bot doesn't look at former listings at all, so any of those that are missing refnums won't be picked up by it. Looking through the category, it seems most lists are there because of a former listing. If you find one that is a current listing that is missing its refnum, let me know about that. I just ran the bot and updated everything and got no missing refnums, so to my knowledge you shouldn't find any. As for the Jackson's Mill bridge showing up in the bot's userspace, where do you see it exactly? I can't find it anywhere on the linked page, and really it shouldn't be there at all since as I said my bot ignores former listings all together.--Dudemanfellabra (talk) 05:38, 3 March 2014 (UTC)
Unclear antecedent — I meant that the Lancaster County list doesn't appear in the bot's userspace except in the context of border-straddling sites. Nyttend (talk) 06:05, 8 March 2014 (UTC)

Wise County and Norton, Virginia[edit]

Another Virginia anomaly for you. The (two) listings for the independent city of Norton, Virginia were combined with those of surrounding Wise County, Virginia. I have separated the two in National Register of Historic Places listings in Wise County, Virginia (and redirected National Register of Historic Places listings in Norton, Virginia there, away from National Register of Historic Places listings in Virginia), but your files or the script may need updating. (N.B. the other zero listing in Virginia, Poquoson, Virginia, is surrounded by York County, but seems to actually not have any listings at this time.) Magic♪piano 17:50, 3 March 2014 (UTC)

Thanks for letting me know again. As the list was set up, it would have counted the norton properties correctly, but it would have incorrectly recounted the norton properties as the wise county properties. The reason this happens is National Register of Historic Places listings in Norton, Virginia is a redirect and thus my code looks for a section on the page titled "Norton" and pulls the data from there. National Register of Historic Places listings in Wise County, Virginia is not a redirect, so the script just takes the first table on the page, which in this case happens not to be the correct one. A similar situation is that of National Register of Historic Places listings in Pierce County, Washington and National Register of Historic Places listings in Tacoma, Washington, the latter of which is a redirect to a section on the former page. Tacoma is listed below the rest of the county, so everything works with the script. I've just edited the Wise County page to drop Norton below the county listings, and if it stays like that, the script will work on its next run. If that is not satisfactory, the other two options would be to 1) move the page to something like National Register of Historic Places listings in Wise County and Norton, Virginia and have the Wise County link redirect to that as well or 2) move the Norton listings to a separate page, avoiding redirects all together. In the first case, since Wise County would be a redirect, the script would look for a section titled "Wise County" and successfully find it. In the second case, there would only be one table on each page and no redirects, so everything would work as well. I think my solution is a bit less of a hassle, but either will work. Thanks again!--Dudemanfellabra (talk) 18:47, 3 March 2014 (UTC)
Thanks for dealing with this, both of you; I noticed this a while ago but forgot to do anything about it. By the way, I don't think the Country Cabin is actually in Norton; it appears to be in rural Wise County just outside of Norton, so it should be in the other list. As to whether they should be listed on the same page or not, I remember there was a long discussion over the name of the Prince William County list, but that was back when a certain editor turned every discussion into a major dispute, so it may be time for another discussion about it at WT:NRHP. TheCatalyst31 ReactionCreation 22:13, 3 March 2014 (UTC)

‎NRHP in Washington[edit]

It's simply that these images skew the statistics, making it seem as if we've gotten photos at sites for which we have nothing. Vaguely comparable to putting together a stub on an MPS and then using it in place of links to nonexistent articles, e.g. how List of the 1733 Spanish Plate Fleet Shipwrecks is linked at National Register of Historic Places listings in Monroe County, Florida. Someone could even pad the stats by writing a slightly nonstub MPS article just to save effort on sites with documentation and link it, e.g. hitting "undo" on this edit; for practical purposes, it's no different from adding these image links. Nyttend (talk) 03:45, 8 March 2014 (UTC)

@Nyttend: I realize that; I was just pointing out that big decisions like that tend to make people unreasonably mad haha. I also notice you just split out Norton, VA from Wise County.. regarding that, you should look at the section above this one.--Dudemanfellabra (talk) 05:31, 8 March 2014 (UTC)
Actually, I split it because I'd looked at the section above this one. Basically, I can't remember any other pages like this; in my memory, every list is either dedicated to a specific county/countyequivalent (or a piece of one), or it's on the statewide list. Combining multiple county/countyequivalent lists in a single list that's not the entire state list is something I can't ever remember seeing, aside from a few states that were once letter-split, e.g. National Register of Historic Places listings in Missouri, Counties L-N. I'm not fond of tiny list pages, so I might be more in favor of putting tiny lists like Norton back into the statewide list, but I disagree with putting it with the county because it's no more a part of Wise County than a part of Accomack County or the city of Lexington. Nyttend (talk) 06:01, 8 March 2014 (UTC)
But geographically it is entirely surrounded by the county, so in my eyes it's kind of a special case. Having them on one page makes something like the map of all coordinates look better, i.e. without any holes. Personally I don't care either way because my script can handle both, but leaving cases like this one and the aforementioned Prince William County together can at least be somewhat justified from this viewpoint.--Dudemanfellabra (talk) 06:59, 8 March 2014 (UTC)

Jesse Whitesell House and Farm[edit]

I just saw your WT:NRHP discussion with Orlady regarding the Jesse Whitesell House and Farm. As the photographer for the images currently in the article, I can tell you that it's rather confusing on the ground, too; I wasn't quite clear what I should photograph in order to get elements of both the original and the increase. If I correctly understand your words, I agree with what you've said: although it was originally located just in Kentucky, it needs to be listed as a duplicate because the increase causes the listing to include resources on both sides of the border. Nyttend (talk) 04:00, 18 March 2014 (UTC)

If that is the case, then we need to make the county lists have the same reference numbers so that my code will pick it up. If one has the original refnum and the other has the increase refnum, the code won't pick it up as a duplicate.--Dudemanfellabra (talk) 08:39, 18 March 2014 (UTC)

Update to the Progress Script[edit]

I'm posting this here because I didn't want to write it twice on each of your talk pages haha, and I didn't want to bother the entire project just to talk to you two, User:Nyttend and User:TheCatalyst31 (I'm hoping that ping will alert you to this?). The reason I only want to talk to you two is because you're the only other people I've seen occasionally use the progress script to update the Progress page. I've been working for the past day or two on an update to the script which uses a different method to scrape the data from the county lists than before and in turn dramatically speeds up the process. Instead of taking (on my slow connection) roughly 2-2.5 hours, I now consistently get runs of about 45-50 minutes, and I expect them to be even faster when I go back next week to my faster connection.

I'm still not convinced that I have worked all the bugs out, though, so I haven't actually edited the progress script with these changes. The current test code is at User:Dudemanfellabra/Sandbox.js and the output is at User:Dudemanfellabra/Sandbox. Comparing that output to what's currently on the Progress page (made convenient by this dif), they roughly match, although there are some small differences. Some of those differences are due to the fact that the updates are 3 days apart, and one would expect there to be differences due to new article creation, etc., but some I believe due to the magnitude of them (i.e. the total number of listed sites in the entire country dropped by ~100) are due to the different approaches to the code. I am beginning to look through to compare the data to what the NRHPstats script outputs on the individual county lists as well as what I can manually tabulate, but I figured three sets of eyes is better than one. Would either/both of you care to help me look over this?

To be honest, I'm actually more inclined to trust this newer data because of the new way I handle in-county duplications, but the new code uses some complicated regular expressions to extract the data from the wikitext whereas before I was just using the processed HTML (the processing of which was what led to the long wait time), so maybe those regex's miss some listings that the old code doesn't? One possible reason would be hard-coded table rows, which my new code wouldn't catch (it only looks for transclusions of {{NRHP row}}). Those shouldn't exist, though, because if they did, my bot would (in theory) catch them and report them as having no refnum on the county list since that was only introduced recently via the row template. The thing I don't like is that the number of total sites reported by the new code is lower than what's given on United States National Register of Historic Places listings, which I trust to be the most accurate of the three numbers. Then again, this may be due to the newly generated duplicates differing in many states to what was on the Progress page before automation, which was usually just a copy and paste extension of what was on the relevant state list.

If I can get this working in an acceptable manner, I'll hopefully apply the same technique to the bot code itself. Currently that code takes anywhere from 5-7 hours depending on my connection to run, so I would expect to at least shave an hour or so off of that. Most of that time, though, is spent querying individual pages to see if they need to be tagged with NRIS-only, so that won't be sped up at all. Either way, some improvement is better than none, so I'll take it! Thanks for you guys' continuous help!--Dudemanfellabra (talk) 21:44, 26 March 2014 (UTC)

I think I see what's causing Washington to lose 100 listings. For whatever reason, the Tacoma and Spokane sublists are on the same page as the rest of the county listings, and the new script is counting the same list twice instead of counting both lists. I'm not sure why it's doing this when it's not doing that for any other page with multiple tables, but it is. (As an aside, why are those two lists set up like that in the first place? The whole point of splitting out sublists is to cut down on load time and page size, and leaving the list on the same page does neither.)
I also noticed that the number of untagged pages jumped by 30, which strikes me as odd. In Illinois, one of the untagged listings is Chicago, Burlington & Quincy Railroad Depot (Wyoming, Illinois), which is conveniently the only listing in its county, and it definitely has a project tag. I think this is more likely a coding error than a bunch of new untagged articles. TheCatalyst31 ReactionCreation 22:32, 26 March 2014 (UTC)
I can always count on you to find these things haha.. and quickly. Thanks for that. The problem with Spokane and Tacoma is rooted in how I find the section for sublists. I use a regex that looks for any section that ends with the county/city name rather than consists entirely of it. The reason I do this is because on many state lists, the title of each county's section links to the county article itself, i.e you there is something like "==[[Pierce County, Washington|Pierce County]]==". If I just used a regex that looked for the county name like "==Pierce County==", it wouldn't match correctly. To make it work, I ignore the first half of the section title and only check if it ends with the correct name. Because the section titles for Pierce County outside of Tacoma and Spokane County outside of Spokane both ended with "Tacoma" and "Spokane" respectively, my code matched them incorrectly and didn't make it down the page to the correct section. To remedy this, I've added parentheses to the incorrect section titles so that my regex won't match them.
That aside, I agree that Tacoma and Spokane are a little weird in that they are not on separate pages. I think I brought this up once before, but I don't want to go digging. I wouldn't complain if someone moved them out haha, but I feel like whoever the editor was that did that did it for a reason.
As for the Illinois untagged article, the wikitext had as an article name "Chicago, Burlington %26 Quincy Railroad Depot (Wyoming, Illinois)". This is the URL encoded version (i.e. "&"="%26") of the article name, and is unnecessary and uncommon to have in wikitext. I changed the text there, but just to be safe for any other articles for which this might be the case, I added some code to automatically decode any article titles. The good news is that this is a problem with that specific article and not with the code as a whole. I'll rerun it now to see if that is corrected. Thanks again!--Dudemanfellabra (talk) 00:09, 27 March 2014 (UTC)
And sure enough on the next run, the Washington and Illinois issues were taken care of. The numbers in that diff are a little more believable than before. I'm even willing to explain the differences between the stub/start/untagged numbers from old to new by the application of my new method of counting duplicates, which I believe to be more accurate (though I have no experimental proof.. only theoretical justification). I'd love to find some actual justification of that statement haha.--Dudemanfellabra (talk) 04:21, 27 March 2014 (UTC)
Illinois still has an untagged false positive in Boone County, though I couldn't tell you which one. Though I suspect that part of the increase in untagged articles is due to your method of counting (Montezuma County, Colorado alone is responsible for nearly half of it, and those all look legit). TheCatalyst31 ReactionCreation 04:31, 27 March 2014 (UTC)
Update: I just fixed some redirect weirdness with the talk page for United States Post Office (Belvidere, Illinois), so that might have been the problem. TheCatalyst31 ReactionCreation 04:34, 27 March 2014 (UTC)
Ah yea that was the problem. The code would have looked at Talk:United States Post Office (Belvidere, Illinois) (the talk page of where the link in the list resolves to), which up until you just changed it was untagged. Now that you fixed that, it should fall into line. I also found another county in Washington that had the weird title thing going on (Thurston/Olympia), so I added parentheses to that one as well and will rerun the code. Not sure why I didn't catch that earlier.--Dudemanfellabra (talk) 05:00, 27 March 2014 (UTC)
Ok, while I was sleeping I updated the actual progress page to get better data to compare to. The data in this diff (Progress page on the left, new update on the right) is separated by only about 5 hours, the Progress page being the newer of the two, so a large majority of the differences between the two will be due to the different methods of counting used in each (though there are still probably a small number of differences due to editing in those 5 hours). The first difference I see in any list is that of Birmingham, Alabama, where everything matches except the number of Stub/Start+ articles. The old code (i.e. the data on the Progress page, which remember is 5 hours younger than what's in my sandbox) shows 29 stubs/25 Start+, and the new code shows 30/24. My visit to the page just now shows an NRHPstats output of 30/24, which matches with the new code (i.e. the older data, so it's not likely that something was downgraded from Start+ to stub in those 5 hours then upgraded back before my check just now). This is strange to me since the method for NRHPstats is the same as the old code, but maybe there's some weirdness going on here due to my old method, which again I believe to be inferior to my new method. My manual tabulation of the bluelinks on that page is below:
As you can see, these numbers match NRHPstats as well as my new code, but not the Progress page output. Not sure why the Progress page and NRHPstats don't line up, but this is at least some evidence in support of my theory that the new code is more accurate than the Progress page. I'll see if I can find any more case-by-case examples, preferably from smaller lists haha.--Dudemanfellabra (talk) 18:53, 27 March 2014 (UTC)

──────────────────────────────────────────────────────────────────────────────────────────────────── @TheCatalyst31: Sorry for the long silence, but last week at school was pretty gruelling (getting down to the end of the semester now), and I haven't had time to do anything until now. I'm still trying to figure out any differences between my new code and the old code, and the next major difference I find is Coconino County, Arizona, which shows on the Progress page as 25 stubs, 39 Start+ (which matches the NRHPstats script for me) and in my sandbox as 35 stubs, 29 Start+. I made a manual table like the one above for this county below:

As you can see, this matches the new code instead of the old one, leading me to believe the new code is better. I think what happened is the old code took the 11-time duplicated Lookout trees article and mistakenly counted it as Start+. The new code does a better job at the article titles attached to their ratings by looping through an array each time a rating is queried instead of assuming elements are going to line up. With this bit of evidence, I'm now willing to say the new code is superior to the old code, both in speed and in accuracy. I'm going to copy it in and run it now.--Dudemanfellabra (talk) 15:19, 5 April 2014 (UTC)

Infobox NRHP[edit]

I'm not absolutely sure that your edit is responsible, but either this edit or something else is causing embedded NRHP infoboxes to be misaligned—they're being treated as entries in the wrapping infoboxes, left-aligning with the text of the other entries rather than with the labels (or headings, if you will) of the entries. See, for instance, the example under "Embedding" at the template page. Could you look into this? Deor (talk) 11:57, 10 April 2014 (UTC)

Thanks for pointing that out. I had made the change to fix one problem another user had brought up, but it seems I broke more than I fixed. I reverted the edit.--Dudemanfellabra (talk) 13:14, 10 April 2014 (UTC)

The Late Show[edit]

Is it really a good thing that we're going to get Tripling Elephants on the Late Show? Be ready for a repeat of Wikipedia:Articles for deletion/Elephant (wikipedia article) and related Colberrorism :-) Nyttend backup (talk) 21:33, 11 April 2014 (UTC)

Haha I forgot you span my "Wikipedia life" and my Facebook one. For a second there, I was like OMG STALKER AAAAAAAHH!! But then I figured it out. Haha to be honest I had never heard of the Colbert-related stuff on Wikipedia. I generally stick to the NRHP and Meridian-related stuff.--Dudemanfellabra (talk) 13:58, 12 April 2014 (UTC)
Ah, sorry to give you the fright; I responded here because it would be easier to give you the Wikipedia links :-) Tripling elephants were a big deal right around when I registered, two years before you did, youngin'. Plus, it's been a minor administrative thing — see the protection log for Elephant. Just last year, I tried removing protection, but vandalism was instantly back, and I had to restore protection just two days later. Meanwhile, see my note to Orlady; I'm hoping to get a few photos for a few Alcorn County and Tishomingo County sites next week. Nyttend (talk) 04:14, 13 April 2014 (UTC)
Ah, I see. You'll be pretty far away from me, as I spend most of my time in Forrest County, Mississippi, and Tuscaloosa County, Alabama. If you ever take a trip down the I-59 corridor, be sure to notify me!--Dudemanfellabra (talk) 19:27, 13 April 2014 (UTC)
Will do, but it's hard enough justifying a "detour" through Mississippi on my way to Ohio; going halfway to the Gulf would be even harder to justify :-) I'm not going to create the |commonscat= tracking category without input, so it would help if you'd offer comments (both on the name and on the idea itself) at WT:NRHP. I brought it up just below your last comment on the subject. Nyttend (talk) 19:34, 13 April 2014 (UTC)

A possible oversight with NationalRegisterBot[edit]

While tagging some untagged articles, I came across this article, which should have been tagged as NRIS-only but wasn't. Do you have any idea how the bot skipped that one? TheCatalyst31 ReactionCreation 09:55, 13 April 2014 (UTC)

Thank you for finding that and pointing it out. There was a flaw in my code that didn't pick up named references which had a space between "name" and "=".. I guess I didn't see that as a valid input for whatever reason. On the Harper-Chesser House article, one reference was included as <ref name="nris">...</ref> and the other as <ref name = nris/>. Since one has a space and the other one doesn't (I had already corrected for the quotes and the different formats), they were treated as two separate references, the first named and the second unnamed. I've just modified my code to pick up that second reference as being named, so I'll re-run it and probably get quite a few articles of this type.
On a side note, I've updated the bot's code to use the new method I employed on the Progress page, thereby shrinking the run time from 6-8 hours to only about 3.5-4! Still working on ways to get it down even faster, but that's progress! Thanks again!--Dudemanfellabra (talk) 14:39, 13 April 2014 (UTC)
And just as I predicted, this patch found 11 previously untagged articles, not including the one you manually tagged. They've all been tagged now! Thanks!--Dudemanfellabra (talk) 19:24, 13 April 2014 (UTC)

List numbering bot notice[edit]

Thanks. For a number of reasons, most recently my recent trip to China, I haven't been able to work on NRHP articles in a few weeks, but I eventually do plan to get back to them. Daniel Case (talk) 16:59, 19 April 2014 (UTC)


Before I noticed your last message I tried it in Firefox: File:NRHP_Firefox_scriptoutput.jpg Agathoclea (talk) 19:10, 20 April 2014 (UTC)

Looks similar (just different format) but I can't highlight to copy. Error has moved to line 93 Agathoclea (talk) 19:13, 20 April 2014 (UTC)
Got it to work by removing all other scripts. Agathoclea (talk) 19:50, 20 April 2014 (UTC)
Phew that makes my life a lot easier haha. I was scratching my head to no end because of this. The screenshot you uploaded above looks perfect. It must have been one of those other scripts using a global variable/similarly named function to mine. I just changed the names of some functions and variables to hopefully avoid that. See if you can re-enable all the scripts and get it to work now. If not, re-enable them one by one and let me know which one is conflicting. I can then modify my script to avoid the conflict. Thanks for being persistent with this. Now that it's working for you, what do you think about it? Any comments? Suggestions? Criticisms?--Dudemanfellabra (talk) 20:00, 20 April 2014 (UTC)
At the moment I am back to have an error on line 97 before amalgamating the scripts:
Uncaught ReferenceError: jsonObject is not defined 
Apart from that I found it fast to add the categories, but the first one was a category without an image in the list, which I was not alerted to. To add to that, the category only shows in the list if an image is linked. To add to my troubles I could not decide on a representative/suitable image :-( that first edit did not save Agathoclea (talk) — Preceding undated comment added 20:04, 20 April 2014 (UTC)
That error should be fixed now. Yea I have not yet added the feature to check if an image is there or not. Most of the time there is one if there is a category on commons, so this shouldn't happen that often. I'll get around to adding that feature when I get time.. probably in the next few weeks.--Dudemanfellabra (talk) 20:11, 20 April 2014 (UTC)

I found the culprit script User:AzaToth/morebits.js resulting in an error on line 93

Uncaught TypeError: Cannot call method 'replace' of undefined 

Just wondering what I was using it for. Agathoclea (talk) 20:29, 20 April 2014 (UTC)

Anyway it seems to be working swell now. Thanks for your time and effort into this. I'll finish off Pennsylvania ‎and then I will look for an id with multiple categories to test. Apart from that it looks easy as the output of the script shows with the coresponding line, so no need for any alerts or so I would think. Just spend a second or so longer looking. Agathoclea (talk) 20:37, 20 April 2014 (UTC)
Uncaught TypeError: Cannot call method 'scrollIntoView' of undefined 

line 152 when running on National Register of Historic Places listings in Carbon County, Pennsylvania Agathoclea (talk) 20:45, 20 April 2014 (UTC)

Yes check.svg Done thanks Agathoclea (talk) 21:18, 20 April 2014 (UTC)
Nonono.. chill for a minute. It's not working just yet. I'm trying to debug it.--Dudemanfellabra (talk)
The result could have fooled me. Just revert if you need a testing page. Agathoclea (talk) 21:21, 20 April 2014 (UTC)
Sorry for that. While the result was the same for your edit and mine, it was only by chance. If you noticed before, the output wasn't displayed under the correct row in the table. Had you tried another county, you would have missed a majority of the rows therein because I had some bad logic in a regex for commented out rows (which was the issue with Carbon County in the first place). Everything should be fixed now, including for counties with commented out rows. If you find any more errors or see any output that doesn't look quite right, let me know.--Dudemanfellabra (talk) 21:28, 20 April 2014 (UTC)
Thanks, I will. Anything we would have missed will show up once that AWOL bot is running again. Agathoclea (talk) 21:35, 20 April 2014 (UTC)

commons:Category:Longmire Buildings only showed for its second id not for the first one. (To test you will need to revert two edits of mine) Agathoclea (talk) 22:57, 20 April 2014 (UTC)

This is something I have no control over. The way commons:Template:NRHP works is it adds a sortkey to the category. A single page cannot have more than one sortkey, so commons only accepts the last one on the page. The only way to remedy this is to remove one of the two templates from the page. A single category shouldn't be attached to two refnums anyway.--Dudemanfellabra (talk) 23:35, 20 April 2014 (UTC)
Some are mistagged I guess, but there is a genuine reason for it when the object straddles a boundary. Anyway on National Register of Historic Places listings in Windham County, Vermont I get an error on line 152
Uncaught TypeError: Cannot call method 'scrollIntoView' of undefined 
I have a couple of ideas to expand the use of this script if your are willing to look into this involving seperating the logic from the actual categories. So by running a couple of configuration lines the script could be used on other lists as well. Agathoclea (talk) 12:38, 21 April 2014 (UTC)
Windham County, VT, is fixed now. The problem was with those commented out rows again. As for expanding the script, I'll look into it. For listed buildings, it looks like it's just changing a category name and row template and reworking the regexes to look for |uid=####### instead of |refnum=########. I'll make it recognize which one we're looking at based on the title of the page and adjust itself accordingly. That might take some time, though, as during the week I have class and have to focus on it, especially since it's now the end of the semester, and my professors have piled the work on top of me. I'm a few weeks away from getting my Master's, so after May 2, I should have tons more time to devote to this. Thanks for the suggestion! I didn't realize there were other setups like this. If there are any more like these two, I can probably incorporate them as well, making this a universal script. Thanks again!--Dudemanfellabra (talk) 13:24, 21 April 2014 (UTC)

Another oddity: National Register of Historic Places listings in Middlesex County, Connecticut has a former listing that shows a category to be added. But it does not get saved neither can I see an error in the console. As for my ideas: I think I will put them on the talkpage of the script to kepp this page uncluttered. It might take me just as long as I have some leave next week which I plan to spend away from the keyboard. Agathoclea (talk) 22:32, 25 April 2014 (UTC)

Fixed Middlesex. There was some stray (and incorrect) wikitable coding left on the page. I removed it, and everything worked as expected. As for the script, I would prefer not to create the talk page if that is ok. Just a personal preference... I would rather have everything here.--Dudemanfellabra (talk) 04:18, 27 April 2014 (UTC)

Script update[edit]

@Agathoclea: I've just updated the script to be able to handle listed buildings in England and ran it on all of the pages listed here. In the process I also made it compatible with listed buildings in Wales, although I don't believe the bot has output any lists of missing links for Wales (correct me if I'm wrong). I ran it on Grade I listed buildings in Conwy County Borough and found a few missing links, which I let the script add. Could you perhaps try to find more missing in Wales somewhere? If it doesn't work, let me know. Now that I have the extension ready, it is relatively straightforward to extend it to most if not all of these categories. The first on the list would be the rest of the listed buildings in the UK. If that is desired, I can probably do it. Just let me know!--Dudemanfellabra (talk) 00:12, 8 May 2014 (UTC)

I tested Grade 1 in Wales and only Cardiff did not work for obvious reasons. Thank you very much. Expansion would be great. One of my plans is to port it to deWiki, but there it would be a check against a category not a name of an article. see de:Liste der Baudenkmäler in Naila Sadly there is no botoutput to test that category. But there is for a number of other categories I will check. Agathoclea (talk) 06:18, 8 May 2014 (UTC)
Ah, I didn't realize Cardiff had its own template. That's strange... Anyway, I can make it work there too obviously with a little more work. I'll try a go at expanding it to the rest of the UK tomorrow when I wake up and go from there. Thanks for being patient with me! Now that I've graduated, I should have more free time.--Dudemanfellabra (talk) 06:35, 8 May 2014 (UTC)
Actually I couldn't sleep, so I went ahead and made it compatible with Cardiff and the rest of the UK tonight. I did at least one successful test run in each of the four countries, as can be seen in my contributions. I had to do a little tinkering, especially with Northern Ireland (which only has 5 total categories with known IDs anyway, so it's kind of a waste), but all should work smoothly now. What should be next on the list to support? Any more bot-generated lists of missing links?--Dudemanfellabra (talk) 07:53, 8 May 2014 (UTC)
Acourding to the bot edits I found the following possibilities (sample list/country):
None has a bot-generated missing category list so the immediate usefulness is unclear. But eventually it will be useful in all cases Agathoclea (talk) 11:21, 8 May 2014 (UTC)
I added the following (Country - list I tested on):
I skipped Nepal since there are no subcategories of commons:Category:Cultural heritage monuments in Nepal with known IDs‎, only files. Also I found it strange that they are all in WP namespace, so I just avoided it. One thing I did notice, though, is that pretty much all of those lists lack images all together, and like I said that category does have images in it. I may try eventually (after I get all the countries supported) to expand this script to also be able to add individual images rather than just links to commons categories. That's a goal for the far future, though, since first I still need to check to see if an image is present when adding commonscat links.--Dudemanfellabra (talk) 17:21, 8 May 2014 (UTC)
I think the change to templates rather than titles was a good idea. Already worked my way through South Africa and India. India might need some cleaning up either in the lists or on commons. I left a note with the creator of the Nepal lists. Maybe we get some feedback. I saw your note with Multichill; somehow I got a bad gut feeling about the bot at the moment. Pity. Agathoclea (talk) 18:04, 9 May 2014 (UTC)
Yea, doing it with the templates is much easier, although it does slow down page load time since it has to query the wikitext before it knows if it can add the button or not. I went ahead and added Nepal even without anything in the category since it was straightforward to do. I also added several other countries, but I ran into a problem with Wallonia and Antarctica where they have two parameters that specify the ID instead of just one. I'll have to do a little bit of reworking to get that set up, and I'm out of time at the moment, so I'll do that and add the others later. If you want to test the countries I've added, feel free to do so. I didn't test anything, so let me know if you have any problems.--Dudemanfellabra (talk) 23:16, 9 May 2014 (UTC)
I have now added support for all of the templates supported in the bot's code but have not tested on many of them. Many have no categories to test regardless. My next task will be to extend the script to be able to add images as well as commonscat links (allowing us to test those that don't have categories now), but that may take a while. I will be travelling for the next few days, so I won't have much time to work on it. If you find any more row template/category combinations that I could add, let me know.--Dudemanfellabra (talk) 19:18, 11 May 2014 (UTC)
No worries. We got six hours time difference I think. I saw your edits once I ran into the first popup, I like the percents instead of the dots. As fas as the speed goes it is just a case to have one loading while you work on the other. Agathoclea (talk) 05:54, 12 May 2014 (UTC)

──────────────────────────────────────────────────────────────────────────────────────────────────── I have now added the functionality to find and add matching images to lists. I tested it with an NRHP page and a Nepali page and got satisfactory results. I can't at present think of a way around the major time increase, but if I do, I'll try to shrink it as much as possible. As always, let me know if you find anything that doesn't work.--Dudemanfellabra (talk) 03:09, 13 May 2014 (UTC)

Great, speed for Nepal is quite good, but that is most likely due to the limited number of images. One problem I have run into is Wikipedia:List of Monuments in Bhaktapur, Nepal where it seems to image options are too many. My last attempt crashed my browser. It could be though that in the background another programme had issues connecting to its server so there might have been a crossfeed. Agathoclea (talk) 08:58, 13 May 2014 (UTC)
Sorry for the late response. I've been on a plane for the majority of the last day and a half, so I haven't had access to internet. I'll look into that page now and make changes if necessary.--Dudemanfellabra (talk) 20:13, 14 May 2014 (UTC)
You were correct that the Bhaktapur page was not working because it had too many matches. The API has a limit of 50 images that can be queried at once. I modified the code to break up the matches in chunks of 50 when querying but still display all of them together, so that is fixed now. As for why your browser crashed, I think that was because it was trying to load 50+ images, all of which are giant. I modified the code to generate 100px thumbnails instead of downloading the entire images, so that should be fixed as well. Thanks for bringing that to my attention!--Dudemanfellabra (talk) 21:02, 14 May 2014 (UTC)

Script update again[edit]

@Agathoclea: I just modified the script again to get around the long download time at the beginning. Instead of downloading the entirety of Commons data, I now construct a category/file sortkey (the thing {{DEFAULTSORT}} speficies) from the ID in the table row and only query to see if there are matches with that. Now each row takes a second or so to query before moving on to the next instead of the instantaneous jump as before. Now, though, there is no wait at the beginning to get started, so it's a trade-off kind of thing. For places like Nepal with very few categories on Commons this might actually increase the time it takes to run the script, but for registers like the NRHP with many thousands of files, it speeds up the process tremendously. This will make things better in the long run, too, when more and more files/categories are ID'd on Commons. Let me know how you like the change and also as usual if you find any errors.--Dudemanfellabra (talk) 08:51, 26 May 2014 (UTC)

Now the bot is working again I had a chance to test a little more. I ran into a problem with Grade II* listed buildings in South Oxfordshire where I found the categories but not the images from Wikipedia:WikiProject Historic sites/Unused images of listed buildings in England. -- Agathoclea (talk) 11:02, 3 June 2014 (UTC)
Maybe I'm misunderstanding, but I don't see what's wrong. I only see one image in the bot output that should go onto that page, and it had already been added before you ran the script. Since the image was already there, the script didn't ask if you wanted to add it. Am I missing something?--Dudemanfellabra (talk) 13:53, 3 June 2014 (UTC)
Yes, my edit above added three categories without offering me the pictures from those categories. I did a double check with one of the categories and both the image was on the bot-list and was taged with the template. I did a few Englisch lists from that bot list always only adding categories while leaving the image blank. Agathoclea (talk) 20:30, 3 June 2014 (UTC)
I only checked the first category you added in the edit above (commons:Category:St James' Church, Sotwell), so correct me if this does not apply to the others, but all of the three files in that category have not been tagged with commons:Template:Listed building England individually. The category itself is tagged, but the pictures therein are not. Because of this, the script does not pick the images up as matches. Even if the script matches a category, if the images in that category are not also tagged, the script will not match them. Now that you mention this, though, I think a good addition to the script would be to suggest images in matched categories--even if the images are not tagged themselves--if there is no image present in the list. I'll try to add this functionality soon.
If I am mistaken that this was the case for all the categories you added, though, let me know, and I'll see if there is some other error with the code.--Dudemanfellabra (talk) 09:42, 5 June 2014 (UTC)
@Agathoclea: I have now added this to the script. When it comes across a site that has a commonscat already specified but no image shown, it suggests images from the pre-existing commonscat. If there was neither a commonscat nor an image specified and the script finds a matched commonscat, it will suggest images from that category as well. I tested it on Grade II* listed buildings in South Oxfordshire with satisfactory results but nowhere else. If you find anything else wrong, let me know as usual! Thanks!--Dudemanfellabra (talk) 06:01, 7 June 2014 (UTC)

"nice script" Agathoclea (talk) 18:44, 16 June 2014 (UTC)

I noticed that you are starting to look at branching out to other wikis. If you need me to test on deWiki let me know. My favorite hunting ground is de:Kategorie:Liste (Baudenkmäler in Bayern) :-) Agathoclea (talk) 14:40, 11 July 2014 (UTC)
Sounds like a plan to me. I have a few other things I'm trying to get knocked out at the moment, but this is definitely something I want to get to soon. The main thing I'll need when I start expanding is translating all the script's output messages, e.g. "Looking for matches" in each language. Most everything else won't have to be translated I think.--Dudemanfellabra (talk) 02:47, 12 July 2014 (UTC)
Something on the line of having a base script and give the option of overwriting the constants and template/category nnames on the local wiki? Agathoclea (talk) 20:21, 12 July 2014 (UTC)
I'm sorry. I don't mean to offend, but I don't believe I understood what you were trying to ask with that comment.. Could you perhaps try to ask it in a different way? What I was trying to get across was that I would need help translating the interface of the script into all the individual languages.. the words for "category", "template", etc., will not need to be translated because I never actually use them. The word "template" does not show up in the wikitext–instead it's just {{TEMPLATE_NAME...–so I don't have to worry about translating that. The word "category" is only used on Commons, so no translation is necessary there either. The same goes for "Image" or "File" since they are on Commons as well and not included in the wikitext regardless. The main thing (perhaps the only thing?) that will have to be translated is the interface of the script, as everything else is irrelevant as far as the code goes. I will get to this soon, but right now I am focusing on two other projects that are taking up the majority of my online time, but I have made a promise to get everything ready by the beginning of WLM in September, so I will definitely be in contact before then. Thanks for all the help you've provided so far!--Dudemanfellabra (talk) 12:51, 13 July 2014 (UTC)
My thought was to have the translations and the local config for templates and categories in a seperate file so that your base script can stay lean, and then load base script + config in some way. Agathoclea (talk) 09:13, 14 July 2014 (UTC)
Ah, I see what you mean now I think. I planned on keeping everything in one spot as much as possible if I can, so I'll start out just expanding the table at the top of the script to include a block for each language. If that becomes too unwieldy, maybe I'll split some stuff out, but the main thing I want to do is keep everything on one wiki.. not have a multitude of different files floating around in a million places if that's possible.--Dudemanfellabra (talk) 12:23, 14 July 2014 (UTC)

German version[edit]

Thanks, that will be interesting. I will try and look a litte bit closer tonicht, but so far I noticed two things. The editsummary is not crosswiki-safe and I have run into a possible script conflict again like at the beginnng. It gets stuck at "Checking for matches...". I will try and identify the culprit tonight. Agathoclea (talk) 08:38, 21 July 2014 (UTC)

The edit summary is cross-wiki safe.. it just hasn't been translated into German yet. (Want to help?) I made the script check if the content language is supported and if not, default to English. Once the German translation is complete, the edit summary will also be in German.
As for getting stuck, you you tell me which page it was on? It may be something with the page rather than another script.--Dudemanfellabra (talk) 09:25, 21 July 2014 (UTC)
"EditSummary":"[[en:User:Dudemanfellabra/AddCommonsCatLinks|Semi-automated]] addition of image(s) and/or commonscat link(s) to monument list",
should be
"EditSummary":"[[:en:User:Dudemanfellabra/AddCommonsCatLinks|Semi-automated]] addition of image(s) and/or commonscat link(s) to monument list",
as far as I see.
"EditSummary":"[[:en:User:Dudemanfellabra/AddCommonsCatLinks|Halbautomatisches]] hinzufügen von Bildern und/oder Commonskategorien zur Denkmalliste",
the umlaut might need encoding.
The page where I am stuck on is de:Liste der Baudenkmäler in Hof (Saale), but I have the same problem at the page you edited. Agathoclea (talk) 09:43, 21 July 2014 (UTC)
I added the missing colon to the edit summary (I also edited your comment above to keep the page from scrolling; hope you don't mind). That was just an oversight issue on my part. Thanks for the German translation of the edit summary, but in order to make it work, I need all of the GUI translated into German haha. The strings are I think pretty self-explanatory, and I plan on writing up some documentation for international support when I get time, but if you are willing to translate all of them, I have given you a space below. If you don't want to translate everything, don't feel forced to do so; I can surely find someone else that speaks German.
About the German list you get stuck on, it must be on your end; everything works fine for me, although I did not actually edit the page due to the edit summary thing you mentioned above. I didn't check any of your existing scripts on de-wiki, but if I get time to I will. Thanks for all the help!--Dudemanfellabra (talk) 10:53, 21 July 2014 (UTC)
 // The strings "ROWTEMPLATE", "NAME", "CATNAME", etc. should not be translated but can be moved around for better grammar.
 // These strings will be replaced by the relevant items during output.

 // text to be displayed in the button you click to start the script
        "ButtonText":"Check Commons for images and categories",
 // Error at the beginning of the script to catch templates that don't include the correct CSS class
        "RowMismatch":"Row mismatch! This is probably due to an incorrectly formatted row template. All row templates must include class='vcard' in order for this script to identify them. If {{ROWTEMPLATE}} does include class='vcard', please let me know at en:User_talk:Dudemanfellabra, and I will try to resolve the problem. The script will now exit itself. Sorry!",
 // self-explanatory
        "CheckingMatches":"Checking for matches...",
        "EditSummary":"[[:en:User:Dudemanfellabra/AddCommonsCatLinks|Halbautomatisches]] hinzufügen von Bildern und/oder Commonskategorien zur Denkmalliste",
        "NoneFound":"No matches found or selected. Script exited.",
        "Found":"Matches found!",
        "FollowingImages":"NAME matches the following images:",
 // asking to select either a matched image or a category; shouldn't include the words for "image" or "category"
        "SelectOne":"Select one to add:",
        "DontAddImage":"Do not add any image",
        "OtherSuggested":"Other suggested images for NAME from matched or existing categories:",
        "Suggested":"Suggested images for NAME from matched or existing categories:",
 // included with each suggested image showing which category it is a member of
        "From":"from CATNAME",
        "FollowingCats":"NAME matches the following categories:",
        "DontAddCat":"Do not add any category",
 // shown on the button
        "Done":"Done!<br>Editing page...",
        "SuccessfulEdit":"Done! Refresh the page to see the result!",
        "FailedEdit":"The edit query returned an error.",
        "LeavePage":"Are you sure you want to leave the page? All categories/files that you have added will not be saved!"

 // The strings "ROWTEMPLATE", "NAME", "CATNAME", etc. should not be translated but can be moved around for better grammar.
 // These strings will be replaced by the relevant items during output.

 // text to be displayed in the button you click to start the script
        "ButtonText":"Commons nach Bildern und Kategorien durchsuchen",
 // Error at the beginning of the script to catch templates that don't include the correct CSS class
        "RowMismatch":"Zeilenfehler! Dies kommt möglicherweise von einer falsch formatierten Zeilenvorlage. Alle Zeilenvorlagen müssen class='vcard' enthalten, damit das Skript sie identifizieren kann. Sollte {{ROWTEMPLATE}} class='vcard' beinhalten, bitte ich um eine Nachricht auf :en:User_talk:Dudemanfellabra, und ich werde versuchen, das Problem zu beheben. Das Skript wird jetzt beendet.",
 // self-explanatory
        "CheckingMatches":"Nach Übereinstimmungen suchen ...",
        "EditSummary":"[[:en:User:Dudemanfellabra/AddCommonsCatLinks|Halbautomatisches]] Hinzufügen von Bildern und/oder Commons-Kategorien zur Denkmalliste",
        "NoneFound":"Keine Übereinstimmungen gefunden oder selektiert. Das Skript wird jetzt beendet.",
        "Found":"Übereinstimmungen gefunden!",
        "FollowingImages":"NAME stimmt mit folgenden Bildern überein:",
 // asking to select either a matched image or a category; shouldn't include the words for "image" or "category"
        "SelectOne":"Zum Hinzufügen auswählen:",
        "DontAddImage":"Kein Bild hinzufügen",
        "OtherSuggested":"Andere mögliche Bilder für NAME aus der gefundenen oder bereits existierenden Kategorie:",
        "Suggested":"Mögliche Bilder für NAME aus der gefundenen oder bereits existierenden Kategorie:",
 // included with each suggested image showing which category it is a member of
        "From":"aus CATNAME",
        "FollowingCats":"NAME passt auf folgende Kategorien:",
        "DontAddCat":"Keine Kategorie hinzufügen",
 // shown on the button
        "Done":"Fast fertig!<br>Artikel wird bearbeitet ...",
        "SuccessfulEdit":"Fertig! Seite neu laden, um das Ergebnis anzusehen!",
        "FailedEdit":"Die Bearbeitung ist fehlgeschlagen.",
        "LeavePage":"Bist du sicher, dass du die Seite verlassen möchtest? Die ausgewählten Kategorien und Bilder werden nicht gespeichert!"

Ususal disclaimer about Umlauts. I will ask for someone else to have a look over as well. Agathoclea (talk) 11:55, 21 July 2014 (UTC)

The error was one of the gadgets on the German site. Will have to find out which. Agathoclea (talk) 12:16, 21 July 2014 (UTC)

I am stuck with de:Liste der denkmalgeschützten Objekte in Wien/Floridsdorf and others from de:Benutzer:ErfgoedBot/Denkmal Österreich missing commons category links despite this change. I have two scratchpads over there de:Benutzer:Agathoclea/scratchpad and de:Benutzer:Agathoclea/Vorlagentest the latter containing a copy of the template. Agathoclea (talk) 07:08, 22 July 2014 (UTC)

Try now.--Dudemanfellabra (talk) 07:22, 22 July 2014 (UTC)
perfect. Agathoclea (talk) 07:45, 22 July 2014 (UTC)

de:Liste der Baudenkmäler in Bad Windsheim causes the script to freeze. Agathoclea (talk) 11:58, 22 July 2014 (UTC)

the problem was a duplicate entry: solved here. I have a copy in my scratchpad Agathoclea (talk) 12:51, 22 July 2014 (UTC)
A duplicate entry should not have caused an error. I just ran it on your scratchpad without an error.. Are you sure it wasn't something else? Did it freeze on multiple trials or only once? If it froze once, it could have just been a freak internet connection thing. In fact, all items on the list could be exactly the same, and nothing should break... Strange.--Dudemanfellabra (talk) 13:04, 22 July 2014 (UTC)
Only thing I can say that after removal it worked in my scratchpad. After readding it it still works so it must have been an unprintable char somewhere in that duplicate. Agathoclea (talk)

I found a couple more lists: de:Vorlage:Denkmalliste Slowakei Tabellenzeile / commons:Category:Cultural heritage monuments in Slovakia with known IDs and :de:Vorlage:Denkmalliste Südtirol Tabellenzeile]] / commons:Cultural heritage monuments in South Tyrol with known IDs

Yea, I haven't added support for all of them yet. I'm working my way down this list, and it's sorted in alphabetical order of the region code of the register ('it'[Italy] for South Tyrol), not the language code ('de'). I've made it through 'es','es' (Spain in Spanish), and South Tyrol in German is 'it-bz','de'. I'll eventually get down to it. There's also {{Denkmalliste Malta Tabellenzeile}}, {{Denkmalliste Slowakei Tabellenzeile}}, and {{WLPA-AT-Zeile}}. In order to add support for each template, I have to actually visit the template and sometimes the lists on which it is transcluded and figure out which parameters are used for the name, the image, the commonscat, the id, and if the ID used in the row template matches the format of the sortkey on Commons. It's a bit of work, especially when the language is something like Arabic or armenian that uses a different script. I can pretty much pick out the parameters in any language that uses Latin characters, and I'm decent at Cyrillic ones (e.g. Russian), but the point is, it's a bit of a slow process. Be patient with me :).--Dudemanfellabra (talk) 07:17, 23 July 2014 (UTC)


see this comment from @Samar: which might explain the missing id's you have been asking about. Agathoclea (talk) 10:54, 22 July 2014 (UTC)

Where do these IDs come from? I was under the impression they came directly from the Pakistani government or some other official source, akin to listed building numbers or US NRHP reference numbers. Are they just completely made up? The problem I have with changing them is that there are many items tagged on Commons with the old numbers, and if you change them here, they should also be changed there. In the mean time, my script and more importantly ErfgoedBot won't give sensible output for Pakistan.--Dudemanfellabra (talk) 13:07, 22 July 2014 (UTC)

Madison County[edit]

I'm sorry: I completely forgot about the list! I know that I should do that (look at my edits to the list after rearranging the Cincinnati OH lists), so I should have remembered. Nyttend (talk) 04:27, 28 April 2014 (UTC)

And here's something I simply can't remember how to handle. The Cumberland Gap National Historical Park is in three different states, and it's long been properly listed on the Bell KY, Claiborne TN, and Lee VA lists. I've just added it to the Harlan KY list, since the KY portion plainly isn't all in Bell County. As well, I've updated the state list: I increased Harlan County's total by one, increased the duplications by one, and added the NHP to the list of duplicates in the citation. Do I need to do anything more? Nyttend (talk) 01:43, 29 April 2014 (UTC)
I think that should be it, at least as far as my stuff is concerned. When I rerun the bot, it should update the duplicates for the Progress page. Thanks for letting me know.--Dudemanfellabra (talk) 04:17, 29 April 2014 (UTC)

Another issue with the NRHPstats script[edit]

The NRHPstats script is reporting two untagged articles in Koochiching County, Minnesota, even though there's only one. I suspect this has something to do with the duplicate link in the list, as two entries link to the tagged Grand Mound (Minnesota). Could you look into what's going on here? TheCatalyst31 ReactionCreation 01:02, 29 April 2014 (UTC)

I only get one duplicate shown on my side.. not sure what's going on for you. Either way, I do plan on updating the NRHPstats script to use the new method I use for the Progress script.. I just haven't had time to get to it. I've been busy with school and will remain so for the rest of the week (after which I will have my Masters.. woo!), so after then, I should have much more time to devote to updating/maintaining everything. Thanks for letting me know.--Dudemanfellabra (talk) 04:19, 29 April 2014 (UTC)
Huh. I'm still seeing two duplicates, and purging and null editing don't seem to make the problem go away. It doesn't seem to be affecting the progress page, though, so hopefully it's just a temporary error of some sort. Congratulations on your Masters! TheCatalyst31 ReactionCreation 07:23, 29 April 2014 (UTC)
Hmm I have no clue. Maybe it's a browser thing? Anyway, I won't spend time trying to figure it out.. I'll just use the new method and see if that resolves the problem. I'll look into it after this week.--Dudemanfellabra (talk) 18:16, 29 April 2014 (UTC)
@TheCatalyst31: I just updated the NRHPstats script to use the new method, and I show 1 untagged article on that list. Did the change fix it for you as well? Let me know if you find anything weird with the new method because I haven't really tested it that much. The heart of the code that gathers the stats should all be fine, but it's possible that some tables might be skipped or duplicated or something like that since I extended it to find multiple tables on a page. I don't expect any problems, but just keep an eye out since you are so good at finding my mistakes haha.--Dudemanfellabra (talk) 19:15, 6 May 2014 (UTC)
It looks fine now. I'll tell you if anything else unusual comes up. TheCatalyst31 ReactionCreation 20:09, 6 May 2014 (UTC)


Just wanted to offer my compliments on your recent change in status from graduate student to ... graduate? Anyway, congratulations regardless of title. dm (talk) 07:04, 3 May 2014 (UTC)

Thanks! Haha I'm still a graduate student I guess.. only have my Masters.. still have to get the Ph.D!--Dudemanfellabra (talk) 17:33, 6 May 2014 (UTC)

National Monuments of Ireland[edit]

I am a member of the planning committee for Wiki Love Monuments-Ireland 2014. As part of the contest I am compiling a list of National Monuments in Ireland and I came across your page List of National Monuments of Ireland I was curious where you obtained this list and if you had to ask for permission to use it. Any help you can provide would be appreciated.

Sameichel (talk) 08:59, 13 May 2014 (UTC)

The list comes from the reference listed at the bottom of the page, here, which is freely available to anyone. I haven't touched it in a while, though, so there may have been changes since I last looked. If WLM is going to include National Monuments of Ireland, it might be good to make {{NMI list item}} recognizable by User:ErfgoedBot so that a category can be created here that can be automatically populated when people upload images during WLM.--Dudemanfellabra (talk) 20:11, 14 May 2014 (UTC)

Tech barnstar[edit]

Barnstar - technical works.svg The Technical Barnstar
For writing the NRHP-list renumbering script, which has just made my life so much easier._

Daniel Case (talk) 22:58, 3 June 2014 (UTC)

NRHP stats script and "special" page[edit]

I don't know if you've noticed this, but the stats script tries to run when you either create a "National Register of Historic Places listings" page, or when you look at a special page (such as the "Related changes" page) based on one. It's a minor thing (the error popup needs to be dismissed), dunno how much work it is to account for those sorts of cases.

I also added some rows to WP:NRHPPROGRESS that you might double-check that I didn't miss anything (I also added an entry to the switch on the duplicates page). Magic♪piano 16:38, 4 June 2014 (UTC)

I hadn't realized that NRHPstats tried to run on pages other than the mainspace one. I see why and will fix that in the script when I get time. Also thanks for letting me know that you split out that county into multiple pages. The duplicates page is entirely script-generated, so your addition would have been erased on the next run. I'll have to add into my code this split as well. Everything on your side looks fine at first glance, so after I update my side, everything should work fine! Thanks again!--Dudemanfellabra (talk) 09:45, 5 June 2014 (UTC)
That's good; I expected the duplicates row to be overwritten, but noticed it was needed to avoid errors in the interim. Magic♪piano 17:26, 5 June 2014 (UTC)
Script ran today and filled out a table for the duplicate in that county. Everything else seemed to work fine, so great!--Dudemanfellabra (talk) 12:20, 6 June 2014 (UTC)

Another NRHP stats buglet[edit]

While I'm here :) I have another apparent buglet. National Register of Historic Places listings in Hillsborough County, New Hampshire is shown by the stats script to have 100 listings imaged. However, there are actually 101 images (only Hillsborough Mills and New England Glassworks lack images). I suspect the regexp is failing to match one the image filenames (maybe "---File---lyndeboroughtownhall.JPG"?). Magic♪piano 17:26, 5 June 2014 (UTC)

Thanks for pointing that out. The image you pointed out was the offending one. I changed the method to find images to a method I was using in another script, and it should be fixed now. Maybe when the Progress script is run again it will find some other like this? Let's see!--Dudemanfellabra (talk) 01:43, 6 June 2014 (UTC)
Ran the script today, and the numbers didn't change drastically. They did increase but not more than to be expected with a week of additions since the last update. Either way, the script is more accurate now thanks to you pointing that out. Thanks again!--Dudemanfellabra (talk) 12:19, 6 June 2014 (UTC)

Semi-automated addition of image(s) and/or commonscat link(s) to monument list[edit]

Hi, I just noticed your edit to Grade II* listed buildings in Sedgemoor and the edit summary "Semi-automated addition of image(s) and/or commonscat link(s) to monument list". I think this could be really useful (although I don't understand the code which makes it work). Is it possible for other people to use the script? If not could you run it on all of the sublists of Grade I listed buildings in Somerset and Grade II* listed buildings in Somerset as I'm sure there are others with categories on commons which are not linked - but I can't find them.— Rod talk 10:00, 7 June 2014 (UTC)

@Rodw: Yes, others can use the script. I've been working on it for the past month or so, and it is still a work in progress (just today I added some new features), but feel free to use it if you'd like. To install it, simply add the line
to your javascript and visit a page of listed buildings. It will also work on many other registers around the world if you are interested in helping to add links there as well. Since the script is being used more and more (I think the last count was four people having it installed--five if you decide to do so), I guess it's time for me to write up some documentation on how it works, so I will do that shortly at User:Dudemanfellabra/AddCommonsCatLinks. For now, all you really need to know is that it adds a button at the top of any of these lists that when clicked checks Commons for categories and images that match the IDs in the tables. It then shows you the matches and allows you to choose which ones you want to add, if any, and automatically edits the page to add them in. If you have any questions or trouble using the script, feel free to comment here and ask!--Dudemanfellabra (talk) 12:02, 7 June 2014 (UTC)
Thanks - installed and working with no problems. For this years WLM in the UK we are discussing adding Scheduled Ancient Monuments and a few other types of heritage sites listed by English Heritage. Is the script likely to deal with them as well?— Rod talk 12:18, 7 June 2014 (UTC)
Can I ask what may be a silly question... Is it possible to make it work the other way so that if the EH number is included in the list the script adds the template (eg Template:Listed building England) to the image or category on commons?— Rod talk 12:43, 7 June 2014 (UTC)
I have just now created the documentation I linked above, though I still have some work to do to fill out the table of supported registers. In order for Scheduled Ancient Monuments to be supported by this script, the entire framework discussed in the documentation must be set up. There must be some top level category in which the script can look, a row template in each of the lists, and a unique ID for each site on the register. If all of this is set up already (I haven't looked), it is straightforward to add support for this register. If not, the lists must be converted first before this script can be used on them.
As for the "backwards" use of this script, that is a little more tricky. I haven't thought of doing that, but it might be possible. I'm not sure that I would want to add it to this script, though, as this is intended to be a Commons-to-en-wiki script where we take the files/categories that have been identified on Commons and add them here, not the other way around. I might look into creating a separate script for that, though, if it is feasibly possible. I haven't tried editing Commons from the en Wikipedia, so I might have to make the script run on Commons in order to get it to work. I'll get back to you on that.--Dudemanfellabra (talk) 13:20, 7 June 2014 (UTC)
As far as categories go do you mean something like Category:Scheduled Ancient Monuments in England? There are some lists eg List of Scheduled Monuments in Greater Manchester, but that doesn't use the row templates used for listed buildings - personally I'm waiting for this to be set up as part of WLM which had a largely automated process from EH lists (excel exports of everything on National Heritage List for England). I think the types of monuments to be included will be discussed at the planning meeting but may include sites on Register of Historic Parks and Gardens of special historic interest in England, Registered Battlefields (UK), List of designations under the Protection of Wrecks Act etc. There was discussion of including Grade II listed buildings - but I think the conclusion was there are just too many of them.— Rod talk 13:31, 7 June 2014 (UTC)
I mean a category on Commons like the one for listed buildings in England–commons:Category:Listed buildings in England with known IDs–which is set by commons:Template:Listed building England. The important part is that the template gives each member of the category a unique sortkey equal to the ID of the site (for listed buildings, that's the EH number). I wasn't aware of any automated system of converting lists to use row templates (that's awesome), but yes, they would need to be converted before these registers could be added to the script. Basically if they are compatible with WLM and the Commons monuments database, they should be able to be added to this script.--Dudemanfellabra (talk) 14:10, 7 June 2014 (UTC)
Right - I'm now getting out of my depth on the technical side. I din't do the creation of the lists last year (I just spent hours tidying them up & then tacking some photos etc). The people who managed the process are given at the 2013 list under steering committee including User talk:Nev1, User:Katie Chan (WMUK) and User:HJ Mitchell. I suspect they would be able to explain the process much better than I could and will be involved again this year, so may be able to build in the required categories etc.— Rod talk 14:27, 7 June 2014 (UTC)

──────────────────────────────────────────────────────────────────────────────────────────────────── Just for the sake of information, I have now completed the table at User:Dudemanfellabra/AddCommonsCatLinks#Supported registers to include the row templates, the commons templates, and the commons categories that are used to allow compatibility with this script. I think the examples there can explain the requirements more clearly. In order for Scheduled Monuments and these other registers to be supported, they need to have all of these templates/categories set up.--Dudemanfellabra (talk) 06:12, 8 June 2014 (UTC)

Commonscat for Florida[edit]

Thanks for the marvy new tool! I've gone through all the Florida lists (I see you've done at least some). Now to add that NRHP template to all the categories on Commons that don't have them already. 'Cause not only was I a categorizing fool, others also did categorizing of my photos without me knowing. Oh joy. :) I think I'll add the proper code to the Florida NHL list, so that can have links added too. Cheers! --Ebyabe talk - Border Town ‖ 14:28, 11 June 2014 (UTC)

Hm, think I'll put off the NHL. Code is significantly different. Don't want to mess with that right now. On to other stuff, then. :) --Ebyabe talk - Union of Opposites ‖ 14:32, 11 June 2014 (UTC)
Glad to see you had no trouble installing/using it. I've been working on it for the past month or so and it's still a work in progress. Just yesterday I fixed a bug with commented out rows. Since you have it installed with importScript, though, all updates should immediately go into effect for you. I do see on your JavaScript file, though, that you have some other code that looks like User:Dudemanfellabra/ReorderNRHPlist.js--in fact like an old version of it. Feel free to keep that there, but if you want to be able to use the newest version, you can replace all that other code with
Updates since the version you copied include better handling of commented out rows and a smarter way to determine if the button should be placed or not (before, the script would place it on talk pages, special pages, etc.). It still works the same way and looks the same, but under the hood it's a little smarter. Just a suggestion.. like I said, feel free to keep the old version if you want to.
As for the NHL lists, they couldn't be supported by the script unless they were converted to use table rows like the regular lists use {{NRHP row}} (see the script documentation). The lists look like it wouldn't take too much effort to straight-forwardly convert them to use the NRHP row template as it is instead of creating a new one (perhaps I can script that?), but if a new one is needed, I would suggest the name {{NHL row}}. An additional benefit to converting these to use row templates is compatibility with Wiki Loves Monuments, coming up later this year. I'll bring this up at the project talk page and see what people have to say.--Dudemanfellabra (talk) 01:37, 12 June 2014 (UTC)

Help, please?[edit]

Hi. I've been writing a template {{Address restricted}}. I have it almost done, but I've run into a problem that has me stumped - probably because I'm being very clumsy with parameters. I wonder if you could take a few minutes to help me troubleshoot? Let me know if you're willing, and I'll explain the problem more fully at Template talk:Address restricted. Thanks. — Ipoellet (talk) 03:04, 24 June 2014 (UTC)

Sure, I'm willing to help if I can. I tried looking through your contributions and the template code to figure out what the problem is, but I can't seem to find anything wrong. Everything seems to be working like I would expect it to. I watched the template, though, so if you post something on the talk page, I'll see it. I'm also fine with you just posting here. Whatever is easier for you.--Dudemanfellabra (talk) 05:19, 24 June 2014 (UTC)
Thank you very much. I've put the description of the problem up on the talk page. — Ipoellet (talk) 00:59, 25 June 2014 (UTC)
Your fix is working perfectly. Here's something you richly deserve:
Vitruvian Barnstar.png The da Vinci Barnstar
Not just for technical skills that are in short supply around here and an even, friendly nature that is sometimes very much needed, both of which are worthy of multiple barnstars on their own: but also for being instantly willing to help out a floundering noob who needed it. You are an incredibly valuable Wikipedian. — Ipoellet (talk) 03:21, 27 June 2014 (UTC)
@Ipoellet: Thanks for that! On an unrelated note, I see you just made this edit. While I don't disagree with the edit, I just wanted to let you know that that page is updated by a bot, and your italics will be overwritten when it next runs. Sorry to make all that work go for naught :\.--Dudemanfellabra (talk) 04:05, 27 June 2014 (UTC)
Ah, well. I should have been spending my time other ways anyhow... But thanks for the heads-up - I would have been annoyed to see that "someone" had come along and undone it. — Ipoellet (talk) 04:09, 27 June 2014 (UTC)

Unleash the bot?[edit]

When you get back from your exotic trip, would you be able to submit a request for the bot to do a new task? I've always been annoyed that "National Register of Historic Places in [placename]" isn't a valid link, especially since that's the format used by the categories. Could you request permission for the bot to mass-create redirects? I was thinking that "National Register of Historic Places in PLACE" should redirect to a county list if it exists as a separate page, or if it is itself a redirect, it should instead redirect to the correctly-named page's target. For example, the bot would create National Register of Historic Places in Lauderdale County, Alabama as a redirect to National Register of Historic Places listings in Lauderdale County, Alabama, while it would create National Register of Historic Places in Wabash County, Illinois as a redirect to the current target of National Register of Historic Places listings in Wabash County, Illinois. Nyttend (talk) 02:14, 2 July 2014 (UTC)

I would support the idea of creating all these redirects, but in order to get approval for a new bot task, there needs to be clear consensus. I would suggest opening up a thread at WT:NRHP and letting people comment for the next few days until I get back.--Dudemanfellabra (talk) 07:06, 3 July 2014 (UTC)
If you're back, you might want to check in at WT:NRHP; four people responded within twenty-five hours (and nobody since then), and everyone's supported the idea. I didn't start the discussion immediately, by the way, since I was on a shorter trip that saw me in Illinois for three days. Maybe it wasn't such a good idea to go on this trip on 4 July; the Putnam County Courthouse (Illinois) and the Morgan County Courthouse (Illinois), among other places, will "forever" be remembered on Wikipedia by the rock band playing on the steps and the Kiwanis parade out in front on the street, respectively. Nyttend (talk) 04:25, 11 July 2014 (UTC)
Seeing no objections, I've opened the bot request.--Dudemanfellabra (talk) 06:24, 11 July 2014 (UTC)
Thanks a lot! For your information, the bot is a bot; see its userrights lot for confirmation. Nyttend (talk) 12:00, 11 July 2014 (UTC)
So why are its edits not marked with a b? Maybe I need to do something in my code to make that happen? I'll look into it.--Dudemanfellabra (talk) 13:18, 11 July 2014 (UTC)
I think I figured it out.--Dudemanfellabra (talk) 03:00, 12 July 2014 (UTC)
I guess my "fix" wasn't actually a fix since the bot's edits are still not marked with a b. I'll try to figure that out later. Anyway, the bot has now run, and all the redirects have been created. Let me know if you spot any errors, but they would probably be easier fixed manually anyway.--Dudemanfellabra (talk) 06:58, 17 July 2014 (UTC)

BAGBot: Your bot request NationalRegisterBot 2[edit]

Someone has marked Wikipedia:Bots/Requests for approval/NationalRegisterBot 2 as needing your input. Please visit that page to reply to the requests. Thanks! AnomieBOT 03:34, 16 July 2014 (UTC) To opt out of these notifications, place {{bots|optout=operatorassistanceneeded}} anywhere on this page.

Wrong "semi-automated" pic[edit]

Hi. An image is being repeatedly added in error to Grade I listed buildings in Exeter - you are one of the users concerned. Please see Talk:Grade I listed buildings in Exeter#Wrong pic for Presentation of St Mary Convent School, and could one of you stop this semi-automated process from doing it again? Thanks very much - Aegoceras (talk) 10:25, 16 July 2014 (UTC)

Responded on the talk page. Thanks for pointing that out!--Dudemanfellabra (talk) 11:24, 16 July 2014 (UTC)
P.S. ErfgoedBot has in the past done some tagging accourding to list entries.But only some specific lists but the code is open now so there might be an oportunity to add it in there. Agathoclea (talk) 16:52, 16 July 2014 (UTC)
Bad memory - it was categories that the bot is setting. Agathoclea (talk) 20:47, 16 July 2014 (UTC)
Ah, oh well. I like starting all my code from scratch anyway. I was thinking about distance between two points given coordinates last night a little bit, and it's going to be a little tougher than I thought since the distance between two lines of longitude changes with latitude and everything is on the surface of a sphere.. Someone has probably already figured it out and has a nice little Javascript routine to do it, but I'm stubborn and have two degrees in physics haha, so if I don't figure it out by myself, my pride will be hurt :P.--Dudemanfellabra (talk) 04:34, 17 July 2014 (UTC)


Your recent bot request at Wikipedia:Bots/Requests for approval/NationalRegisterBot 2 has been approved, please see the page. The BAGBot may come and let you know as well. — xaosflux Talk 01:42, 17 July 2014 (UTC)

Thanks! I'll run the task later today after I update the code to actually edit the pages.--Dudemanfellabra (talk) 04:31, 17 July 2014 (UTC)
Thanks so much for the work! Nyttend (talk) 01:38, 18 July 2014 (UTC)

An NRHP refnum and a different NHL number[edit]

I've been going through the Ohio table in the sandbox, and have noticed a few properties that have one number from NRHP, and a newer number when it became an NHL. Since these are NHL tables, should the refnum in the table be the NHL number? Currently, your script has plucked the older NRHP numbers to populate the table. I can make the corrections, just wanted to make sure it was the right thing to do that would not cause problems down the road. I temporarily stuck the nhl number in the description field, I'll clean that up before I move the sandbox table to live. Generic1139 (talk) 20:32, 17 July 2014 (UTC)

Generic1139, what articles are those? The situation's confusing with the Mariemont HD/Village of Mariemont (apparently the NHL boundaries aren't quite the same as the original NR HD boundaries), and as I can't think of any others, I'm left wondering if the different-boundaries thing is true for the other properties you're talking about. Nyttend (talk) 01:39, 18 July 2014 (UTC)
Both refnums can go in the refnum field, separated by a comma. Only the first one will be displayed for the reader, but the other(s) are picked up by bots and scripts, so it's good to include all of them. As for which one to display, the NRHP row documentation says to include the oldest one first (usually the NRHP reference number), but I think we may need to make a "Special case 3" for NHLs. Since this is a list of NHL designations, I would think it more appropriate to display the NHL reference number, so it should go first with the regular NRHP one(s) following it. That's what I've been doing as I've moved out the states I've worked on, I guess without consensus haha. Oops.--Dudemanfellabra (talk) 03:36, 18 July 2014 (UTC)
Yes, there is Village of Mariemont, and also John P. Parker House. I'll put both numbers in the refnum field, placing the one associated with the NHL first. I was unable to find the nrhp nomination form for Parker, even in the Ohio web sites, the NHL form is available. — Preceding unsigned comment added by Generic1139 (talkcontribs) 06:19, 18 July 2014 (UTC)
Ohio is one of the worst states for online documentation; essentially nothing is online through NPS, except for the NHL nominations, and nothing at all is online through the SHPO website. I agree with putting the NHL refnum first. Nyttend (talk) 21:35, 18 July 2014 (UTC)


Hi Dudemanfellabra, great work. Thanks a lot. I ran across because of the change in Vorlage:Denkmalliste Österreich Tabellenzeile. I feel this script will help a lot to accelerate work. I added your script to act as some kind of beta tester. My first try looks good.

2 questions (at the moment):

  • would it be possible to respect given order of template arguments? (not to move e.g. |File= to another place?). Of course one could live with that, but it makes the structure more heterogeneous.
  • one big problem is the creation of new Commons categories if there are a lot of files for the same object. Although it's not difficult, it is annoying as not everybody does it. Would it be in the scope of your script, to offer an additional feature to create a commons category on the flight (you have to enter the name and do the categorization of the new category), if there are more than n images with the same ID (n configurable per template) and put all those images + the ID template to the cat created? And of course, add the created cat to the list? What do you think?

The script is not so useful, when lists are already completed. You have to find the right lists with missing images and run your script. It is more useful, when lists are at the beginning and mostly empty. As far as I understand, new types of lists (e.g. for WLE) have to match some preconditions (a template for the row, an ID, a template for the image/category on commons taking the ID) and have to be configured in your configuration data. Right?

BTW: What is the intent and the schedule? Is this an offer for experienced users, will it be activated for all users or will it operate automatically during competition times (with all the pros & cons).

The process during competitions at least for the Austrian cultural heritage monuments (WLM) is that new and inexperienced users upload their contributions through the campaign-configured Upload-Wizard. They expect their images to show up in the lists, which only happens after manual back-office work at the moment. Could your script be used to automatically add an image to the list? If a user uploads more than one image in a single upload, she has to chose of course. There is a tradeoff, if she uploads images for more than one object in the same list, which will then cause an edit for each row an images is added.

kind regards --Herzi Pinki (talk) 08:23, 22 July 2014 (UTC)

try de:Liste der denkmalgeschützten Objekte in Naarn im Machlande and de:Liste der denkmalgeschützten Objekte in Hainfeld (Niederösterreich) which I skipped in my earlier run. The first I skipped because there is only one image and the category name needs looking at the second the category was not exactly the object. But good enaugh to see how it works. Anyway you can do a lot of testing on de:Benutzer:Multichill/Unused_Denkmal_Österreich  :-) Agathoclea (talk) 08:53, 22 July 2014 (UTC)
(edit conflict) Thanks for adding the script as a tester! The script started as a companion to User:ErfgoedBot's output (many are linked from the script's documentation, but the main one I started with was the US NRHP). That output was set up during WLM to assist those new users of whom you speak by making it easier for more experienced users to add the images that had been uploaded to the lists. While the bot output was very helpful in organizing what needed to go where, it became quite tedious to go through the bot output, load each page, find each row, and add the relevant category or image. The backlog grew, and many images would take days or weeks to be added. I set out to make that process faster by making the script find the images directly and do all the wikitext editing, although one still has to visit the relevant page missing images/categories and manually run the script.
The script has grown out from the US NRHP to include all registers supported by ErgoedBot on the English Wikipedia and has just begun to incorporate registers on non-English Wikipedias, like what you found on de-wiki. I haven't given much thought to enabling the script for everyone, and I would suppose there would need to be much discussion for that to occur, but I am open to the idea. I could imagine a new user clicking the upload link, uploading the file, and then immediately (though manually) running the script to add the image to the list (although some may oppose that notion because it eliminates the "check" that experienced users have currently). I'm not sure if it could be made to run automatically since it is written in JavaScript, but if that is an option, I am open to it.
The script was not intended to run on "completed" lists, but ones for which people were actively uploading images and creating categories. While I agree that it is kind of useless on these completed lists, I think departing from the script's original intent isn't where I really want to go; I would rather keep the script as lean as possible. I do plan on writing another script that tags images/categories on commons based on what is in the lists already, so if/when I write that, I may look into creating commons categories on the fly and other helpful tasks, but no promises haha.
As for the order of the template arguments, I suppose it might be technically possible to keep everything in order, but I really don't think it's necessary. The order of the arguments in the wikitext does not change the physical output the end user sees, so there is really no need to have a set order. The easiest/shortest way I could find to add the arguments was to just delete them if they were already present and tack the new ones onto the end of the template. This is true because sometimes the argument (e.g. "|commonscat=" is not present at all, so doing a kind of "replace" call would fail, and the new argument would almost have to be tacked onto the end of the template, unless I wanted to hard-code in the "preferred" order of arguments for each template. Some templates may want the image parameter at the top, some at the bottom, some somewhere in the middle but only if this parameter is there and if this other parameter is there, it needs to go directly below that one and on and on and on... That's not something I really want to dedicate a massive amount of time to doing, especially given the extremely marginal benefit of doing it.
Thanks again for using the script, and be sure to let me know if you find any errors. I'm slowly expanding support for more registers, and I am happy to include more if requested. Also if you or anyone you know could be of assistance in translating the GUI to languages besides English (and German, as it has already been translated by another user), please send them to me. I would like to make the script as universal as possible, and translation is a big key to making that a reality. Thanks again!--Dudemanfellabra (talk) 09:07, 22 July 2014 (UTC)

some minor remarks on the L10N stuff for German:

  • Halbautomatisches hinzufügen von Bildern und/oder Commonskategorien zur Denkmalliste → Halbautomatisches Hinzufügen von Bildern und/oder Commonskategorien zur Denkmalliste
  • Denkmalliste → Liste ? (it is not always a list of monuments, but it could be used for a bundle of different lists, so maybe it is better to abstract from the concrete list type.)
  • ... → …
  • Bist du sicher dass du die Seite verlassen möchtest? → Bist du sicher, dass du die Seite verlassen möchtest? (needs a comma)
  • The text for NoneFound is a bit irritating. The page has to be reloaded to get rid of the message. In German this means that Nach Übereinstimmungen suchen ... Keine Übereinstimmungen gefunden oder selektiert. Das Skript wird jetzt beendet. keeps me waiting for something to happen. It would be better to change: Nach Übereinstimmungen suchen ... Keine Übereinstimmungen gefunden oder selektiert. Das Skript wurde beendet. It is ok in the English version.

--Herzi Pinki (talk) 09:13, 22 July 2014 (UTC)

Hi Dudemanfellabra, I understand your issue on the order of template arguments. It is tedious to implement. It just makes it harder to find the argument when editing the stuff manually (which I do a lot at the moment). You will never get all that you want. :-) Thanks for asking for help with translation, but I'm afraid, I'm not good enough in other languages other than German and partly English. But what still needs to be done is the translation of the description. If this is getting stable, you can contact me. And finally the script needs a place in some more common namespace and maybe WP. --Herzi Pinki (talk) 09:35, 22 July 2014 (UTC)

Another two issues:

  • Commonscategories can describe more than one object (e.g. when they are closely related, a palace and the park or a chapel and a cross on the same cemetery), while objects in the monument lists reflect the structure of the data provider (who separates things differently). There is no 1:1 relation. Have a look at commons:Category:Cemetery_Rohrbach_an_der_Gölsen, which is the category for a cemetery containing three protected objects. It should be offered as commonscat for all three entries, not only for one of them.
  • Would it be possible to have a final Do it / Cancel button after all the selection work is done and before you really edit the file? Could save some undos later. Maybe it's even better to have the cancel button from the very beginning. regards --Herzi Pinki (talk) 09:50, 22 July 2014 (UTC)
the first is impossible as technically there is only one sortkey and mediawiki selects one at seemingly random. When we discussed that a while back the idea of a botrun finding those images and categories. As far as an abort button is concerned I second the idea but would also have the abort/save_now option with every selection. Sometimes you run into a very large page with a lot of images to choose from and then it is better to have the option to take a break. Another issue also Erfoedbot is struggling with is the tendency to split up listings in components but keeping one id. Therefore pictures that are already included will again be flagged for the other components. Agathoclea (talk) 10:24, 22 July 2014 (UTC)
Hi Agathoclea, what do you mean with impossible? See my example and you know it is possible. Maybe it's complicate to solve, not worth to be solved. Maybe there are missing interfaces, but the problem exists. Do not like the word impossible in technical context. Except a few things that are proven to be impossible (e.g. solve NP-problems in linear time), it is always a judgement between effort and value of a feature and if someone is willing to spent the effort (In the end this is an I don't want and not an impossible).
Maybe I do not understand your technical reasoning, if I understand it correctly, it is an error in modelling. I suppose you mean the ID is what you call sortkey? Category:ID is a n:m relation, as the same id can be used for different categories and one category can have different IDs. It was decided in the very beginning of the WLM project (sorry German, towards the end), that there is not a 1:1 relationship between object (ID) and commonscat. --Herzi Pinki (talk) 12:03, 22 July 2014 (UTC)
  • I have edited the German text with most of your suggestions. Thanks for that. I left the text as Denkmalliste rather than just Liste since I plan to keep this restricted to monument lists. I also don't really like the ellipsis haha, so I kept the three dots.
  • I would love to be able to translate the documentation, but I am putting more emphasis on the GUI at the moment. If we can get the GUI translated into all the supported languages, then we can think about translating the documentation.
  • What Agathoclea means when he says it's impossible for a category to have more than one ID is rooted in how the script works. The templates which are used to tag categories and images on Commons do so by inserting a sortkey into the relevant category. This is similar to the {{DEFAULTSORT}} keyword (or whatever the equivalent is on other wikis). It is how the cat/image is sorted in the tracker category. For example, if I place a template that says "This is an NRHP with refnum 12345678", that cat/image is added to category:NRHP with known IDs and set to sort by " 12345678". If another template is placed on the same page, the last one takes precedent and overwrites the previous one(s). A category can only have one sortkey because it can only show up in the list of subcats once. If we were to sort it as both 12345678 and, say, 87654321, it would have to show up in the 1's section as well as the 8's section, and that's just not possible. The way my script works is to query the tracker category (e.g. NRHP with known IDs) and find all subcats/images that have a sortkey which matches the current table row. Because there is only one sortkey, only one ID can be applied to a single cat/image. There's no way around it without a total restructuring of the code, and I don't even see how any code could do what you want it to do, short of downloading the entirety of the wikitext of all the Commons pages in the category and systematically extracting templates from each one. That would take way too much time and would not provide a good experience for the user.
  • I will see what I can do about adding an abort button. Maybe I will include a "review your choices" menu at the end of the script also and allow the user to confirm all or select ones to cancel. I will see if this is possible, but for the time being, I am going to just keep adding more registers. Once I finish the list of ErfgoedBot supported registers (and a few other things I am working on that are not related to this), I will take a look at other features like this. Thanks for that suggestion though. I do like it!--Dudemanfellabra (talk) 13:21, 22 July 2014 (UTC)
Hi Dudemanfellabra, thanks for your explanation on the sortkey stuff. Now I understand. All the stuff about sortkey. And as you argued that total restructuring of the code would be necessary. One idea to solve this is to create hidden red links containing the ID from the templates on commons in a systematic way (a simple change in some templates), which will allow to find via 'what links here' all images and categories containing that ID. Such a red link would also help users to collect all the images with the same id even without having a category and without using external tools, purely based on Mediawiki software. --Herzi Pinki (talk) 07:37, 23 July 2014 (UTC)
That is a great idea actually! I hadn't thought about that! Then I could just query whatlinkshere of the redlink and it wouldn't matter if more than one template was on one page. This would need to be discussed somewhere no doubt, but I'm not sure where. Any ideas?--Dudemanfellabra (talk) 07:48, 23 July 2014 (UTC)
I just made an example, commons:Category:Gasselhöhle contains the template for the natural monuments in Austria, where the (other) link shows up all the WhatLinksHere matches (reparsing of all usages will take some hours, so at the moment you might see only the stuff that I touched). Of course the link has to be scoped in some way to avoid ID clashes, but you could solve this via your configuration tables.
About the place where to discuss, I don't have an idea. First, thanks for taking up my idea. I'm not involved in the creation and maintenance of the cultural heritage monuments / GLAM stuff, but I'm a heavy user (and critics - in the sense of constructive review and pushing towards more automation). It depends who asked you to do your helpful script. Multichill / Erfgoedbot would be my first idea. --Herzi Pinki (talk) 07:59, 23 July 2014 (UTC)
I like how you implemented the links to commons:NDO/AT-4/nd599 with the hidden span in commons:Template:Naturdenkmal Österreich/layout. This query is what would be used to find the whatlinks here, and it's actually maybe a better option than the category sortkeys because I don't have to worry about padding the ID with zeroes like I have to do now for IDs shorter than 8 characters long. That query also has a higher maximum limit of 500 as compared to the maximum when querying category members of 50, so there would be fewer API calls overall. The one thing that we would have to make sure of, though, is that the redlink we create is so obscure that nothing else would ever link to it, or else the results of that query would be messed up.
If we added this same hidden redlink to all the Commons monument templates, I could adjust the code to look for those links instead of sortkeys, and it would considerably reduce the size of the code and improve the speed. I like the idea and would support adding it for all commons templates. That said, regarding the specific link for Gasselhöhle, what you did requires my script to extract a second parameter ("AT-4") from the template, and I don't really like that.. Although it is technically possible, I would prefer to have the link be something like "Naturdenkmal Österreich/nd599", which would be easier to automate, as it only requires one to know the Commons Template and the ID. That is a small issue, though, and could be hashed out in some eventual discussion about this. Speaking of discussion, @Multichill: What do you think about this idea? It would allow a single file/category to be associated with multiple IDs, something which is lacking with the current category sortkey method. Where do you think we should bring this up for discussion?--Dudemanfellabra (talk) 12:54, 23 July 2014 (UTC)
I like crushing the impossible Face-smile.svg Maybe that Multichill even has to offer something more smart, as he has all the stuff in a central database.
The problem with the AT-4 is that IDs for natural monuments are defined by federal states' laws in Austria. And we don't know whether they will be persistent, some of them seem to have been created just for the purpose of having a unique key to give away the data for WLE. We have a similar situation with public art, Public Art Austria, keys for public art are assigned by municipalities it seems. You see, I'm still thinking about broadening the use of your script :-). At the moment, if there are different key ranges (a ISO-region in that sense could be considered a range) with independent IDs (unique keys), this is expressed by different templates for the rows. But this will inflate the number of templates on the WP side as well as on Commons side. So this is not a problem with the monuments lists at the moment. But for the future it would be an advantage to be able to define the key type and the ID separately. This will also allow to fold some of the row-templates. Nevertheless, while it will be possible to create a globally unique key on commons by concatenating both values, I think it is not a good idea to fill the row templates on WP side with that concatenated value, as it is not user friendly and error prone. So when parsing the wiki text on the WP side, I think it will be necessary in those cases to grep two values (lets call them key range and key value). Maybe not the final thoughts. --Herzi Pinki (talk) 15:12, 23 July 2014 (UTC)

──────────────────────────────────────────────────────────────────────────────────────────────────── I realize that some registers have multiple parameters for IDs (e.g. {{Table row Wallonia}} has IDs in the form |niscode=+"-"+|objcode=), and the script already supports many that do, but if it's possible, I like to keep it down to one parameter. When you question whether the keys will be "persistent", what do you mean? My question is if they are unique, i.e. is there some site that has the "nd599" in e.g. AT-1 instead of AT-4? If not, including the region code is pointless. If they are repeated trans-region, then it is required. Basically I'm trying to include as little information as possible and still keep everything uniquely identified. If I don't have to use two parameters, I don't want to. There is no need to change ID parameters on enwiki.. this is only Commons-related.--Dudemanfellabra (talk) 02:20, 24 July 2014 (UTC)

not persistent means subject to change. Which might cause a key clash in the future. Regarding nd599, this just means NaturDenkmal (natural monument), and the 599 is just an incremented index. It is likely that other federal states get the same idea. But when I understand you correctly, you already have a mechanism to deal with multiple (ok, twofold) keys. It makes configuration more complicated and more coupled to the WP / commmons. But, then everything is ok. We can, if we need, but if we won't need, we shouldn't. Right? And natural monuments are out of scope (for the moment). I do not understand you remark on this is only Commons-related: you have to grep the ID (compound ID) from the e.g. enwiki and find a match on commons. We cannot change the key structure on enwiki. But if you can do a defined concatenation of a compound key on enwiki, it for sure will be possible to create the hidden link to reflect this. Concatenation by '/' is just one way to do it. --Herzi Pinki (talk) 06:15, 24 July 2014 (UTC)
Ok I feel like we're talking past each other and making this more complicated than it has to be. All I need is some way to uniquely identify a monument with a specific code that will not be used for any other monument anywhere else in the world. If that can be done with one parameter, I prefer that; if it takes two (or three or four or five or however many), I can make that happen. I don't really care about the details of the ID, but I would hope the numbers are coming from some official source (e.g. the numbers for the US NRHP come from the NRIS) if one exists and are not just being made up out of thin air. Regardless of where the numbers come from, though, all I need is a way to systematically construct them based on the information on en/de/whatever-wiki and look for that on Commons. If "AT-4" is required to uniquely identify Gasselhöhle and not just "nd599", then I would suggest creating a redlink to something like "Naturdenkmal Österreich/AT-4-nd599". This can be constructed from CommonsTemplate+"/"+ID, where the ID is gotten from the template as RegionISO+"-"+Nummer. It would be possible to construct this for every supported register, whereas something like your original "NDO/AT-4/nd599" requires my script to know that it needs to put "NDO" at the front, and that means adding yet another variable to my code. I would like to just stick with things we already know, which is why I am suggesting using the Commons template name. Anything will do, though, so long as it is standardized across all registers. I think what we should do now is just wait for Multichill to respond, and if he doesn't, seek out some other avenue of discussion.--Dudemanfellabra (talk) 09:20, 24 July 2014 (UTC)
Hi, we have the same understanding now. Replacing NDO with the name of the template and using the hyphen for concatenation instead of the slash, can be done easily. No problem left. I will contact Multichill directly. regards --Herzi Pinki (talk) 05:44, 25 July 2014 (UTC)

Hi Dudemanfellabra, so Multichill did not respond and I was on vacation and then I forgot, sorry. Using your script and it failed, brought this discussion to my mind again. I think we could decide to change all the templates if it will help to solve the problem and you will be still willing to change your algorithm. Would be wise to contact all the creators of the templates first.

I came back here because the script fails at de:Liste der denkmalgeschützten Objekte in Bichlbach (while it works on other lists). I suppose the reason is the redirection of template {{Denkmalliste Österreich Tabellenzeile (ehemaliges Denkmal)}} to {{Denkmalliste Österreich Tabellenzeile}}. We use this indirection to allow bots to differ between current monuments and former monuments, while avoiding to have a redundant c/p implementation. regards --Herzi Pinki (talk) 16:14, 22 September 2014 (UTC)

AddCommonsCatLinks in Miami-Dade County[edit]

Hi, I'm trying to use the AddCommonsCatLinks tools in the page National Register of Historic Places listings in Miami-Dade County, Florida. There are links (like Cape Florida Light) with a Commons category linked in the page using the commons template and also in Wikidata, that are not detected: any hints? Thanks, Pietro (talk) 17:16, 22 July 2014 (UTC)

Read the documentation. You need to tag all the categories on commons with their refnum using c:Template:NRHP in order for the script to recognize them.--Dudemanfellabra (talk) 02:20, 23 July 2014 (UTC)
I've been adding the NRHP template to Florida categories on Commons recently. Started with the counties with the least number of listings and am working my way up. I'm around the 12 to 14 per county stage. Which of course means Dade County would be last, as it has the most listings. I also added the template to all the Florida NHLs, a few of which are in Dade. Do appreciate anyone else pitching in, tho.  ;) --Ebyabe talk - General Health ‖ 03:14, 23 July 2014 (UTC)
Understood: I start working on it. Pietro (talk) 13:20, 23 July 2014 (UTC)
Miami, Miami-Dade, Monroe, Collier, Broward, and St. Johns done: great tool, congrats! --Pietro (talk) 01:50, 24 July 2014 (UTC)
Glad to see it working for you. Thanks!--Dudemanfellabra (talk) 02:10, 24 July 2014 (UTC)
Is there any way to cross-check the coherence of a Commons URL in a list, a page, and a Wikidata item? --Pietro (talk) 16:53, 26 July 2014 (UTC)
I have not created any kind of automated or semi-automated tool to check this coherence, though it may be theoretically possible to do by some other-than-manual means. I have quite a few things on my plate as far as scripting and other projects go, though, so I don't think I'll pursue making any code that does this.--Dudemanfellabra (talk) 15:03, 27 July 2014 (UTC)
Ok, thanks. There should be a way to verify the page and Wikidata at least: I'll check. --Pietro (talk) 16:27, 27 July 2014 (UTC)

race condition Krdbot with User:Dudemanfellabra/AddCommonsCatLinks[edit]

Hi Dudemanfellabra, hi @Krd:, I found a race condition between scripts that you both do provide. May I ask you to think whether there is a simple solution. The situation is:

  • The script User:Dudemanfellabra/AddCommonsCatLinks allows to add images and commonscat-entries based on the ID in a semi-automated way. When doing so, it removes the old parameter |Commonscat = where the script finds it and adds a new parameter |Commonscat= at the end of the template for the row. This behavior is difficult to change (see above). [1]
  • Krdbot checks the lists with the monuments on a regular base (since years) and inserts missing parameters. As Krdbot does not find the |Commonscat= parameter at the expected position, it inserts another one. [2].

There is not a real problem with that, but it could turn out to become one.

  • it bloats the wiki-code with duplicated template arguments
  • it does so in a non-destructive way (as the empty |Commonscat= is inserted before the meaningful). If things change related to insertion order, this might turn out to be a problem.
  • from the point of usability it is annoying, people who change the Commonscat entry manually, will for sure, as they are used to do it that way, fill the empty |Commonscat=. This will not have any effect, as this argument is overwritten later.
  • maybe there are some other problems related to this, e.g. Multichill's scripts do count the number of filled |Commonscat= entries, depending on how this is implemented, there might be a problem there too.

Nevertheless, if there is a simple solution, a fix would be highly appreciated. Your tools are both widely used. My preferred solution was to respect the structure of template arguments and change the User:Dudemanfellabra/AddCommonsCatLinks script to not insert the new argument at the bottom of all the template arguments. But this seems to be difficult. Krd, maybe you have an idea how this can be achieved easily. The other solution would be that you Krd relieve the restrictions in order of template arguments. It's up to you folks to find the best solution. thanks --Herzi Pinki (talk) 10:36, 23 July 2014 (UTC)

I had been tinkering with the code a bit before you left this message trying to figure out how to do this gracefully. The way I had my regexes set up before was a bit messy because I had several different cases. I won't go into details, but the TLDR version is that I was able to combine all these cases into a single regex and make it easier to keep the argument order though it still removes padding spaces if they are there... I don't really see a way around that at the moment, but maybe in the future I'll figure that out too. Now the code should put the image/commonscat in the correct location if the argument is present but blank, and if the argument is missing all together, the code tacks it onto the end of the template. See this diff for an example.--Dudemanfellabra (talk) 12:04, 23 July 2014 (UTC)
This is great news. --Herzi Pinki (talk) 13:32, 23 July 2014 (UTC)

Splitting lists and NRHPPROGRESS[edit]

I noticed that someone else had split the Rock Hill listings out of York County, South Carolina, so I added a few rows to WP:NRHPPROGRESS and added the county WP:NRHPPROGRESS/Duplicates. I have the script running right now to adjust the counts for South Carolina. Is there anything else that needs to be updated when a sublist is split from a county, or did I get everything? TheCatalyst31 ReactionCreation 04:21, 28 July 2014 (UTC)

Thanks. I was just catching up with your edits. When I woke up this morning I saw that edit last night had a relatively large decrease in the number of properties total, so I was going to try to figure it out before updating the maps. Seems you already did! Thanks for adding the row to the progress page. I'll have to update my code a bit to account for the split, done by @Pubdog:, or else your edits to the duplicates page will be overwritten. For future reference, if a list is ever split, both the Progress page and my code needs to be updated.--Dudemanfellabra (talk) 04:34, 28 July 2014 (UTC)
Someone actually split the list in 2011 but never removed the properties from the main article, and nobody noticed until Pubdog today; the original splitter also spelled it "National Register of Historical Places", which might be why that happened. I canceled my update so it wouldn't just overwrite my edits; in the future I'll keep that in mind. TheCatalyst31 ReactionCreation 04:48, 28 July 2014 (UTC)
No, the overwriting would be done by NationalRegisterBot, when it updates all that stuff, which it did yesterday, not the Progress script. You're in the clear to run the Progress script, and I've added the relevant code to the bot anyway.--Dudemanfellabra (talk) 04:50, 28 July 2014 (UTC)
Ah, thanks for letting me know. TheCatalyst31 ReactionCreation 05:26, 28 July 2014 (UTC)

I don't understand duplicates anymore[edit]

The Savanna-Sabula Bridge spans the Mississippi River between Carroll County IL and Jackson County IA, but until a few minutes ago, it only appeared on the IA list and thus wasn't in any of the multi-state duplication sections of WP:NRHPPROGRESS. Could you please fix this situation and show me what I should have changed? I've added it to National Register of Historic Places listings in Carroll County, Illinois; I just need help with the progress page. Nyttend (talk) 04:53, 29 July 2014 (UTC)

The Progress page won't change until I run the bot again, which I just did yesterday, so I don't plan on doing it for at least another week, maybe longer. When it runs, it will automatically find the duplicate you added, assuming the refnum is the same in both cases. In the meantime if you want the Progress page to show the duplicate, add a row to the multi-state table on WP:NRHPPROGRESS/Duplicates and change the numbers in the hidden switch-table at the top of the wikitext to reflect the change. The duplicates row on the Progress page will automatically change, and you can edit the national totals to account for the duplicate.
Again, though, all of it will be taken care of with the bot run, so if you're fine with the page being out of date for a week or so, so am I.--Dudemanfellabra (talk) 05:00, 29 July 2014 (UTC)
Thank you. I was unaware that the bot was able to do all the accounting for the duplicate; I knew that it could find it, but I didn't think it could do everything (and didn't know if it could do anything beyond noting the existence of the duplicate), so I figured that we'd have a mess if I didn't address the situation now. Nyttend (talk) 11:15, 29 July 2014 (UTC)
@Nyttend: And sure enough, the bot found and updated the duplicate you pointed out (along with several others). The duplicates on the Progress page have been updated, and I'm running the update script right now to update everything else. I'm going to set it running as I go to sleep (it's 1:45 AM here) and hopefully have time to update the maps tomorrow.--Dudemanfellabra (talk) 16:46, 4 August 2014 (UTC)
I really appreciate how much work you've gotten it to do, as it's doing a lot of stuff that I found quite confusing. Thanks for letting me know! Nyttend (talk) 16:52, 4 August 2014 (UTC)

CommonsCat script at the Czech Wikipedia[edit]

Hi Dudemanfellabra! I tried to use your tool at the Czech Wikipedia for monument lists. However, the tool required class='vcard' in the template cs:Šablona:Památky v Česku. Should be something added to the template? --ŠJů (talk) 21:39, 9 August 2014 (UTC)

Dobrý den! Hello! Thank you for contacting me about the CommonsCat script; you are the first person to try to use it on the cs-wiki. When I made the script, I just enabled it for all the registers that User:ErfgoedBot supported, but I didn't check to make sure if it actually worked with all the registers. You'll be somewhat of a beta tester if you don't mind haha. With this edit I believe I have allowed the script to work, but I don't have it installed on cs-wiki, so I can't test it myself. Try it now and let me know if it works. If not, I'll see what I can do. One thing I do need to mention is that because the GUI has not been translated into Czech (would you be able to help with that?) everything will be in English, including the edit summary. Let me know if there are any problems! Thanks again for installing the script!--Dudemanfellabra (talk) 01:26, 10 August 2014 (UTC)
Hi. Thank you for your edit. However, the error message is still identical, though you added the requiered word to the template.
I can try to translate GUI but I would rather like to see the tool working before the translation to understand the context and meaning of the messages correctly. I'm really curious how the tool works. --ŠJů (talk) 14:24, 10 August 2014 (UTC)

I added the Czech translation to the discussion page of the tool now.

Btw., when the script fails, the message ("Preferred language unavailable... Checking for matches...) stays hanging on the page and contains no "×" symbol to be closed. Some links from the background page penetrate into the message window. --ŠJů (talk) 15:25, 10 August 2014 (UTC)

Ok, the script should be working now; sorry for that. The error was that the lists on cs-wiki also included the template cs:Šablona:Památky v Česku/začátek, and my script was looking for the string "{{Památky v Česku", which also matched the header template, and so a mismatch was coming up. I added a check to make sure the matched templates are not subpages or other templates which begin with the same string. I installed the script on my commons.js on cs-wiki and got it to work (though I didn't actually edit a page).
Also, thank you so much for translating the GUI. I have added your text to the code, and now you should be able to see it in context. If there are any changes you feel need to be made, let me know, and I'll update the translation.--Dudemanfellabra (talk) 03:40, 11 August 2014 (UTC)

I tested the tool on the list cs:Seznam kulturních památek v Chomutově. cs:Wikipedie:WikiProjekt Wiki Loves Monuments/Missing commons category links contains 3 commonscat links which should be added to the list. However, your script found no matches. --ŠJů (talk) 07:42, 11 August 2014 (UTC)

I traced the problem to the commons template used to tag the categories/images. All of the working templates add a space to the sortkeys (in order for it to be read as a string type, I suppose), and the script looks for that. The Czech template didn't have that space, so I've just added it now, and it should work. You'll probably have to wait for the job queue to catch up and reparse all the pages on which the template is transcluded, though. Sorry for all the trouble haha. Like I said, you are the first user to try it on the Czech wiki, so you kind of got hit with everything. As soon as the job queue catches up, everything should work fine. If you want to speed up the process, you can null edit the categories on commons, forcing that cat to the front of the line for reparsing. Again, sorry for all the trouble :\.--Dudemanfellabra (talk) 08:52, 11 August 2014 (UTC)

Thank you very much! Great work! The function of adding commonscat links works perfectly! I believe, adding of images will work as well. It there will appear some complication, a will contact you again, but I hope, the script is adapted for the Czech wikipedia already. --ŠJů (talk) 22:34, 11 August 2014 (UTC)

A bug in the Commons script[edit]

I was using your Commons script to add a new category to National Register of Historic Places listings in Charleston County, South Carolina, and the script is claiming there's a match for Bleak Hall Plantation Outbuildings but isn't displaying any images or a category. The history of Botany Bay Plantation Wildlife Management Area shows that there was a photo of the site that was deleted in January; I'm not sure if that has anything to do with the problem, but it might be relevant. TheCatalyst31 ReactionCreation 09:32, 24 August 2014 (UTC)

I think I found the source of the problem; this file on Commons is too big to display as a thumbnail. Is there any way for your script to work around huge files like that? TheCatalyst31 ReactionCreation 19:56, 24 August 2014 (UTC)
Sorry for the long delay in response. As Nyttend pointed out, I've been pretty busy in real life and haven't had time to get on and do any kind of editing. I found a little time today to actually address some things on here. I fixed the script and just ran it on Charleston County getting good results. The problem was I had removed images from the display that couldn't have thumbnails displayed due to size, but I didn't address the situation when all images couldn't be displayed... thus the blank display haha. I put in a check to just skip that row if all images fail to generate thumbnails. The script does pause noticeably on that row now because it has to actually try to fetch the thumbnail, but after its check, it continues on as if no matches were found as expected. Thanks for pointing that out!--Dudemanfellabra (talk) 17:44, 27 September 2014 (UTC)
Thanks for fixing it, and welcome back! TheCatalyst31 ReactionCreation 18:42, 27 September 2014 (UTC)

NHL lists[edit]

Hey Dudeman, I've finished processing the NHL lists you converted by script to templates. I did notice that you did not convert List of NHLs in Other, which looks the only NHL list that hasn't been converted to templates yet. Magic♪piano 15:29, 2 September 2014 (UTC)

Hi, sorry for the long response time, but I've been away from Wikipedia for a while and have just found some time to get back into editing. Thank you so much for continuing my effort to convert the NHL lists to use templates while I was away. I have converted the "other" list (only the first table, since my script limits me to that) and pasted it into User:Dudemanfellabra/Test. I have checked the refnums and dates of the first 5 entries but have to go eat lunch now and will be back later to finish up the rest. After the first table is copied back into the live article, I can run the script again to get the second table.. then repeat the process for the third one, although these later two can probably be converted manually since they are so small. I will work on this when I get back from lunch. Again, sorry for the long response time! Thanks!--Dudemanfellabra (talk) 18:11, 27 September 2014 (UTC)
And I have now converted the three tables on that page to templates. The only thing that would remain would be the former NHL lists, but I would have to do some extra coding to make those template-compatible. I'll eventually do that, but I need to take care of a few more things before I do. I will let you know when I update the template for them. Thanks for all your help again!--Dudemanfellabra (talk) 21:05, 27 September 2014 (UTC)

Edit to the update script[edit]

Just so you know, I changed the UpdateNRHPProgress script to remove Zavala County, Texas from the list of empty counties, since it now has a listing. Normally I would've asked you first, but since you haven't been active in a few weeks I wanted to make sure the script worked properly in the meantime. TheCatalyst31 ReactionCreation 22:37, 3 September 2014 (UTC)

Thanks for letting me know. Just for future information, though, it doesn't matter if a county is on the empty counties list if it has counties. The script was designed so that it checks for a table first and only sees the list of empty counties if the link points to a page without a table on it. Since the Zavala County list had a listing, the script never would have encountered the empty counties list anyway.--Dudemanfellabra (talk) 00:50, 28 September 2014 (UTC)

Dudemanfellabra's absence[edit]

Just a note to everyone else who's been coming here — I contacted him offline, and he said that he's crazily busy in real life. He's definitely planning to come back when things calm down, when he doesn't need about 48 hours in a day anymore. Nyttend (talk) 03:20, 4 September 2014 (UTC)

Articled NRHP sites[edit]

Hi. Analyzing both the statistics in the NRHP project progress and the result of vector.js script, you can find county lists (like Miami-Dade, Palm Beach, Escambia, Pasco, Union) apparently fully populated, but declared as incomplete: how to identify the missing articles? Thanks, Pietro (talk) 14:48, 13 September 2014 (UTC)

(talk page stalker) If I recall, the script doesn't count sites as articled in some cases even if they have a blue link; in particular, disambiguation pages and redirects back to the county lists don't count. However, after taking a look at the Pasco County list, I have a suspicion as to what's going on here. Dade City Woman's Club redirects to List of Woman's Clubhouses in Florida on the National Register of Historic Places, and I'll hazard a guess that the script checks for redirects to the county list by checking if the page has "National Register of Historic Places" in the title. (Considering that I fixed the problem in Union County by retargeting the link for Lake Butler Woman's Club away from that list, I'm almost positive that's the cause.) I'm not qualified to fix the issue myself, but once Dudemanfellabra's actively editing again he can tell me if I'm right; in the meantime, I wouldn't worry about it too much. TheCatalyst31 ReactionCreation 00:46, 14 September 2014 (UTC)
My read of the script suggests that links to list-class articles are generally considered unarticled. A simple test would be to locate such a link on one of the lists at issue and stubbing an article to replace it, then seeing what the effect is on the stats. Magic♪piano 01:03, 14 September 2014 (UTC)
I had doubts about lists too, but in Miami-Dade you have 45 such links and only one missing article. I agree that this is not a big issue, but it's just to understand what is considered a valid article.--Pietro (talk) 07:07, 14 September 2014 (UTC)
I tested, and the "missing" links for Miami-Dade and Pasco Counties are Coco Plum Woman's Club and the aforementioned Dade City Woman's Club respectively; I'm now almost positive that it has something to do with that title, not just the assessment as a list. Union County had a link to the same list, but since the site in question had its own article I fixed it. Escambia County and Palm Beach County had links to disambiguation pages, which I fixed. TheCatalyst31 ReactionCreation 09:05, 14 September 2014 (UTC)
The List of Clubhouses differs from other lists in Miami-Dade for the Category:National Register of Historic Places lists : I removed it, but it had no effect. Is there any specific guideline to follow for a list name?.--Pietro (talk) 14:57, 14 September 2014 (UTC)
I took a look at the code to see if I could fix it, but it seems like this might be intentional; there's a comment that says "count links to other county/MPS lists as unarticled", so Dudemanfellabra may be intentionally counting links to MPS lists as unarticled. There was a discussion last year that led to the current situation, so I don't want to change anything without consensus. If you really want to resolve the problem in the short term, you could start articles on the two clubhouses, but otherwise I'd just wait until Dudemanfellabra is back. TheCatalyst31 ReactionCreation 19:46, 14 September 2014 (UTC)
Thank you for all the time you spent on this request. I saw the comment in the previous discussion ("there is no more content on the MPS list than there is in the county list"), but, to be realistic, is difficult to find good sources for each single entry in order to avoid tons of stubs replicating the basic info already published in the lists. In my opinion, it is better to keep the link to MPS articles as valid, trying to improve their quality: some of them are already not simple duplicated of the county list (e.g.: Opa-locka TR). Anyway, the same rule should be applied to all such lists: do you know which parameter is checked to exclude the Woman's Clubhouses and is not present in other lists, like Miami Shores TR, Homestead MPS, Opa-locka TR for Miami-Dade? --Pietro (talk) 06:53, 15 September 2014 (UTC)
As I mentioned before, that list is different because it includes "National Register of Historic Places" in the title, so it gets caught by the check that looks for links to county lists. It seems to be an unexpected side effect, and it's fixable by checking for "National Register of Historic Places listings" instead, but I don't want to change anything without an OK from Dudemanfellabra. Incidentally, while it's admittedly hard to find sources for some sites in MPSes, it's not for those two; Dade City has a description on the Florida Heritage website, and Coco Plum has its own website. TheCatalyst31 ReactionCreation 07:12, 15 September 2014 (UTC)
I started articles on both buildings, sidestepping the problem for now. The larger issue still stands, but that discussion can wait until Dudemanfellabra's back. TheCatalyst31 ReactionCreation 07:44, 15 September 2014 (UTC)

──────────────────────────────────────────────────────────────────────────────────────────────────── Sorry for the long absence, guys; I've been really busy in real life. The way the script handles these links is by checking if an article is assessed list-class. If it is list-class, there are two outcomes: 1) If "National Register of Historic Places" is in the title, the script counts it as unarticled; 2) otherwise, the script counts it as stub-class. If the article is not list-class, the script just goes with stub or start+ regardless of the title. While yes, this case would be "fixed" by just making the script check for "National Register of Historic Places listings" (note the extra word), I think the better solution for MPS articles would be just to change the assessment of the article to something other than list-class if there is enough information about each site to warrant doing so. That said, though, in this case, the article is a list and thus the assessment should not be changed. There is little to no more information about each individual building on the MPS page than there is in the county list, so I think the listing should be counted as unarticled. Thankfully, TheCatalyst31 has started articles on the sites in question, so this point is irrelevant now, but I agree with the output of the script saying the sites were unarticled until these new articles were created. If anything, I think the script should be modified to check for the words "Thematic Resource/TR" and "Multiple Property Submission/MPS" to count those as unarticled as well.--Dudemanfellabra (talk) 01:02, 28 September 2014 (UTC)

Another split list[edit]

I split Madison from the Dane County, Wisconsin list, so you should update your bot script to reflect that before the next time you run it. TheCatalyst31 ReactionCreation 04:10, 21 September 2014 (UTC)

Yes check.svg Done. Thanks for letting me know. In the future, since you have admin capabilities (I didn't realize before that this allowed you to edit my js files), feel free to add splits like this to the bot's code if I'm not available.--Dudemanfellabra (talk) 01:05, 28 September 2014 (UTC)

Another bug in the Commons script[edit]

I just ran the script on National Register of Historic Places listings in Middlesex County, New Jersey, and when it reaches the Goldman House, it suggests an image to add even though that row already has an image. Looking at your code, I'm pretty sure that the bug has something to do with the existing image not being on Commons, since your code seems to only validate existing images by checking if they're on Commons. TheCatalyst31 ReactionCreation 06:06, 29 September 2014 (UTC)

Tonight's not my night for bugs, because I just found another one. On National Register of Historic Places listings in Travis County, Texas, the script hits an error because it claims that one of the {{NRHP row}} templates doesn't include the 'class=vcard' CSS. I suspect this is caused by the commented-out row for a pending listing, since it's the only thing different about that table. Sorry for hitting you with two bug reports at once though. TheCatalyst31 ReactionCreation 06:17, 29 September 2014 (UTC)
The first error is expected.. if nothing else, it helps to find images which are not on commons and usually should be moved. It's more intended to find categories that are misspelled or otherwise non-existent and correct them. If you choose to add an image/category to replace the missing one, the script will overwrite the pre-existing one, or if you choose not to add one, nothing is changed. If that behavior is too annoying (i.e. you don't want to skip the image every time), I can try to check on the local wiki if nothing is found on Commons. That may take a little while to implement, though, since I'd have to separate out checking for categories and images (now they're done at the same time) in order to prevent false positives for categories that exist on the local wiki and not on commons. That or I could just refrain from checking if the image actually exists and trust that the editor knows better than the script. Actually, thinking as as I type, that sounds like the better option, and I may do that.
As for the second one, I've now fixed it. Commented out rows have always been a pain for scripts like this one and the renumbering script (I'm not sure the renumbering script would work correctly on that page, actually). I've had to make so many modifications because of them haha, but I do like their convenience for later addition upon listing, so I do feel like I need to account for them instead of just deleting them when the script comes across them. I think with this latest patch I've permanently fixed the issue, but undoubtedly something else will come up later haha. Either way, the script now runs successfully on the Texas page. Thanks for pointing that out.--Dudemanfellabra (talk) 00:17, 30 September 2014 (UTC)
The first error isn't really that annoying, and I've moved most of the images I've come across that way to Commons (though that first one was tagged with {{do not move to Commons}}). Do what you think is best with that one. Thanks for fixing the second one; I feel like I've come across that issue with the renumbering script before too, though I don't remember what I did about it at the time. TheCatalyst31 ReactionCreation 01:30, 30 September 2014 (UTC)
That first issue actually has a side benefit. I just replaced a non-free image that was being used in a list even though (a) there was a free alternative and (b) that's probably against the rules. It might be worth leaving in just to catch silly cases like that. TheCatalyst31 ReactionCreation 19:46, 1 October 2014 (UTC)
Good to know. Actually another user suggested to me that the script should output some kind of indicator that the existing image/category either doesn't exist (usually categories) or isn't on commons. I didn't really think the notification would be necessary, but I'm interested in your thoughts. Do you think it would be beneficial to add some kind of message to the user?--Dudemanfellabra (talk) 04:43, 3 October 2014 (UTC)
I haven't come across any categories (or images) that don't exist yet, so I can't really say that's a problem right now. As far as images that aren't on Commons go, while the notification is sometimes nice, it's only helpful when you can actually transfer the image to Commons (i.e. it's not tagged with keeplocal or has weird copyright issues), and I'm not sure transferring images to Commons is a huge priority. TheCatalyst31 ReactionCreation 18:45, 3 October 2014 (UTC)
Well when I said "doesn't exist", I meant on Commons, so you have at least found a couple cases like that. Do you think you would have been less likely to be confused (thus your comment here in the first place) if instead of "The following matches were found" the script had said something like "The existing image and/or category cannot be found on Commons. The following matches were found on Commons. Selecting one of them will replace the existing one. If you don't want to replace the existing image/cat, just select 'Don't add any'"?
Also, I see you just updated the progress page. If you had waited just a few more hours, I was going to do it (and probably still will). I'm running the bot now after I modified it to output a list of substubs (articles with less than 1500 bytes of prose) after a recent conversation at WT:NRHP. After the bot runs, I usually update the duplicate information and am then forced to update the entire Progress page to make the numbers work... so basically I'll be overwriting your update soon haha. But thanks nonetheless for taking that initiative! :P--Dudemanfellabra (talk) 20:23, 3 October 2014 (UTC)
Darn, I didn't realize you were running the bot. I wanted to see a final tally of our image progress from Summer of Monuments (Louisiana just missed getting to 50% illustrated), but if I had known I would have just waited a few more hours for you to do it. Oh well. As to your other point, rewording that would probably make more sense, since if you don't know about that part of the script you probably wouldn't understand why it was bringing up matches for an illustrated site. TheCatalyst31 ReactionCreation 22:37, 3 October 2014 (UTC)

Trouble with fix cords script?[edit]

See National Register of Historic Places listings in western Puerto Rico, the script didn't work well on that page, for example on the first row 5, it didn't remove the old coord template. Maybe due to the small that was missing a /small? I reverted the changes the script made to that page. Generic1139 (talk) 21:29, 15 October 2014 (UTC)

Or maybe not, National Register of Historic Places listings in the Northern Mariana Islands is also wrong, and it had the closing tag. I reverted it as well. Generic1139 (talk) 21:38, 15 October 2014 (UTC)

The script is not meant to be bulletproof. If it doesn't work on a page, you can still convert the coords manually, especially like Northern Mariana Islands, where there was only one incorrect template (which I modified the script to handle). I ran into a few errors with coords inside HTML comments but just fixed them manually. The time it would take to make the script adjust to every single possible situation is way longer than it would take to just fix these cases manually.--Dudemanfellabra (talk)
Thanks so much for creating the script! I discovered the situation by looking at the Philadelphia lists, and I figured it would take quite a while for us to convert hundreds and hundreds of entries. Nyttend (talk) 01:04, 17 October 2014 (UTC)
Yes, thanks. The various lists in PR had about 100 rows that needed to be corrected, mainly removing the coord template, and there there were a few strange ones with comments in odd places, but it would have been tedious and error prone in the extreme to do it all by hand. Generic1139 (talk) 02:55, 17 October 2014 (UTC)

Re: Olympia[edit]

I'm sorry for causing the confusion. I remember this coming up once before, but that was a situation in which I either split a list into two or merged two lists into one. Here, I figured that someone had simply messed up the list, rearranging it in an unhelpful way; I was completely unaware that they were separate entries on NRHPPROGRESS, so if I'd thought about it, I would have assumed that the bot was counting them all together, or that I was undoing a messup that would confuse the bot and thus unconfusing it. Curious, do you have any idea why this list ended up this way? Finally, sorry for the late reply; I've been in Philadelphia for the last couple of days (tons of photos, although almost everything was already illustrated), and I'm at a restaurant 1½ hours from home. If you respond tonight, please be aware that I might not. Nyttend (talk) 00:23, 21 October 2014 (UTC)

To be honest, I have no clue. The list had been separated like that since 2008. I guess it was just created like that, and no one took the time to recombine them until you came along. I seem to remember the split causing some headaches for the Progress script a while back, but the script will work with or without them separate, and the map doesn't change regardless since it calculates everything combined anyway. I'm fine with either way, so long as the Progress page reflects the article accurately--if there are two tables, there need to be two rows on the Progress page, and if there is only one table, there only needs to be one row. Everything works now, and I was able to run the bot/update the statistics successfully.--Dudemanfellabra (talk) 01:50, 21 October 2014 (UTC)
It must be something with Washington. I've just gone through all of the split-out lines in NRHPPROGRESS (all the non-county entries, whether cities, chunks of cities, or other entities) for all states, and I've and verified that they're all separate pages, except for Spokane and Tacoma. I suppose it will soon be time for me to fix it...Nyttend (talk) 03:47, 21 October 2014 (UTC)

Re: Project banner[edit]

I was planning on trying to find the untagged articles through AWB so they could be tagged; having the extra redirects ends up making that more difficult, so I changed the couple that only had a handful. Found one untagged so far so hasn't been in vain at least. On a side note, by doing this I found that USS Hornet Museum wasn't tagged, but USS Hornet (CV-12) is; I'm not positive which would be the main article for the project and which one should merely be related-importance, if tagged at all. Wizardman 16:30, 26 October 2014 (UTC)

@Wizardman: (I didn't know if you watched my talk page, so I pinged you) If you want to find untagged articles, simply visit WP:NRHPPROGRESS. That page is updated semi-automatically (by script) and breaks down untagged articles to the county level. If you want an even better breakdown, install User:Dudemanfellabra/NRHPstats.js into your javascript, and when you visit any NRHP (or NHL) county list, a yellow box will appear above the list showing you stats about the list, including if any articles are untagged (hover over the text to show the names of the articles). You can use the Progress page to find a county with at least one untagged article, visit that county list, use the script to find the article title(s), then tag the offending articles. No AWB required :P. If you have any questions about any of that, let me know, and I can explain in more detail.
As for the USS Hornet deal, I actually think the two articles should be merged anyway--the museum article into the ship one. Neither article is terribly long, and combining them will keep more information in one place.--Dudemanfellabra (talk) 17:30, 26 October 2014 (UTC)
That's way easier than the route I was trying to go; thanks! Wizardman 18:34, 26 October 2014 (UTC)

Bug in NRHPPROGRESS updater[edit]

You might look at the footnotes of Arkansas at WP:NRHPPROGRESS (it seems to be the only one that's weird). Magic♪piano 02:29, 27 October 2014 (UTC)

Thanks for pointing that out. I've fixed it now.--Dudemanfellabra (talk) 02:38, 27 October 2014 (UTC)

Possible bug in NRHPstats[edit]

If you go to a nonexistent article's article page (as opposed to the edit tab that automatically loads when you click a redlink), a message pops up saying that NRHPstats could not load the wikitext and has been aborted, which seems unnecessary for a nonexistent page that has no wikitext. It's a pretty low-priority error since most editors with the script won't see it (I only found it thanks to a bad offsite link), but you might want to look into it if it's an easy fix. TheCatalyst31 ReactionCreation 02:49, 16 November 2014 (UTC)

It was an easy fix. Thanks for pointing that out. It shouldn't happen anymore.--Dudemanfellabra (talk) 03:50, 18 November 2014 (UTC)
This is probably a related issue, but if you go to a page that redirects to itself (like this one) the script does the same thing. It's not a problem on normal redirects, just self-redirects. Though that's probably an even more obscure bug than the other one... TheCatalyst31 ReactionCreation 04:39, 25 December 2014 (UTC)