User talk:Pilk

Bot project
I don't think that the copyright issues will be a big deal; in practice, nobody is likely to raise an objection after you to upload the content. Possession is 9/10ths of the law. Anyhoo, this doesn't sound like a particularly difficult thing you're trying to do, although you'll need to figure out how to write a PHP script to control the botclasses.php file they mentioned. There is probably already code out there on the internet that can recursively spider the directory system and give you a list of all the files and their paths; then you just feed that into your bot, after telling it to upload everything in the file it's given, and you're done. Actually, I need to do a similar project on my wiki, so maybe I'll write that code and then can give it to you. Tisane (talk) 21:16, 4 June 2010 (UTC)
 * That sounds great! What would I need to set up and operate a PHP script on my computer? Please let me know as soon as something becomes available if you choose to do this. :) — surlyanduncouth (talk) 05:22, 5 June 2010 (UTC)
 * It's not mandatory, but I found it eliminated a lot of headaches when I switched to Ubuntu Linux to do my development/sysadmin work. You probably already have PHP on whatever system you have; you can just go to a command prompt and type "php whatever.php" and it will run. If you are on Linux and don't already have PHP, it will probably give you instructions on how to install it when you type that.


 * I've been using mw:Manual:Wikibot, which is a fork of wikibot.classes.php, to do my bot-related stuff. I probably should have forked botclasses.php instead, since it's a simpler codebase with less legacy code, but oh well; I'm feeling kinda lazy about fixing something that isn't broken at this point. Tisane (talk) 13:30, 5 June 2010 (UTC)
 * OK, I just uploaded a slew of files to my wiki using mw:Manual:Wikibot/UploadBot. Give that a try. Tisane (talk) 15:41, 5 June 2010 (UTC)


 * I can't so I know exactly what I'm talking about, but it appears that there are two  in that script. Is that intentional? Anyway I'll give this a trial run on the current server when I have time. It may be a week or so until I can do this on the new server. Thank you once again. :) — surlyanduncouth (talk) 17:54, 5 June 2010 (UTC)
 * Good catch; there was supposed to be only one $path. Tisane (talk) 18:04, 5 June 2010 (UTC)
 * Try downloading it again.  Tisane  talk/stalk 03:37, 13 June 2010 (UTC)

It's probably fixable. What OS are you running? If you have shell access to a Linux server, chances are it has PHP. Then of course there is always the possibility of downloading PHP. http://php.net/downloads.php  Tisane  talk/stalk 05:15, 13 June 2010 (UTC)
 * Ugh, Vista. I remember my days of trying to program PHP on a Vista machine with a failing hard drive. What an exercise in frustration! Anyway, it shouldn't be a deal-breaker. Hmm, not sure why the uploadbot isn't working. Oh wait, maybe I do know. Sometimes you have to create a "Run" subpage of your bot's userpage, e.g. User:TisaneBot/Run, before the bot will run. I don't remember for sure, but I think it checks the existence of that page to make sure everything's okay to run, and if it doesn't exist, it won't run. Another possibility is that your path isn't configured properly. See if either of those are the issue.  Tisane  talk/stalk 06:11, 13 June 2010 (UTC)
 * Cool, glad to be of assistance. Welcome to the world of MediaWiki bots, by the way. You'll find there are all kinds of repetitive tasks they can help you with. I added some documentation about the "Run" page to MediaWiki.org, so hopefully that won't trip up future users.  Tisane  talk/stalk 07:00, 13 June 2010 (UTC)

Just so you know, we have a new bot framework called Peachy that is a lot better than Wikibot, and is probably the one that the other PHP bot frameworks will be phased out in favor of. It's pretty well-coded and well-documented, plus it's easily configurable and extensible, so I would recommend going with that one if you have more bot-related stuff to do.  Tisane  talk/stalk 16:30, 1 July 2010 (UTC)