This repository has been archived by the owner. It is now read-only.
Explore imageless wikipages and find a free of rights illustrations from Google or Flickr.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
project
src/main
.gitignore
LICENSE
README.md
build.sbt

README.md

Mediawiki imagebot

This is a bot project part of the EPFL's Digital Humanities 2016 course. It aims to illustrate each Mediawiki-like page using both Google Images API and Flickr API as Creative Commons image sources.

Setup

All the configuration is located in src/main/resources/application.conf, change the fields accordingly. The files flickr.ks and google.keys should be created in the root folders and contains respective api keys. Note that you can add more than one Google key.

cat ./flickr.ks
key
secret
cat ./google.keys
key1
key2

Scenarios

A scenario is specific task using the predefined imagebot functions.

// single page example
object BotASable extends BotApp {
  bot.signIn()
  val Some(page) = bot.load("BotASable")
  GoogleSearch(page.title) march {
    case (image, file) :: _ => bot.add(page, image, file)
    case _ => // no result
  }
}

License

Project is available under CC-BY-NC-SA 4.0 and data belong their owners under appropriate licensing.