Reorganize project structure with separate directories for scripts, data, and output

This commit is contained in:
Kevin Bataille
2026-02-09 10:20:55 +01:00
parent acb1276b38
commit 73ff2b70f7
125 changed files with 1786 additions and 56 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -7,9 +7,38 @@ This repository contains Python scripts to process financial statements from var
- Processes PDF and CSV financial statements from multiple sources
- Categorizes transactions automatically based on descriptions
- Generates expense summaries with percentages
- Optional CSV output for all transactions (new feature)
- Optional CSV output for all transactions
- Support for Boursobank, American Express, Monabanq, Revolut, SNCF, and La Poste
## Project Structure
```
comptabilite/
├── .gitignore
├── docs/ # Documentation files
│ └── README.md
├── scripts/ # All processing scripts
│ ├── process_bourso.py # Boursobank account statements
│ ├── process_amex.py # American Express credit card statements
│ ├── process_monabanq.py # Monabanq account statements
│ ├── process_expenses.py # Revolut account statements (CSV format)
│ ├── process_sncf.py # SNCF salary statements
│ ├── process_laposte.py # La Poste (CCP) account statements
│ └── process_all.py # Master script that runs all processing scripts
├── data/ # Input data
│ ├── pdf/ # PDF statements by institution
│ │ ├── boursobank/
│ │ ├── american_express/
│ │ ├── monabanq/
│ │ ├── sncf/
│ │ ├── la_poste/
│ │ └── impots/
│ └── raw_csv/ # Raw CSV files (e.g., Revolut statements)
└── output/ # Generated output
├── csv/ # CSV exports of transactions
└── reports/ # Financial reports and summaries
```
## Scripts Overview
### Main Scripts
@@ -29,7 +58,7 @@ This repository contains Python scripts to process financial statements from var
### Individual Scripts
Each script can be run with optional CSV output:
From the `scripts/` directory:
```bash
# Process without CSV output
@@ -39,12 +68,12 @@ python process_bourso.py
python process_bourso.py --csv
# Process all PDFs in a specific directory
python process_bourso.py --pdf-dir /path/to/pdfs --csv
python process_bourso.py --pdf-dir ../data/pdf/boursobank --output-dir ../../output/csv --csv
```
### Master Script
The master script can process all statements at once:
From the `scripts/` directory, the master script can process all statements at once:
```bash
# Process all statements
@@ -61,7 +90,7 @@ python process_all.py --bourso --amex --csv
When run with `--csv` flag, each script generates:
- Individual CSV files for each input file (when applicable)
- A consolidated CSV file containing all transactions
- A consolidated CSV file containing all transactions in the `output/csv/` directory
The CSV files include:
- Date
@@ -92,9 +121,9 @@ The CSV files include:
2. Clone or download this repository
## CSV Export Feature (New)
## CSV Export Feature
The scripts now support exporting all transaction data to CSV format. This allows for:
The scripts support exporting all transaction data to CSV format. This allows for:
- Further analysis in spreadsheet applications
- Data archiving
- Integration with other financial tools
@@ -102,32 +131,19 @@ The scripts now support exporting all transaction data to CSV format. This allow
To enable CSV export, add the `--csv` flag when running any script.
## Organization
This project has been reorganized with a clean directory structure:
- Input files are separated from processing scripts
- All generated outputs go to the `output/` directory
- Scripts are organized in their own directory
- Documentation is in the `docs/` directory
## Git Repository
This is now a Git repository. To start tracking changes:
This is a Git repository. To start tracking changes:
```bash
git add .
git commit -m "Initial commit with CSV export functionality"
```
## File Structure
```
comptabilite/
├── .gitignore
├── process_bourso.py
├── process_amex.py
├── process_monabanq.py
├── process_expenses.py
├── process_sncf.py
├── process_laposte.py
├── process_all.py
├── README.md
├── 1-sncf/
├── 2-la.poste/
├── american.express/
├── boursobank/
├── monabanq/
└── revolut/
git commit -m "Your commit message"
```

View File

@@ -0,0 +1 @@
Date,Description,Category,Debit,Credit,Value Date
1 Date Description Category Debit Credit Value Date

View File

@@ -0,0 +1 @@
Date,Description,Category,Debit,Credit,Value Date
1 Date Description Category Debit Credit Value Date

View File

@@ -0,0 +1 @@
Date,Description,Category,Debit,Credit,Value Date
1 Date Description Category Debit Credit Value Date

View File

@@ -0,0 +1 @@
Date,Description,Category,Debit,Credit,Value Date
1 Date Description Category Debit Credit Value Date

View File

@@ -0,0 +1,3 @@
Date,Description,Category,Debit,Credit,Value Date
11/02/2025,PRLV SEPA PayPal Europe S.a.r.l. et Cie,Online Purchases (Paypal),13.2,0,11/02/2025
11/02/2025,CARTE 11/02/25 infomaniak.com CB*5253,Card Payment,20.62,0,11/02/2025
1 Date Description Category Debit Credit Value Date
2 11/02/2025 PRLV SEPA PayPal Europe S.a.r.l. et Cie Online Purchases (Paypal) 13.2 0 11/02/2025
3 11/02/2025 CARTE 11/02/25 infomaniak.com CB*5253 Card Payment 20.62 0 11/02/2025

View File

@@ -0,0 +1,25 @@
Date,Description,Category,Debit,Credit,Value Date
10/11/2025,VIR INST MR BATAILLE KEVIN,Other,252.69,0,08/11/2025
10/11/2025,VIR INST KEVIN BATAILLE,Other,54.71,0,08/11/2025
10/11/2025,PRLV SEPA American Express Carte-France,Credit Card Payment (Amex),246.91,0,10/11/2025
11/11/2025,PRLV SEPA PayPal Europe S.a.r.l. et Cie,Online Purchases (Paypal),15.5,0,11/11/2025
11/11/2025,PRLV SEPA PayPal Europe S.a.r.l. et Cie,Online Purchases (Paypal),23.8,0,11/11/2025
13/11/2025,VIR INST MR BATAILLE KEVIN,Other,170.0,0,13/11/2025
13/11/2025,ECH PRET:80486000604801731111,Loan Repayment,166.66,0,13/11/2025
18/11/2025,CARTE 17/11/25 B VICTOR HUGO CB*6131,Card Payment,5.2,0,18/11/2025
19/11/2025,CARTE 17/11/25 SC-PBO CB*6131,Card Payment,9.5,0,19/11/2025
24/11/2025,VIR Versement Financement CLIC,Other,500.0,0,24/11/2025
24/11/2025,PRLV SEPA BASIC FIT FRANCE,Other,34.98,0,24/11/2025
24/11/2025,CARTE 23/11/25 B VICTOR HUGO CB*6131,Card Payment,6.75,0,24/11/2025
24/11/2025,PRLV FRAIS CLIC,Other,5.0,0,24/11/2025
25/11/2025,CARTE 24/11/25 TRADI. DE CHATIL CB*6131,Card Payment,5.3,0,25/11/2025
26/11/2025,CARTE 25/11/25 MINT CB*6131,Card Payment,7.5,0,26/11/2025
26/11/2025,CARTE 24/11/25 SC-PBO CB*6131,Card Payment,9.5,0,26/11/2025
26/11/2025,CARTE 25/11/25 BIGEM INTERMARCHE CB*6131,Card Payment,20.56,0,26/11/2025
27/11/2025,VIR INST KEVIN BATAILLE,Other,74.0,0,27/11/2025
27/11/2025,PRLV SEPA PayPal Europe S.a.r.l. et Cie,Online Purchases (Paypal),30.98,0,27/11/2025
27/11/2025,CARTE 26/11/25 SumUp *ANAS FRUI CB*6131,Card Payment,20.0,0,27/11/2025
27/11/2025,CARTE 26/11/25 LA ROTISSERIE CB*6131,Card Payment,7.0,0,27/11/2025
28/11/2025,CARTE 27/11/25 BK PRODUCTIONS CB*6131,Card Payment,12.0,0,28/11/2025
28/11/2025,CARTE 27/11/25 BK PRODUCTIONS CB*6131,Card Payment,12.0,0,28/11/2025
28/11/2025,CARTE 27/11/25 MINT CB*6131,Card Payment,6.5,0,28/11/2025
1 Date Description Category Debit Credit Value Date
2 10/11/2025 VIR INST MR BATAILLE KEVIN Other 252.69 0 08/11/2025
3 10/11/2025 VIR INST KEVIN BATAILLE Other 54.71 0 08/11/2025
4 10/11/2025 PRLV SEPA American Express Carte-France Credit Card Payment (Amex) 246.91 0 10/11/2025
5 11/11/2025 PRLV SEPA PayPal Europe S.a.r.l. et Cie Online Purchases (Paypal) 15.5 0 11/11/2025
6 11/11/2025 PRLV SEPA PayPal Europe S.a.r.l. et Cie Online Purchases (Paypal) 23.8 0 11/11/2025
7 13/11/2025 VIR INST MR BATAILLE KEVIN Other 170.0 0 13/11/2025
8 13/11/2025 ECH PRET:80486000604801731111 Loan Repayment 166.66 0 13/11/2025
9 18/11/2025 CARTE 17/11/25 B VICTOR HUGO CB*6131 Card Payment 5.2 0 18/11/2025
10 19/11/2025 CARTE 17/11/25 SC-PBO CB*6131 Card Payment 9.5 0 19/11/2025
11 24/11/2025 VIR Versement Financement CLIC Other 500.0 0 24/11/2025
12 24/11/2025 PRLV SEPA BASIC FIT FRANCE Other 34.98 0 24/11/2025
13 24/11/2025 CARTE 23/11/25 B VICTOR HUGO CB*6131 Card Payment 6.75 0 24/11/2025
14 24/11/2025 PRLV FRAIS CLIC Other 5.0 0 24/11/2025
15 25/11/2025 CARTE 24/11/25 TRADI. DE CHATIL CB*6131 Card Payment 5.3 0 25/11/2025
16 26/11/2025 CARTE 25/11/25 MINT CB*6131 Card Payment 7.5 0 26/11/2025
17 26/11/2025 CARTE 24/11/25 SC-PBO CB*6131 Card Payment 9.5 0 26/11/2025
18 26/11/2025 CARTE 25/11/25 BIGEM INTERMARCHE CB*6131 Card Payment 20.56 0 26/11/2025
19 27/11/2025 VIR INST KEVIN BATAILLE Other 74.0 0 27/11/2025
20 27/11/2025 PRLV SEPA PayPal Europe S.a.r.l. et Cie Online Purchases (Paypal) 30.98 0 27/11/2025
21 27/11/2025 CARTE 26/11/25 SumUp *ANAS FRUI CB*6131 Card Payment 20.0 0 27/11/2025
22 27/11/2025 CARTE 26/11/25 LA ROTISSERIE CB*6131 Card Payment 7.0 0 27/11/2025
23 28/11/2025 CARTE 27/11/25 BK PRODUCTIONS CB*6131 Card Payment 12.0 0 28/11/2025
24 28/11/2025 CARTE 27/11/25 BK PRODUCTIONS CB*6131 Card Payment 12.0 0 28/11/2025
25 28/11/2025 CARTE 27/11/25 MINT CB*6131 Card Payment 6.5 0 28/11/2025

Some files were not shown because too many files have changed in this diff Show More