Spaces:
Sleeping
Sleeping
Upload 4 files
Browse files- README.md +15 -9
- app.py +4 -0
- requirements.txt +4 -0
- templates/index.html +26 -0
README.md
CHANGED
|
@@ -1,11 +1,17 @@
|
|
| 1 |
-
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
---
|
| 10 |
|
| 11 |
-
|
|
|
|
| 1 |
+
# Assistant CPAS - Traitement des Notifications PDF
|
| 2 |
+
|
| 3 |
+
Cette application Flask permet de :
|
| 4 |
+
- Extraire automatiquement des informations des fichiers PDF dans une archive ZIP
|
| 5 |
+
- Renommer les fichiers PDF selon un format prédéfini
|
| 6 |
+
- Organiser les fichiers dans des dossiers par date
|
| 7 |
+
- Gérer les doublons intelligemment
|
| 8 |
+
- Générer un fichier log CSV
|
| 9 |
+
|
| 10 |
+
## 🛠️ Utilisation
|
| 11 |
+
1. Uploadez un fichier ZIP contenant vos PDF
|
| 12 |
+
2. Cliquez sur "Traiter"
|
| 13 |
+
3. Récupérez les fichiers renommés et le log CSV
|
| 14 |
+
|
| 15 |
---
|
| 16 |
|
| 17 |
+
👤 *Développé pour les secrétariats du CPAS de Bruxelles*
|
app.py
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
...
|
| 2 |
+
|
| 3 |
+
if __name__ == "__main__":
|
| 4 |
+
app.run(host="0.0.0.0", port=7860)
|
requirements.txt
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Flask
|
| 2 |
+
pytesseract
|
| 3 |
+
pdf2image
|
| 4 |
+
Pillow
|
templates/index.html
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!doctype html>
|
| 2 |
+
<html lang="fr">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="utf-8">
|
| 5 |
+
<title>Assistant CPAS PDF</title>
|
| 6 |
+
<style>
|
| 7 |
+
body { font-family: sans-serif; max-width: 700px; margin: auto; padding-top: 40px; }
|
| 8 |
+
h1 { color: #444; }
|
| 9 |
+
.report { background: #eef; padding: 15px; border-radius: 5px; margin-top: 20px; }
|
| 10 |
+
</style>
|
| 11 |
+
</head>
|
| 12 |
+
<body>
|
| 13 |
+
<h1>📄 Assistant de Traitement des Notifications PDF</h1>
|
| 14 |
+
<form method="POST" enctype="multipart/form-data">
|
| 15 |
+
<label>Choisissez un fichier ZIP contenant les PDFs :</label><br>
|
| 16 |
+
<input type="file" name="zipfile" accept=".zip" required><br><br>
|
| 17 |
+
<button type="submit">🚀 Traiter les fichiers</button>
|
| 18 |
+
</form>
|
| 19 |
+
|
| 20 |
+
{% if report %}
|
| 21 |
+
<div class="report">
|
| 22 |
+
{{ report | safe }}
|
| 23 |
+
</div>
|
| 24 |
+
{% endif %}
|
| 25 |
+
</body>
|
| 26 |
+
</html>
|