A small tool based on Silex and Guzzle to import files from Internet Archive to Wikimedia Commons.
-
Clone from GitHub:
git clone https://github.com/Tpt/ia-upload
-
Install dependences:
composer install
-
Set up URL rewriting:
-
For Apache use the following in
web/.htacess
:RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php/$1 [L]
-
For Lighttpd, use:
url.rewrite-if-not-file += ( "(.*)" => "index.php/$0" )
-
-
Register an oAuth consumer on Meta with a callback to e.g.
http://localhost/ia-upload/web/oauth/callback
(i.e. ending inoauth/callback
) -
Edit
config.ini
to add your consumer key and secret -
Make sure the
temp
directory is writable by the web server