https://github.com/yonathan06/cassandra-glam-tools
A usage analysis tool for GLAM institutes to follow free contents contributed to Wikimedia projects
https://github.com/yonathan06/cassandra-glam-tools
Last synced: about 1 year ago
JSON representation
A usage analysis tool for GLAM institutes to follow free contents contributed to Wikimedia projects
- Host: GitHub
- URL: https://github.com/yonathan06/cassandra-glam-tools
- Owner: yonathan06
- License: mit
- Created: 2020-08-13T06:18:32.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2025-03-03T10:02:13.000Z (over 1 year ago)
- Last Synced: 2025-03-29T15:11:47.143Z (about 1 year ago)
- Language: JavaScript
- Homepage: https://glamwikidashboard.org
- Size: 4.2 MB
- Stars: 10
- Watchers: 5
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GLAM Wiki Dashboard
The purpose of this project is to Support GLAMs* in monitoring and evaluating
their cooperation with Wikimedia projects. Starting from a Wikimedia Commons
category this tool collects data about usage, views, contributors and topology
of the files inside.
** GLAM - galleries, libraries, archives and museums
## Structure
The project is split into two packages - app & services.
* app - includes an express.js server that functions both as an API and as a front-end server (using mostly handlebars as render engine)
* services - includes python & node.js scripts for ETL (extract, transform & load) and recommendations (not currently active). The ETL includes a new GLAM loader (for when adding a new GLAM to the system), and a daily cron job to updated the analytical data of yesterday for all of the GLAMs in the system.
## Installation - app
Enter the /app folder
```bash
cd app
```
Install Node.js project dependencies:
```bash
npm install
```
**Add a production config file inside the config folder: `./config/config.production.json` With the same structure as in `./config/config.sample.json`**
export ENV:
```bash
export ENV="production"
```
Run the local server:
```bash
pm2 start server.js
```
You can see the logs by running th following command:
```bash
pm2 logs
```
## Installation - services
Enter services folder
```bash
cd services
```
Install Python dependencies:
```bash
pip3 install -r requirements.txt
npm install
```
export ENV:
```bash
export ENV="production"
```
**Add a production config file inside the config folder: `./config/config.production.json` With the same structure as in `./config/config.sample.json`**
### Run initdaily.sh - script that run dail.py.
Run it with the following commands to do it with a daily cron job
The daily script runs every day at 4:00 AM
### Run daily cronjob
```bash
pm2 start daily.py --cron '0 4 * * *' --interpreter python3 --no-autorestart -- -e production
```
### Save the process
```bash
pm2 save
```
A Logs folder will be created, every day at 4:00 AM a new file will be added with the date of the day, where you can always see the logs of the daily.
### Run new glam listener
```bash
pm2 start new_glam_listener.py --interpreter python3 -- -e production
```
You can see the logs by running th following command:
```bash
pm2 logs
```
## Starting local postgres instance using docker compose
```bash
docker-compose up -d
```