Wiki Loves Monuments mobile application/WLM DB transfer

  1. Created instance, Ubuntu 12.04
  2. Setup LAMP via `tasksel`
  3. check out PyWikipedia from Trunk ( - needs to be packaged up later.
  4. Setup mysql config for the bot at
  5. run pywikipedia/ Generate Pick wikipedia. Pick en. Bot's user name (wlm-mobile-bot). Small variant. add db_username, db_password and db_hostname to the file manually. is generated, is copyable and reusable.
  6. run pywikipedia/ to check if login is setup properly
  7. Check out
  8. Setup a mysql user and database, and make sure the user has access to the database.
  9. set config from 8 in erfgoedbot/ (database and host info)
  10. run to generate sql statements in sql/. See FIXME down. Must manually replace toolserver hostname in a few sql statements with appropriate db hostname.
  11. set PYTHONPATH to include path to the pywikipedia source.
  12. install the python-mysqldb package
  13. Run to start the update process.
  14. Run sql/fill_table_monuments_all.sql to aggregate all the different monument data into one.
  15. Checkout into ~/public_html/api, symlink it to /var/www/api
  16. Checkout into ~/ToolserverI18N.
  17. Modify file absolute path references to Toolserver18N in api/api.php
  18. Create ~/, with global variable $toolserver_password set to the password of the database being used. (ewww!)
  19. Modify database host and user information in api/includes/Monuments.php
  20. Setup cron to run once a day, with something along the lines of

(more at )

FIXME (will have corresponding bugs):

  • create_table_commonscat.sql has hardcoded reference to toolserver. So does fill_table_monuments_all.sql and create_view_monuments_all.sql
  • db_username, db_password, db_hostname should not be needed in
  • hack on api should be fixed
  • hardcoding paths in the api should be fixed
  • Lots of things toolserver specific, should be weeded out
  • General CR needed before it can be deployed on cluster