(Translated by https://www.hiragana.jp/)
GitHub - envlh/dicare-tools: Tools to contribute to and gather statistics about Wikimedia projects.
Skip to content

Tools to contribute to and gather statistics about Wikimedia projects.

License

Notifications You must be signed in to change notification settings

envlh/dicare-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

Dicare Tools are a set of tools to contribute to and to gather statistics about Wikimedia projects.

dicare-tools is a web project.

Installation

This documentation covers the installation of Dicare Tools under a Linux system, at the URL https://tools.dicare.org/.

Requirements

  • a web server (seems OK with Apache and nginx)
  • PHP 7+, with curl, intl (only for Lexemes Party and Lexemes Challenge), and mysqli
  • MySQL 5.7+ (seems OK with MariaDB)
  • Java 8+ (only for Related Properties and Related Projects)

Web server

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.

MySQL

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.

Dependency

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.

Configuration

Main configuration

Create the file conf/conf.inc.php, using the example conf/conf.example.php.

Most important variables are:

  • DB_HOST: host of the MySQL server
  • DB_USER: MySQL user
  • DB_PASSWORD: password of the MySQL user
  • DB_NAME: name of the MySQL schema
  • SITE_DIR: URL of Dicare Tools
  • SITE_STATIC_DIR: URL of the directory with static web resources of Dicare Tools

Crontab

Jobs are described in the file conf/jobs.yaml.

On Wikimedia Toolforge, run the following command to load them:

toolforge-jobs load conf/jobs.yaml

Imports

Names statistics

To force an update, go into the scripts directory and use the following command:

bash name.cron.sh

Related Properties and Related Projects

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.

Copyright

This project is under AGPLv3 license. See LICENSE, NOTICE, and CONTRIBUTORS files for complete credits.

See also

About

Tools to contribute to and gather statistics about Wikimedia projects.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •