[Mediawiki-l] Batch overwriting of existing images?
Ken McDonald
ken at pixologic.com
Fri Apr 27 17:25:06 UTC 2007
Can anyone suggest an easy way to do an 'import' of (many) images that
are actually updates of previously existing images (and have the same
names)? Even if I modify the first existence test in the importImages
script, I'm guessing that the statement,
$image->recordUpload( '', 'Importing image file' )
will still fail because the database (or other MW code) will prevent
overwriting of an existing file by another file.
At the moment the best way I can think of to do this is to simply write
a script that would go through the 'images' directory and a directory of
the new images, and replace on the basis of names. Even there, I'm not
sure if the metadata will change appropriately, nor if it needs to.
Thanks,
Ken
More information about the MediaWiki-l
mailing list