User talk:Chris G/Archives/2012/August
This is an archive of past discussions with User:Chris G. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Bot bug
Would you please instruct your bot to kindly stop tagging images for deletion that were already deleted several days ago? (e.g., Special:Undelete/File:Type 1 Diabetes Awareness Ribbon.jpg) This seems to be a recurring problem. Magog the Ogre (talk) (contribs) 12:49, 31 July 2012 (UTC)
The Signpost: 06 August 2012
- News and notes: FDC portal launched
- Arbitration report: No pending or open arbitration cases
- Featured content: Casliber's words take root
- Technology report: Wikidata nears first deployment but wikis go down in fibre cut calamity
- WikiProject report: Summer sports series: WikiProject Martial Arts
removing rfc right after appointing an id for it
Hi. About your bot. appointing an id and removing template right away, what is it? Pessimist2006 (talk) 19:58, 4 August 2012 (UTC)
- The bot was removing it because the request appeared to be expired. Fixed (note the change in timestamp). --Chris 09:31, 8 August 2012 (UTC)
RFC bot
Hello Chris G. My account was renamed a few months ago, so I updated WP:FRS to reflect the change. In spite of that, the bot keeps notifying my old talk page. Perhaps the bot has an old cached version of WP:FRS or isn't reading the page before running? Thanks —DoRD (talk) 14:35, 6 August 2012 (UTC)
- Sorry, that should be fixed now. --Chris 09:31, 8 August 2012 (UTC)
Keeping track of Good articles
Hi Chris. I have made a request for a bot at Wikipedia:Bot requests/Archive 49#Keeping track of Good articles that might interest you. Hopefully, if it is doable, it could work with GA bot to present more information at WP:GAN. Regards AIRcorn (talk) 09:41, 8 August 2012 (UTC)
The Signpost: 13 August 2012
- Op-ed: Small Wikipedias' burden
- Arbitration report: You really can request for arbitration
- Featured content: On the road again
- Technology report: "Phabricating" a serious alternative to Gerrit
- WikiProject report: Dispute Resolution
- Discussion report: Image placeholders, machine translations, Mediation Committee, de-adminship
Please comment on Template talk:Infobox software
Greetings! You have been randomly selected to receive an invitation to participate in the request for comment on Template talk:Infobox software. Should you wish to respond to the invitation, your contribution to this discussion will be very much appreciated! If in doubt, please see suggestions for responding. If you do not wish to receive these types of notices, please remove your name from Wikipedia:Feedback request service. — RFC bot (talk) 12:17, 15 August 2012 (UTC)
RFC bot bug
Question about edit summaries used by RFC bot [1]: why is it that for several weeks now, every edit summary of RFC bot on Wikipedia:Requests for comment/Language and linguistics has been claiming it is removing the same case Talk:Cigarette holder over and over again, when that entry has in reality been gone for months? That's really a bit annoying. Fut.Perf. ☼ 13:49, 13 August 2012 (UTC)
- Sorry. That was happening because RFC bot was trying to remove the RfC as expired, however because of some funkyness with the wikitext, it was unable to. The bot continued editing, assuming the RfC template had been removed correctly (which it hadn't), hence the edit summary. Naturally next time the bot ran, the same thing happened. Thank you for fixing the problem, by removing the template properly. One of my long term projects is creating a better way to parse wikitext, which will hopefully make this a thing of the past. --Chris 11:35, 16 August 2012 (UTC)
- Poor bot. Trying to parse wikitext must be a horror. One way to fix this might be that after trying to do its removal trick, it does a comparison between the original page text and the new one to see if it's actually changed anything; if, counter to expectations, nothing has changed, it knows something went wrong. Fut.Perf. ☼ 14:04, 16 August 2012 (UTC)
Botclasses
Hi! Just a couple of quick questions, ...
- Is botclasses.php (http://toolserver.org/~chris/highlight.php?d=chris/classes/&f=botclasses.php) current - in terms of working with Wikipedia and/or other wikis on near-the-same MediaWiki version?
- Do you have a sample script using the class which uploads files?
I'm asking as I am sorting out a few bits and pieces for Wikinews, and the Wikinewsie "toolserver". For some of the reporting work planned for the Paralympics we'll have people at the games dumping audio/video/images into Dropbox and I need to have our server do tasks like convert to free formats and upload to the appropriate wikis. --Brian McNeil /talk 12:57, 15 August 2012 (UTC)
- To be honest, botclasses is in a bit of a state of disrepair at the moment. It really needs a good rewrite (and has for some time now), but being the lazy person I am, I haven't got around to it yet. There are a couple of different versions of it lying around now, none of them are great, but they all "should" work. The version you linked should be fine, or, you can try your luck with this one, which is a half cleaned up version.
I don't have any sample scripts, but this should (hopefully) work:
<?php
require_once 'botclasses.php';
$wiki = new wikipedia;
$username = 'my_bot_account';
$password = 'my_bot_password';
$wiki->url = 'http://en.wiki.x.io/w/api.php'; // Change this to suit your wiki
$wiki->user_agent = 'MyBot with botclasses.php';
$wiki->editlaps = 5; // delay in seconds between 2 edits (default 20s)
$wiki->login($username,$password);
$destination = 'Example.jpg'; // The file name for when the image is uploaded to the wiki
$local_file_path = '/home/foobar/example.jpg'; // The location of the file on the local computer
$page_description = 'An example image. {{PD}}'; // The page description
$wiki->upload($destination,$local_file_path,$page_description);
?>
I hope this helps, and apologies about the pretty awful state the code base is in. --Chris 11:17, 16 August 2012 (UTC)
- No apology needed, code doesn't need to be purty to work. I'm just left wondering why, with so many helper bots reliant on the API, the MediaWiki devs haven't pulled maintenance of something like this in-house. They could roll out updates to it in parallel with tweaks and updates to the API.
- Fortunately, or unfortunately if you're really keen on truly free media, almost all the images/video/audio we'll get from the Paralympics will have to go on Wikinews under fair use. But, it'll be pretty cool having people get content with their iPhone or Android and having it on-wiki via Dropbox moments later. --Brian McNeil /talk 11:56, 16 August 2012 (UTC)
- Scary. It works.
<?php
/* English Wikinews Dropbox auto-uploader
Version History:
0.0.1-alpha August 16, 2012 BMcN Initial, limited scope.
Description:
This script is intended to be run off cron, and to scan relevant directories
within the shared dropbox area for upload to English Wikinews.
*/
require_once './botclasses.php';
$page_text_default =
"This file was automatically uploaded by [[User:NewsieBot|NewsieBot]] from the accredited reporters' shared Dropbox
It is the responsibility of the user who shared this file via Dropbox to ensure it is correctly categorised and
ownership claimed before making use of the file in any news articles\n
Please help ensure this bot is not misused, ''whilst still allowing reasonable time for reporters to resolve issues'',
by not speedily deleting files unless still unused after one week.\n
[[Category:Imported from Dropbox]]\n[[Category:Uploaded by NewsieBot]]";
$wiki = new wikipedia;
$username = 'NewsieBot';
$password = '************************';
$wiki->url = 'http://en.wikinews.org/w/api.php'; // Change this to suit your wiki
## $wiki->user_agent = 'NewsieBot with botclasses.php'; // This gave errors
$wiki->editlaps = 1; // delay in seconds between 2 edits (default 20s)
$wiki->login($username,$password); // Log in to the wiki.
// Now, we keep a list of the files we process - so they can be moved elsewhere once uploaded
$proc_files = array();
$to_be_converted = array();
$path = 'Dropbox/Wikinews/upload_enWN/'; // Where we'll scan from.
if ($handle = opendir( $path ) ) {
echo "Directory handle: $handle\n";
echo "Files:\n";
while (false !== ( $file = readdir($handle))) {
$pathAndFile = $path.$file;
if ( !is_dir ( $pathAndFile ) ) {
$file_components = pathinfo($pathAndFile);
switch ($file_components['extension']) {
case "png":
case "gif":
case "jpg":
case "jpeg":
case "xcf":
case "pdf":
case "mid":
case "ogg":
case "ogv":
case "svg":
case "djvu":
case "tiff":
case "tif":
case "oga":
echo "Uploading $file\n";
$dest = $file;
if ( ( $wiki->upload($dest,$pathAndFile,$page_text_default) ) !== false )
$proc_files[] = $file;
break;
case "mpeg":
case "mpg":
case "avi":
echo "Need to convert $file\n";
$to_be_converted[] = $file;
break;
default:
echo "File $file is not a type I can handle. Sorry\n";
break;
}
}
}
}
closedir($handle);
}
$x = 0;
foreach ($to_be_converted as $file) {
rename( $path.$file, $path.'converting/'.$file );
}
$x = 0;
foreach ($proc_files as $file) {
rename( $path.$file, $path.'done/'.$file );
}
?>
- If you can spot any improvements, give me a shout. I've now to code the next bit which is to assault avi/mpeg files with ffmpeg, then upload 'em. Also need to bung in a few bits 'n' pieces to ensure if it hits a large batch of files it doesn't end up starting a second instance.
- Do you know offhand if, when a large video file is uploaded, will the API 'hang' until such time as it's generated the usual random thumbnail? --Brian McNeil /talk 14:25, 16 August 2012 (UTC)
Bot ignoring NOWIKI tag
Could you take a look at this diff: http://en.wiki.x.io/w/index.php?title=Talk:Information_technology&diff=507849405&oldid=507846099 The bot appears to have created an entry in the appropriate RfC subpage, as well as assigning an ID here. Not sure what to do without confusing the bot even more. --Boson (talk) 17:18, 17 August 2012 (UTC)
- The bot can't read nowiki tags (Why? Parsing wikitext is a pain; eventually I'll finish writing my complete wikitext parser, and this will be a thing of the past.). This should do the trick.--Chris 02:06, 18 August 2012 (UTC)
Please comment on Template talk:Magazine
Greetings! You have been randomly selected to receive an invitation to participate in the request for comment on Template talk:Magazine. Should you wish to respond to the invitation, your contribution to this discussion will be very much appreciated! If in doubt, please see suggestions for responding. If you do not wish to receive these types of notices, please remove your name from Wikipedia:Feedback request service. — RFC bot (talk) 13:15, 18 August 2012 (UTC)
Gravely voice?
Hi Chris. I think WP:W is the best and I really appreciate that RFC bot keeps it updated. I think your bot is a fabulous resource for the community and I thank you kindly for providing us with such a valuable tool. Anyhoo, I was curious about the gravely voice? Thanks for all the support you've given to the community. Kind regards. 64.40.54.17 (talk) 14:34, 19 August 2012 (UTC)
- Nevermind. It's exclamation points in the AN section title interfering with the table formating. It'll clear itself when the thread drops off. Best regards. 64.40.54.17 (talk) 15:02, 19 August 2012 (UTC)
Status template
Hi, at my user page, the status template for your bot does not appear to be working. Did I do something wrong? My status page is at User:Thekillerpenguin/status, so can you take a look? Thekillerpenguin (talk) 03:40, 21 August 2012 (UTC)
The Signpost: 20 August 2012
- In the news: American judges on citing Wikipedia
- Featured content: Enough for a week – but I'm damned if I see how the helican.
- Technology report: Lua onto test2wiki and news of a convention-al extension
- WikiProject report: Land of Calm and Contrast: Korea
Please comment on Template talk:Infobox company
Greetings! You have been randomly selected to receive an invitation to participate in the request for comment on Template talk:Infobox company. Should you wish to respond to the invitation, your contribution to this discussion will be very much appreciated! If in doubt, please see suggestions for responding. If you do not wish to receive these types of notices, please remove your name from Wikipedia:Feedback request service. — RFC bot (talk) 13:15, 21 August 2012 (UTC)
Please comment on Wikipedia talk:Template messages/User talk namespace
Greetings! You have been randomly selected to receive an invitation to participate in the request for comment on Wikipedia talk:Template messages/User talk namespace. Should you wish to respond to the invitation, your contribution to this discussion will be very much appreciated! If in doubt, please see suggestions for responding. If you do not wish to receive these types of notices, please remove your name from Wikipedia:Feedback request service. — RFC bot (talk) 14:15, 24 August 2012 (UTC)
Odd error
Hello,
why your bot is not adding my recently nominated articles such as Myxogastria? Regards.--Kürbis (✔) 17:57, 23 August 2012 (UTC)
- You added the subtopic, in a separate edit. Normally {{GA/Subtopic}} would translate the sub topic correctly from "Biology" to "Biology and medicine", but because you add the sub topic in the second edit, it doesn't happen. --Chris 07:17, 25 August 2012 (UTC)
- Thanks for your explanation. Regards.--Kürbis (✔) 10:38, 25 August 2012 (UTC)
RFC Bot
Hi Chris. RFC Bot seems to be mucking up the formatting at Wikipedia:Requests for comment/Economy, trade, and companies with new listings appearing indented from the one above. Could you take a look? It maybe to do with the info box in the listing at the top. Thanks! 203.27.72.5 (talk) 00:26, 26 August 2012 (UTC)
Please comment on Wikipedia talk:Teahouse
Greetings! You have been randomly selected to receive an invitation to participate in the request for comment on Wikipedia talk:Teahouse. Should you wish to respond to the invitation, your contribution to this discussion will be very much appreciated! If in doubt, please see suggestions for responding. If you do not wish to receive these types of notices, please remove your name from Wikipedia:Feedback request service. — RFC bot (talk) 14:15, 27 August 2012 (UTC)
The Signpost: 27 August 2012
- News and notes: Tough journey for new travel guide
- Technology report: Just how bad is the code review backlog?
- Featured content: Wikipedia rivals The New Yorker: Mark Arsten
- WikiProject report: From sonic screwdrivers to jelly babies: Doctor Who
Please comment on Wikipedia:Requests for comment/Memento
Greetings! You have been randomly selected to receive an invitation to participate in the request for comment on Wikipedia:Requests for comment/Memento. Should you wish to respond to the invitation, your contribution to this discussion will be very much appreciated! If in doubt, please see suggestions for responding. If you do not wish to receive these types of notices, please remove your name from Wikipedia:Feedback request service. — RFC bot (talk) 14:15, 30 August 2012 (UTC)