Bachir Soussi Chiadmi b936b1e616 commited all contents created by participants 6 years ago
..
dompdf b936b1e616 commited all contents created by participants 6 years ago
fonts b936b1e616 commited all contents created by participants 6 years ago
scripts b936b1e616 commited all contents created by participants 6 years ago
catalogue~20170419-184926.php b936b1e616 commited all contents created by participants 6 years ago
image-test~20170419-172902.jpg b936b1e616 commited all contents created by participants 6 years ago
index~20170326-173156.php b936b1e616 commited all contents created by participants 6 years ago
perec~20171205-073726.php b936b1e616 commited all contents created by participants 6 years ago
readme_install~20171216-063924.txt b936b1e616 commited all contents created by participants 6 years ago
style~20170419-185250.css b936b1e616 commited all contents created by participants 6 years ago

readme_install~20171216-063924.txt



Create pdfs:
------------

* Install local php server
http://www.allaboutlinux.eu/how-to-run-php-on-ubuntu/

* Install dumpdf
https://www.howtoinstall.co/en/ubuntu/trusty/php-dompdf

Apparemment il faut que tu installes une extension php que tu n’as pas par défaut qui s’appelle mbstring
-> https://askubuntu.com/questions/491629/how-to-install-php-mbstring-extension-in-ubuntu

On Ubuntu extra:
apt-get install php7.0-xml

* Copy zip & unpack

* Instructions Sarah Garcin

C’est du php, donc il faut avoir un serveur php qui tourne en local pour le faire marcher.
Sur mon ordi si j’ouvre le dossier dans mon terminal et que je tape la commande 'php -S localhost:8080'. Il me démarre un serveur et je peux aller dans mon browser sur l’adresse localhost:8080 et mon site apparait.

Pour t’expliquer un peu comment ça marche:
dans le fichier index.php, j’ai les liens (en html) vers les fichiers générés en pdf qui sont sous cette forme:
20 objects with hair
Perec

Donc si je clique sur Perec ça m’emmène vers le fichier perec.php
Quand je vais dans le fichier perec.php qui va nous servir d’exemple de base (et c’est là que la magie opère).
J’utilise une librairie pdf qui s’appelle dompdf pour générer les pdf.

Ligne 15 : $command = escapeshellcmd('python scripts/perec.py’);
Là tu change le path de ton fichier python > 'python scripts/perec.py’
--> CHECK IF it is Python2

Ligne 31 à 34: là c’est ce qui apparait sur la couverture, c’est du html dans du php, tu peux changer la couverture ici.

Ligne 44: Tu peux changer le format du papier

Ligne 59: Tu peux changer le titre de ton pdf.

Voilà c’est à peu près tout, j’ai essayé de commenter un maximum le code (en anglais normalement)