- Python version: ≥ 3.12
- pipenv version: ≥ 2023-11-15
- At least Windows 10 with Powershell
- An account on the Bénévalibre web app.
- An
.env
file in the root project directory with the environment variablesID_ORGANISATION
,MAIL
andPASSWORD
.
Note
-
To get the organisation ID:
- In board, click on the organisation you want.
- Copy the ID in the URL of the page after
/association/
.
Ex: in
https://app.benevalibre.org/association/1234/
, the ID is "1234". -
Example of an
.env
file:MAIL="[email protected]" PASSWORD="strong password" ID_ORGANISATION="1234"
- Clone or download the Github repo https://github.com/alexmerot/extraction_benevalibre.
- Install the packages with
pipenv
:pipenv sync
- Launch a subshell in virtual environment with:
pipenv shell
- Install firefox browser for Playwright:
$Env:PLAYWRIGHT_BROWSERS_PATH='0'; playwright install firefox
- Run the Pyinstaller command:
pyinstaller export_benevalibre_data.py
Note
Setting the environment variable PLAYWRIGHT_BROWSERS_PATH
to 0 enables to
download browsers under the site-packages/playwright
folder. It is necessary
for the executable file created by Pyinstaller to work.
- Double-click the
export_benevalibre_data.exe
file in.\dist\export_benevalibre_data\
. - Wait for file explorer to launch, then select the folder where to download the Excel file.
- Wait, the Excel file will be downloaded.
Important
Don't forget the .env
file.