Wikipedia:Bots/Requests for approval/OKBot 5


 * 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

OKBot
Operator:

Time filed: 11:07, Tuesday July 5, 2011 (UTC)

Automatic or Manual: Automatic

Programming language(s): Python

Source code available: It's pywikipedia-based and it will be published when it's ready

Function overview: Update the Alexa ranking field in Infobox_website.

Links to relevant discussions (where appropriate): Template_talk:Infobox_website, Wikipedia_talk:WikiProject_Websites

Edit period(s): Once every month

Estimated number of pages affected: Infobox_website is used by 2770 page but I'll set the bot to work only on the ones I have manually checked.

Exclusion compliant (Y/N): Y (that's automatically done by pywikipedia, right?)

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

Function details: Alexa rankings change constantly. This bot will use a table of website articles and their Alexa URLs to update the rankings once every month. It will use the templates steady, loss, profit and as of and it'll add a to the referencing on Alex.

The code is not ready yet, I just had this idea and it should be ready shorty after the community gives the initial approval.

Discussion
Let's see a small batch first, when you're ready. — HELL KNOWZ  ▎TALK 13:25, 5 July 2011 (UTC)
 * The test edits were made. The increase/decrease/steady templates will be added the next time the bot runs (the current rankings are saved in a database and it will compare the current one to the new one the next time). Please note that Alexa rankings change suddenly, and unless the website is among say the top 100 websites (which are usually more 'stable'), the ranking could be a little bit different from the one that's on Alexa right now.--OsamaK 20:50, 5 July 2011 (UTC)
 * Oh, and I thought I should add " " To let article maintainers (and occasional editors) know about the new bot so they don't waste time updating.--OsamaK 21:08, 5 July 2011 (UTC)
 * The note could be much shorter though, such as "Updated monthly by OKBot". — HELL KNOWZ  ▎TALK 09:46, 6 July 2011 (UTC)
 * OK.--OsamaK 10:45, 6 July 2011 (UTC)
 * Is there no way to detect what is the ranking given in the article already for the inc/dec/steady templates? Even if it doesn't always succeed, a simple regex could catch most of the cases. It would avoid removing the indicator for over 2600 pages (assuming the have it), from which I'm sure someone will raise this issue. — HELL KNOWZ  ▎TALK 09:46, 6 July 2011 (UTC)
 * I think there can be, but the current templates are mostly (very) outdated and using these templates won't give a clear standard on when to use them. For example, the existing ranking could be one-year-old and higher than the current one but the website may be increasing in the last few months. That's why I think these templates should be added based on the difference from last month and thus the bot should start over and record the last month's ranking in a database.--OsamaK 10:45, 6 July 2011 (UTC)
 * Fair enough. — HELL KNOWZ  ▎TALK 12:10, 6 July 2011 (UTC)

— HELL KNOWZ  ▎TALK 12:10, 6 July 2011 (UTC)

Oh and, could you link to this BRFA while in trial and/or to some explanatory page after approval in the edit summary so interested editors can quickly find out the details (per WP:BOTPOL good communication practice)? — HELL KNOWZ  ▎TALK 12:13, 6 July 2011 (UTC)
 * Done. Also, I noticed that many templates do not have an existing Alexa ranking and I could build a simple tool on top of this bot's code to help add Alexa rankings in a semi-automatic way (i.e. I'll review every edit). Does this count as a bot that needs an approval? If yes, do you think it's a good idea?--OsamaK 13:52, 6 July 2011 (UTC)
 * Do make a new BRFA for that, please; since it will be a manual task, and this BRFA can be approved without worrying about more details/trials. — HELL KNOWZ  ▎TALK 14:08, 6 July 2011 (UTC)

Some thoughts:
 * The bot does not check if the reference it removes from the field is used anywhere else (but I see you checked some)
 * An article without or would get a missing references tag error.
 * Non-template based reference usage would conflict WP:CITEVAR, but I have no easy solution for this except keeping a list of articles that use manual references. — HELL KNOWZ  ▎TALK 14:08, 6 July 2011 (UTC)
 * For the first issue, I think the best solution is to run the bot normally and fix the references manually by looking at the pages that AnomieBOT edits (that's how I found these pages, and I'll do this with the next batch). The good thing about this issue is that it needs a one-time fix. For the second and third issues, I can add a list of words that skips the current page. For example, if the page does not contain or, skip, but is there any keyword for articles with manual references? (A template that's usually used or something?)--OsamaK 14:33, 6 July 2011 (UTC)
 * Not really, that's why manual refs are impossible to detect consistently. I suppose you could rely on AnomieBOT for fixing orphaned refs. Another issue is when named references are used and there is a list at the end of article. In such case, removing the only use will create a "reference unused in previous text" error and adding a reference will not follow the reference style. But again, I have trouble imagining a bot detecting and matching these consistently. — HELL KNOWZ  ▎TALK 14:41, 6 July 2011 (UTC)
 * I added a list of words to require before editing the page (they are, and its redirects ). The other issues I think can be fixed when they occur. Again, I'll review the edited pages and fix any occasional mistakes. I'll also publish the source code and the list of articles so editors can give feedbacks.--OsamaK 15:09, 6 July 2011 (UTC)

Well, looks fine to me. I'll leave it up for a few days since the trial went on relatively quick. You could also advertise this by dropping a note by the Websites WikiProject and Infobox itself and add the links to relevant discussions section. — HELL KNOWZ  ▎TALK 15:57, 6 July 2011 (UTC)
 * Here is the source code and here is the list of articles (many articles are yet to be added).--OsamaK 22:39, 6 July 2011 (UTC)
 * It has been very quiet here in the past week. Can I get an approval now?--OsamaK 16:59, 12 July 2011 (UTC)

I feel uneasy approving the bot per two issues:
 * Orphaning references (i.e. removing a named reference that may be used elsewhere in the article or is defined in the footnotes). One bot fixing after another bot is not good practice.
 * Violating CITEVAR (i.e. when article uses manual references and the bot adds a template citation). I can only suggest that articles whose style you cannot detect consistently be put for manual checking/confirmation. — HELL KNOWZ  ▎TALK 17:29, 12 July 2011 (UTC)
 * As I mentioned, I will fix any orphan reference manually since this is easier. I'll need to do this one time on the first run ever. For the second issue I'll remove any problematic article from the already-published list of articles.--OsamaK 19:29, 12 July 2011 (UTC)

Very well. No more issues have been raised by editors/BAG or infobox/wikiproject watchers. Bot serves to update a tedious-to-maintain field. Subject to prompt (in reasonable terms) manual correction of any citation errors/orphaning or CITEVAR issues.

Please also mention in documentation/summary link that inc/dec/steady templates will be updated in the next month's run and that you will be manually fixing any problematic pages. — HELL KNOWZ  ▎TALK 19:45, 12 July 2011 (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.