On 17/05/06, Ken McDonald ken@pixologic.com wrote:
Just to make the following intelligible without going through everything, I'm trying to "batch upload" images into a local MediaWiki site, using rebuildImages.php. Here is Rob's reply to my most recent question:
Either use the script I mentioned in a former post (which can be stolen from SVN trunk) or set $wgHashedUploadDirectory to false and try again.
Rob Church _______________________________________________
And, unfortunately, here is what I did in "rebuildImages.php":
function crawlMissing() { global $wgUploadDirectory, $wgHashedUploadDirectory; $wgHashedUploadDirectory = FALSE; if( $wgHashedUploadDirectory ) {
and the following command line execution and result:
kenneth-mcdonalds-computer:~/Sites/mediawiki-1.6.5/maintenance Ken$ php rebuildImages.php --missing wikidb 2006-05-17 20:06:18: crawling /Users/Ken/Sites/mediawiki-1.6.5/images wikidb 2006-05-17 20:06:19: Surprising mime type: unknown/unknown wikidb 2006-05-17 20:06:19: /Users/Ken/Sites/mediawiki-1.6.5/images/README kenneth-mcdonalds-computer:~/Sites/mediawiki-1.6.5/maintenance Ken$
I get the feeling that if only I could tell rebuildImages where I _really_ want it to get the new images from, I could get this to work. But I don't have the PHP or MW knowledge to try that with even the smallest likelihood of success. Can I simply set $wgUploadDirectory to something appropriate, and if so, is the path absolute in the computer, relative to the main MW directory, or specified somehow else :-)
Rob mentioned another possible script I could check out from SVN, and I'll try that if I have to. But I feel this is _so_ close, surely I must be able to get it to work...and I'm not really a development geek, so I'd prefer to avoid messing around with Subversion.
http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/maintenance
For importImages.php and importImages.inc.php, click the file name, hit download, and save in maintenance/ with those filenames. Then run from the command line, pointing at a dir. full of images.
I also referred to setting $wgHashedUploadDirectory to false, but intended for this to be set in LocalSettings.
And the script sounds like it's failing because of some weird MIME error. Psst...the bulk importer doesn't do MIME checking at the moment.
Rob Church