Closed anquetos closed 3 months ago
@anquetos , ce serait cool d'intégrer https://github.com/dataforgoodfr/12_taxobservatory_dataviz/pull/45 à ta PR avant merge. d'après ce que j'ai vu il y a aura quelques conflits à gérer mais principalement des paths. et vu le nouveau assets, c'est une bonne occasion. t'en penses quoi?
@gaudinnicolas, oui ce serait bien. Par contre je ne sais pas trop comment faire pour l'intégrer, peux-tu m'aiguiller ?
@anquetos tu peux prendre le zip de https://github.com/QuentinMadura/12_taxobservatory_dataviz/tree/main et copier les images dans assets (remplacer existantes) et il y a 3 fichiers à modifier car 2 images ont été transformées en jpg d'après https://github.com/QuentinMadura/12_taxobservatory_dataviz/commit/4025c3908511f544a2a2c604e3faf955c548c000
@gaudinnicolas, ah ok, tout simplement. Je pensais qu'il y avait moyen de faire un truc via GitHub mais c'est plus simple comme ça. Je le ferai demain matin.
png
to jpg
) proposed on PR #45.
Goal
Remove usage of word_cloud library which was causing a resource warning :
This issue is still opened on the repository (https://github.com/amueller/word_cloud/issues/764).
Solution
The word cloud is now created directly with the Pillow library and its
ImageDraw
andImageFont
modules.Since it was necessary to specify the
ttf
file to load in theImageDraw.truetype()
function, font management has been changed from Google API to a local ressource folderapp/assets/fonts
.Other ressources of the project as images or CSS files have also been moved to the
assets
folder.