Core of Denelezh (everything, except first step of import).
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.
conf
cron
doc
inc
www
.gitignore
LICENSE
NOTICE
README.md

README.md

Description

Denelezh is a website that allows you to explore the gender gap in the content of Wikidata and Wikimedia projects. Data can be aggregated by Wikimedia project and/or by characteristics of human beings (year of birth, country of citizenship, and occupation).

denelezh-core is a PHP project. It handles both the import of the data from Wikidata (except for a little part explained later) and the visualization.

Installation

This documentation covers the installation of Denelezh under a Linux system, at the URL https://denelezh.dicare.org/.

Requirements

  • MySQL 5.7 (compatibility with MariaDB has not been tested)
  • a web server (seems OK with Apache and nginx)
  • PHP 5.6 (seems OK with PHP 7.0)
  • Java 8

MySQL

Denelezh needs a MySQL database.

You can install the MySQL server using the official repositories.

Create a new database on your MySQL server:

CREATE DATABASE `denelezh` DEFAULT CHARACTER SET 'utf8mb4';

Create a user (change the password):

CREATE USER 'denelezh'@'localhost' IDENTIFIED BY 'xxxxxxx';

Grant to the user all rights to the database:

GRANT ALL ON `denelezh`.* TO 'denelezh'@'localhost';

Initialize the schema with the script doc/schema.sql.

Web server

Copy all files from the project denelezh-core into /var/www/denelezh.dicare.org.

Configure a new site on your web server, with /var/www/denelezh.dicare.org/www as the root directory.

An example of nginx site configuration is available in doc/nginx.example.conf.

Imports

A step of the import is done by the project denelezh-import.

Copy the file denelezh-import.jar (generated by the project denelezh-import) into the cron directory.

By default, Wikidata JSON dumps are stored in /home/wikidata/dumpfiles (see the project denelezh-import to change that). This directory must be readable and writable by the user who starts the imports.

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 schema
  • SITE_DIR: URL of Denelezh
  • SITE_STATIC_DIR: URL of the directory with static web resources of Denelezh

Imports

To start an import, go into the cron directory and use the following command:

bash import.cron.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.cron.sh 2018-06-04

In that case, the JSON dump must already be present on the server.

Copyright

This project is under AGPLv3 license. See LICENSE and NOTICE files.

See also