Skip to content
Ilya edited this page Sep 8, 2019 · 25 revisions

Running

Running jar file from OS command line:

Requirements:

  • Java Development Kit (JDK) 8 or later. Check your current Java version with the command java -version. You can download Java 8 Development Kit from AdoptOpenJDK if you don't have Java 8 installed
  • Set environment variables SCALAWIKI_LOGIN and SCALAWIKI_PASSWORD. Bot will not be able to save pages if these are not set. Bot accounts have higher limits and can download more information at once.

set SCALAWIKI_LOGIN=you wiki account login

set SCALAWIKI_PASSWORD=you wiki account password

java -Xmx2G -jar scalawiki-wlx-0.6.0.jar -campaign wle-ua -year=2019 -sy=2013 -new-object-rating 10 -new-author-object-rating 2 -authors-stat -regional-stat -gallery -wrong-ids -low-res

Bot automatically caches responses into files with extentsion *.wiki. Delete them to refetch the data.

Java by default uses a limited amount of memory (maximum heap size), wich is usually either 1/4 of system memory size or 1GB whichever amount is bigger. If bot does not have enough memory maximum heap size can be increased with a -Xmx flag. For example to give java 2GB of RAM add -Xmx2G option to the command line

Parameters summary

  [-h | --h | --help]                                      Show this help message.
  [-y | -year  year]                                       contest year.
  [-sy | -startyear  startyear]                            start year.
   -campaign  campaign                                     upload campaign, like wlm-ua
  [-region  region]                                        region code
  [-exceptregion  except regions]                          except region codes
  [-city  cities]                                          cities
  [-exceptcity  exceptcities]                              except cities
  [-new-object-rating  new-object-rating]                  new object rating
  [-new-author-object-rating  new-author-object-rating]    new author object rating
  [-number-of-authors-bonus]                               number of authors bonus
  [-number-of-images-bonus]                                number of images bonus
  [-gallery]                                               gallery
  [-fill-lists]                                            fill lists
  [-wrong-ids]                                             report wrong ids
  [-low-res]                                               report low resolution photos
  [-special-nominations]                                   report special nominations
  [-regional-stat]                                         report regional statistics
  [-authors-stat]                                          report authors statistics
  [-regional-gallery]                                      report regional gallery
  [-missing-gallery]                                       report missing galleries

Running from sbt:

sbt "runMain org.scalawiki.wlx.stat.Statistics -campaign wle-ua -year=2019 -sy=2013 -new-object-rating 10 -new-author-object-rating 2 -authors-stat -regional-stat -gallery"

Description

Main source file

Bot gathers WLE/WLM data and creates the following reports: