Prototype d'interface numérisée pour la retranscription ACDC
Télécharger : https://www.apachefriends.org/fr/index.html
Utilisation : Lancer XAMPP Control Panel, activer Apache (pour le PHP) et MySql (pour la BDD)
Téléchager Python 3 (latest version) : https://www.python.org/downloads/
Installer pip : https://pypi.org/project/pip/
(optionnel) : Installer Anaconda Navigator - https://docs.anaconda.com/anaconda/navigator/install/
Installer : https://plotly.com/python/getting-started/#installation invite de commande python (pip)
pip install plotly
Installer : https://flask.palletsprojects.com/en/2.0.x/installation/#install-flask invite de commande python (pip)
pip install flask
Extraire l'archive ACDC dans le répertoire C:\xampp\htdocs ou
git clone https://github.com/AdeBarros/ACDC.git
Accès : http://localhost/phpmyadmin/server_import.php
Importer : acdc.sql (présent dans ce dossier)
ou
Copier-coller son contenu dans l'onglet "SQL" : http://localhost/phpmyadmin/server_sql.php
Lancer son invite de commande python / bash (pip) Se placer dans le dossier courant (C:\xampp\htdocs\ACDC sur windows) Lancer les lignes suivantes (en fonction de l'invite en question): Bash :
export FLASK_APP=dataviz
flask run
Python cmd (pip) :
set FLASK_APP=dataviz
flask run
PowerShell :
$env:FLASK_APP = "dataviz"
flask run
Ouvrir le fichier "main.php" dans un navigateur : http://localhost/ACDC/templates/main.php
git clone https://github.com/AdeBarros/ACDC.git
Note: apache2 vient comme dépendence de PHP7.x
.
apt install php7.4
MySQL v8.x
with binding for PHP
apt install \
mysql-server \
php7.4-mysql
apt install \
python3.8 \
python3-pip
python3 -m pip install \
flask \
flask_cors \
plotly \
--user
Placer le code dans le répertoire publique d’apache (ou configurer un virtualhost), par exemple avec un lien symbolique :
ACDC/ $
sudo ln -nfs $PWD /var/www/html/
On obtient :
$ tree /var/www/html/ -L 1
/var/www/html/
├── ACDC # lien symbolique vers le code
└── index.html
Relire la config d’apache pour le prendre en compte
sudo service apache2 reload
Créer la base de données acdc
et les tables en important le fichier .sql
sudo mysql -u root -p < ./acdc.sql
Vérifier que la base a été créée avec:
$ sudo mysql -u root -p -e "SHOW DATABASES;"
Enter password:
+--------------------+
| Database |
+--------------------+
| acdc |
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
export FLASK_APP=dataviz
python3 -m flask run
Le fichier ./templates/main.php
doit être interprété par le serveur et accessible à une adresse du type : http://localhost/ACDC/templates/main.php
Une fois le fichier lancé, vous serez redirigé vers une page de choix de matrice à une adresse du type : http://localhost/ACDC/templates/matrix.php
Depuis cette page, vous pourrez :
- Ouvrir une matrice existante
- Créer une nouvelle matrice
- Importer une matrice au format sql
Vous pouvez ensuite Ajouter des fichiers audios dans le dossier ./templates/Audios
et les importer au moment du chargement d'une matrice.