Wikipedia:Bots/Requests for approval/Signpost Book Bot


 * The following discussion is an archived debate. Please do not modify it. To request review of this BRFA, please start a new section at WT:BRFA. The result of the discussion was Symbol keep vote.svg Approved.

Signpost Book Bot
Operator:

Automatic or Manually assisted: Automatic

Programming language(s): PHP

Source code available: http://gist.github.com/418088

Function overview: Takes Wikipedia Signpost articles and puts them into book form

Links to relevant discussions (where appropriate): Bot_requests

Edit period(s): Weekly

Estimated number of pages affected: 600ish first run, with about 3-4 a week after that

Exclusion compliant (Y/N): Not needed

Already has a bot flag (Y/N): No

Function details:

The goal is to port sign post articles to Books. Examples of the formatting of the book and directory are here and here

Book page creation
 * Gets all pages with prefix Wikipedia_Signpost in project namespace
 * Runs though them all looking for ones that match the standard article title. (Wikipedia:Wikipedia_Signpost/20xx-xx-xx)
 * Makes sure they aren't in Category:Wikipedia books on the Wikipedia Signpost
 * Builds the page for them, and saves
 * Creates a talkpage with WBOOKS

Directory creation
 * Gets pages that are in Category:Wikipedia books on the Wikipedia Signpost
 * Makes sure they match the standard book title. (Book:Wikipedia_Signpost/20xx-xx-xx)
 * Builds a well formatted list with all the book pages, and saves

Discussion
Yes! This is exactly what is needed. Could someone approve for trial? Headbomb {talk / contribs / physics / books} 07:01, 29 May 2010 (UTC)
 * A BRfA for this task has already been submitted at Bots/Requests for approval/SpeakerBot 3 - Kingpin13 (talk) 07:11, 29 May 2010 (UTC)

You'd be surprised at how exclusion compliance is quite helpful. Josh Parris 07:22, 29 May 2010 (UTC)


 * Given that the bot only touches Signpost book pages and the directory, I don't see a scenario where a user would not want the bot ever touching the page. Could you come up with one? It wouldn't be to hard to add it, it'd just be more code to run and possibly more API calls. FinalRapture - † ☪ 07:25, 29 May 2010 (UTC)


 * Regeneration of the lot (this time with a purple background and different font), except for this page, this page and this page. Josh Parris 07:28, 29 May 2010 (UTC)


 * In the case of Regeneration of the lot, would the bot replace the article regardless, or only if not edited by a human, or some other condition? Josh Parris 07:34, 29 May 2010 (UTC)


 * Exclusion compliance should be there just in case. I doubt it would be used, but we never know. Headbomb {talk / contribs / physics / books} 07:37, 29 May 2010 (UTC)


 * The way the bot works by default is that when is goes to regenerate the lot it won't bother with pages that are in the Category Category:Wikipedia books on the Wikipedia Signpost. Basically a human could in fact get away with editing the article page however it would most likely be picked up by a vandalism fighter eventually. As for exclusion compliance I'm coding that into the bot now. FinalRapture - † ☪ 07:38, 29 May 2010 (UTC)


 * Oh, you have something ready to trial? Shall we start small? Josh Parris 07:39, 29 May 2010 (UTC)

Something from very early on, something pretty recent, and something in the middle. Let's see what breaks. Josh Parris 07:44, 29 May 2010 (UTC)


 * The bot goes in chronological order, I could hack something in to override this but then it could add additional problems or cover something up. FinalRapture - †</b> <b style="color:#222222;">☪</b> 07:45, 29 May 2010 (UTC)
 * Please do; I'd rather have it break here and now with everyone watching than later. Josh Parris 07:46, 29 May 2010 (UTC)
 * I realized that newer signpost pages are using a template based approach for them, which won't work for the current method. Because it's 4am I'm past my threshold for being able to produce quality code. I'll have to fix this tomorrow and start the trial then. I'm sorry that I didn't realize this sooner. I guess it's good we did it your way :x <b style="color:#222222">FinalRapture</b> - <b style="color:#222222;">†</b> <b style="color:#222222;">☪</b> 07:56, 29 May 2010 (UTC)
 * You do realize that this is a dup of SpeakerBot 3, right? OpenTheWindows, sir! 12:23, 29 May 2010 (UTC)
 * Yes, I was aware. The robot has been fixed and is about to trial. <b style="color:#222222">FinalRapture</b> - <b style="color:#222222;">†</b> <b style="color:#222222;">☪</b> 14:00, 29 May 2010 (UTC)

Trial complete
It did 6 edits because it also creates book talk pages per the request. I looked at the edits and everything looks okay, the next thing to test would be the Directory generation. <b style="color:#222222">FinalRapture</b> - <b style="color:#222222;">†</b> <b style="color:#222222;">☪</b> 14:08, 29 May 2010 (UTC)


 * Looks good, although it didn't run on any of the template-based signposts, and it didn't update the directory. I think this should be tested before fully unleashing the bot. Headbomb {talk / contribs / physics / books} 16:13, 29 May 2010 (UTC)


 * Oops., I ran it while logged out first by accident once. <b style="color:#222222">FinalRapture</b> - <b style="color:#222222;">†</b> <b style="color:#222222;">☪</b> 16:17, 29 May 2010 (UTC)


 * A minor remark, currently the edit summary is "Creating book page for the Wikipedia Signpost (BOT)". I think it would be better to be a bit more verbose. Something like "Creating book version of the Wikipedia Signpost/2005-01-10. Report missing articles, or bad article titles on User talk:Signpost Book Bot. Report rendering problems at Book talk:Wikipedia Signpost." Thoughts? Headbomb {talk / contribs / physics / books} 16:31, 29 May 2010 (UTC)


 * Sure, that would work. <b style="color:#222222">FinalRapture</b> - <b style="color:#222222;">†</b> <b style="color:#222222;">☪</b> 16:34, 29 May 2010 (UTC)

Likewise to facilitate the centralization of problem reports, it would be nice if the bot could leave a notice on the talk pages when it creates them. Something like

Problems?

 * To report missing articles, bad titles and other similar problems, please use User talk:Signpost Book Bot
 * To report rendering issues and for general discussion, please use Book talk:Wikipedia Signpost

This will greatly facilitate communication between everyone. Thank you. Headbomb {talk / contribs / physics / books} 16:42, 29 May 2010 (UTC)
 * Chuck it all in a template and you can discuss the specifics there. Josh Parris 10:52, 30 May 2010 (UTC)

What are you going to do to ensure the bot edits logged in? Have you looked at using m:Extension:Assert Edit? Josh Parris 11:07, 30 May 2010 (UTC)


 * To make sure the bot is logged in I'll modify the wikibot class to not allow edits unless it successfully logs in. I'll put that in a template also. <b style="color:#222222">FinalRapture</b> - <b style="color:#222222;">†</b> <b style="color:#222222;">☪</b> 14:00, 30 May 2010 (UTC)

Directory creation
So, as I understand it, the Directory creation code still needs testing. Shall we do a couple more issues and a directory? Josh Parris 00:58, 31 May 2010 (UTC)
 * Alright, let me just create the template for talk pages, and we'll be on our way. <b style="color:#222222">FinalRapture</b> - <b style="color:#222222;">†</b> <b style="color:#222222;">☪</b> 00:59, 31 May 2010 (UTC)


 * Two glitches that were both corrected, the bot is complete and working fine <b style="color:#222222">FinalRapture</b> - <b style="color:#222222;">†</b> <b style="color:#222222;">☪</b> 01:44, 31 May 2010 (UTC)
 * Yup, looks good to me. Headbomb {talk / contribs / physics / books} 01:50, 31 May 2010 (UTC)

the edits look good. Josh Parris 01:53, 31 May 2010 (UTC)
 * The above discussion is preserved as an archive of the debate. Please do not modify it. To request review of this BRFA, please start a new section at WT:BRFA.