Dicare Tools are a set of tools to contribute to and to gather statistics about Wikimedia projects.
dicare-tools
is a web project.
This documentation covers the installation of Dicare Tools under a Linux system, at the URL https://tools.dicare.org/
.
curl
, intl
(only for Lexemes Party and Lexemes Challenge), and mysqli
Copy all files from the project dicare-tools
into /var/www/tools.dicare.org
.
Configure a new site on your web server, with /var/www/tools.dicare.org/www
as the root directory.
An example of nginx site configuration is available in doc/nginx.example.conf
.
Dicare Tools require a MySQL database.
You can install the MySQL server using the official repositories.
Create a new database on your MySQL server:
CREATE DATABASE `dicare` DEFAULT CHARACTER SET 'utf8mb4';
Create a user (change the password):
CREATE USER 'dicare'@'localhost' IDENTIFIED BY 'xxxxxxx';
Grant to the user all rights on the database:
GRANT ALL ON `dicare`.* TO 'dicare'@'localhost';
Grant to the user the right to access files:
GRANT FILE on *.* to 'dicare'@'localhost';
Initialize the schema with the script doc/schema.sql
.
Related Properties and Related Projects require the project dicare-tools-import
.
Copy the file wdtk-import.jar
(generated by the project dicare-tools-import
) into the scripts
directory.
By default, Wikidata JSON dumps are stored in /home/wikidata/dumpfiles
(see the project dicare-tools-import
to change that). This directory must be readable and writable by the user who starts the imports.
Create the file conf/conf.inc.php
, using the example conf/conf.example.php
.
Most important variables are:
DB_HOST
: host of the MySQL serverDB_USER
: MySQL userDB_PASSWORD
: password of the MySQL userDB_NAME
: name of the MySQL schemaSITE_DIR
: URL of Dicare ToolsSITE_STATIC_DIR
: URL of the directory with static web resources of Dicare ToolsJobs are described in the file conf/jobs.yaml
.
On Wikimedia Toolforge, run the following command to load them:
toolforge-jobs load conf/jobs.yaml
To force an update, go into the scripts
directory and use the following command:
bash name.cron.sh
To start an import, go into the scripts
directory and use the following command:
bash import.sh
By default, the import use the last JSON dump, downloading it if it is not already present on the server.
You can import another dump by specifying the date of the dump as a parameter:
bash import.sh 20180604
In that case, the JSON dump must be already present on the server.
This project is under AGPLv3 license. See LICENSE, NOTICE, and CONTRIBUTORS files for complete credits.