User talk:DYKToolsBot

How to deal with old categorizations?
@Theleekycauldron @Sdrqaz @ProcrastinatingReader @ONUnicorn @Legoktm (pinging everybody who participated in the original BRFA). I'm starting to think about the next steps. I've got all the pending nominations getting correctly tagged. Now I need to figure out what to do when a pending nomination is closed (promoted or rejected). One possibility is to go around and remove the tags. Another would be to just leave them. A third would be to replace them with monthly aggregated categories similar to Category:Passed DYK nominations from February 2023. I'm kind of leaning towards the monthly aggregates. I'd appreciate any input you folks might have. -- RoySmith (talk) 02:33, 8 February 2023 (UTC)


 * Hi, Roy. The point of the bot was to make prep builders' lives easier when following the balance restrictions (at least that's how I interpreted it, as a simplification). Of the three options, leaving them alone doesn't seem viable: being part of " [[Category:Pending DYK x" would be misleading once it's closed and would mean that builders would be looking through that category for nominations that can be promoted and encountering false positives. I'm curious why you would want to do monthly aggregated categories. Are you intending it to be as an archive/record-keeping practice? That seems to be a bit more work than simply removing them, either in coding the bot to create those categories and populate them, or making changes to the DYK nomination template (admittedly more unlikely). [[User:Sdrqaz|Sdrqaz]] (talk) 04:59, 8 February 2023 (UTC)
 * That was certainly the original point, yes. But it occurs to me that there might be value in keeping the historical categories, which would allow people to ask questions like, "Show me all the biographies we ran in 2023".  I'm not committed to that, but wanted to explore the idea before the next round of code writing. -- RoySmith (talk) 14:03, 8 February 2023 (UTC)
 * I'd say do what Tamzin did on DYKsmirk: leave the tags for future reference, but make them non-category-diffusing after a nomination has been closed. Seems like the best option on all fronts. theleekycauldron (talk • contribs) (she/her) 06:32, 9 February 2023 (UTC)
 * Hmmm, that might work. Wiki template syntax is truly an abomination that makes my head hurt, but I'll see what I can figure out. -- RoySmith (talk) 16:26, 9 February 2023 (UTC)

It is mind-boggling that a top-10 website is built on this stuff.
 * Oh my. If I've parsed this gibberish correctly, the relevant part of DYKsmirk is:
 * I just figured out one small part of this. The "%[%[Category:....ed DYK nominations" pattern is intended to match either Category:Failed DYK nominations or Category:Passed DYK nominations.  That's clever, but fragile and obtuse.  I see that these lua patterns do not allow for alternation, so let me suggest that we create Category:Closed DYK nominations, use that in the if in page, and make it include the other two cats.  At least that will be more obvious to the next person trying to figure this out.  -- RoySmith (talk) 00:08, 10 February 2023 (UTC)
 * @RoySmith: I don't think that would work; if in page checks the text on the page, and doesn't know what the supercategories of the listed categories are. Instead, what we can do is just check for whether the DYKsubpage template is on the page; if it is, the nom is open, so we can transclude the categories. If not, don't. theleekycauldron (talk • contribs) (she/her) 00:45, 10 February 2023 (UTC)
 * I see your point. Next, I'm trying to figure out what   means. -- RoySmith (talk) 00:54, 10 February 2023 (UTC)
 * @Theleekycauldron My brain hurts. I picked a nomination at random to see if looking for DYKsubpage would work.  I happened to pick Template:Did you know nominations/Hacı Abdullah Restaurant, which looks like it's pending, but doesn't have a DYKsubpage.  Eventually, I found Special:Diff/1127505015, which I think explains the problem; it looks like @DigitalIceAge performed a manual edit to unpromote the nom instead of just reverting Special:Diff/1126026213, and got the formatting wrong.  Is my analysis correct?
 * I think I've also finally gotten my head around the rest of the gibberish. The whole #switch thing is just being fancy and allowing any of several ways to say "true".  Totally unnecessary.  Adds complication for no good reason.  Just pick one. -- RoySmith (talk) 02:13, 10 February 2023 (UTC)
 * That is a... one-in-a-million formatting error, yes. Every other pending nomination has the DYKsubpage template, you literally can't close a nomination without it. theleekycauldron (talk • contribs) (she/her) 02:21, 10 February 2023 (UTC)
 * OK, I think I've got this working. Take a look at:
 * test:Template:Did you know nominations/Fleetwood Park Racetrack
 * test:Talk:Fleetwood Park Racetrack
 * test:Template:Did you know nominations/Benjamin Tompson
 * test:Template:Pending DYK American hooks
 * Hmm, the x-wiki links don't seem to be working, but you get the idea.
 * It's a lot simpler than the DYKsmirk example, but I think it still does the right thing. The gist is it will categorize any page which has DYKsubpage on it.  I don't need to play the fancy Template other or category handler games; keying on DYKsubpage looks like all I need to do. -- RoySmith (talk) 03:29, 10 February 2023 (UTC)
 * @Theleekycauldron well, I updated Pending DYK American hooks and Pending DYK biographies to match the versions on testwiki. Pages that include that (ex Did you know nominations/Gimix) show up in Category:Pending DYK American hooks but it's not being listed in the categories at the bottom of the page.  Any idea why? -- RoySmith (talk) 02:16, 11 February 2023 (UTC)
 * I can see it – you got hidden categories enabled? theleekycauldron (talk • contribs) (she/her) 02:51, 11 February 2023 (UTC)
 * Interesting. Yeah, I had "Show hidden categories" unchecked in Special:Preferences.  @Aaron liu you made this a hidden category in Special:Diff/1137532304.  Why? -- RoySmith (talk) 03:01, 11 February 2023 (UTC)
 * @Aaron Liu fix ping. -- RoySmith (talk) 03:02, 11 February 2023 (UTC)
 * I didn't realize that that made it hidden, I reverted it. I shouldn't touch important stuff next time. Sorry for causing this. Aaron Liu (talk) 03:04, 11 February 2023 (UTC)
 * Not a problem. WP:BOLD is a good rule, I just wasn't sure if there was some specific reason. -- RoySmith (talk) 03:05, 11 February 2023 (UTC)