This application is designed to generate clinical reports in PDF format. The reports are generated automatically based on the input data provided in formats like .json, .csv, .txt. Each report is generated according to a standardized template, with the only differences being the input data (the clinical information of different customers).
-
Clone this repo to your local machine.
-
Install the required Python libraries by running the following command in your terminal:
pip install -r requirements.txtUsage:
python main.pyThis program depends on WeasyPrint, which in turn depends on GTK. This section explains how to install GTK on different platforms.
-
Download and install MSYS2.
-
Open the MSYS2 terminal (either MSYS2 MinGW 64-bit or MSYS2 MinGW 32-bit, depending on whether your system is 64-bit or 32-bit).
-
Update the package database and core system packages with:
pacman -Syu
-
If needed, close the MSYS2 terminal and reopen it to continue with the update.
-
Install GTK with:
pacman -S mingw-w64-x86_64-gtk3
For 32-bit systems, use:
pacman -S mingw-w64-i686-gtk3
-
Add the GTK bin directory to your system's PATH. For 64-bit systems, this is typically
C:\msys64\mingw64\bin. For 32-bit systems, it's typicallyC:\msys64\mingw32\bin. -
Restart your computer.
-
If you do not have Homebrew installed, install it by following instructions at https://brew.sh/.
-
Install GTK with the following command:
brew install gtk+3
-
Install the necessary packages with the following command:
sudo apt-get install libgirepository1.0-dev gobject-introspection gir1.2-gtk-3.0
https://doc.courtbouillon.org/weasyprint/stable/first_steps.html#windows