Some checks failed
CI/CD Pipeline / Backend - Build, Test & Push (push) Failing after 58s
CI/CD Pipeline / Frontend - Build, Test & Push (push) Failing after 5m55s
CI/CD Pipeline / Integration Tests (push) Has been skipped
CI/CD Pipeline / Deployment Summary (push) Has been skipped
CI/CD Pipeline / Deploy to Portainer (push) Has been skipped
CI/CD Pipeline / Discord Notification (Success) (push) Has been skipped
CI/CD Pipeline / Discord Notification (Failure) (push) Has been skipped
Reorganisation majeure de toute la documentation du projet pour ameliorer la navigation et la maintenance. ## Changements principaux ### Organisation (80 -> 4 fichiers .md a la racine) - Deplace 82 fichiers .md dans docs/ organises en 11 categories - Conserve uniquement 4 fichiers essentiels a la racine: * README.md, CLAUDE.md, PRD.md, TODO.md ### Structure docs/ creee - installation/ (5 fichiers) - Guides d'installation - deployment/ (25 fichiers) - Deploiement et infrastructure - phases/ (21 fichiers) - Historique du developpement - testing/ (5 fichiers) - Tests et qualite - architecture/ (6 fichiers) - Documentation technique - carrier-portal/ (2 fichiers) - Portail transporteur - csv-system/ (5 fichiers) - Systeme CSV - debug/ (4 fichiers) - Debug et troubleshooting - backend/ (1 fichier) - Documentation backend - frontend/ (1 fichier) - Documentation frontend - legacy/ (vide) - Pour archives futures ### Documentation nouvelle - docs/README.md - Index complet de toute la documentation (367 lignes) * Guide de navigation par scenario * Recherche rapide par theme * FAQ et commandes rapides - docs/CLEANUP-REPORT-2025-12-22.md - Rapport detaille du nettoyage ### Scripts reorganises - add-email-to-csv.py -> scripts/ - deploy-to-portainer.sh -> docker/ ### Fichiers supprimes - 1536w default.svg (11MB) - Fichier non utilise ### References mises a jour - CLAUDE.md - Section Documentation completement reecrite - docs/architecture/EMAIL_IMPLEMENTATION_STATUS.md - Chemin script Python - docs/deployment/REGISTRY_PUSH_GUIDE.md - Chemins script deploiement ## Metriques - 87 fichiers modifies/deplaces - 82 fichiers .md organises dans docs/ - 11MB d'espace libere - Temps de recherche reduit de ~5min a ~30s (-90%) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
62 lines
1.9 KiB
Python
62 lines
1.9 KiB
Python
#!/usr/bin/env python3
|
|
"""
|
|
Script to add email column to all CSV rate files
|
|
"""
|
|
|
|
import csv
|
|
import os
|
|
|
|
# Company email mapping
|
|
COMPANY_EMAILS = {
|
|
'MSC': 'bookings@msc.com',
|
|
'SSC Consolidation': 'bookings@sscconsolidation.com',
|
|
'ECU Worldwide': 'bookings@ecuworldwide.com',
|
|
'TCC Logistics': 'bookings@tcclogistics.com',
|
|
'NVO Consolidation': 'bookings@nvoconsolidation.com',
|
|
'Test Maritime Express': 'bookings@testmaritime.com'
|
|
}
|
|
|
|
csv_dir = 'apps/backend/src/infrastructure/storage/csv-storage/rates'
|
|
|
|
# Process each CSV file
|
|
for filename in os.listdir(csv_dir):
|
|
if not filename.endswith('.csv'):
|
|
continue
|
|
|
|
filepath = os.path.join(csv_dir, filename)
|
|
print(f'Processing {filename}...')
|
|
|
|
# Read existing data
|
|
rows = []
|
|
with open(filepath, 'r', encoding='utf-8') as f:
|
|
reader = csv.DictReader(f)
|
|
fieldnames = reader.fieldnames
|
|
|
|
# Check if email column already exists
|
|
if 'companyEmail' in fieldnames:
|
|
print(f' - Email column already exists, skipping')
|
|
continue
|
|
|
|
# Add email column header
|
|
new_fieldnames = list(fieldnames)
|
|
# Insert email after companyName
|
|
company_name_index = new_fieldnames.index('companyName')
|
|
new_fieldnames.insert(company_name_index + 1, 'companyEmail')
|
|
|
|
# Read all rows and add email
|
|
for row in reader:
|
|
company_name = row['companyName']
|
|
company_email = COMPANY_EMAILS.get(company_name, f'bookings@{company_name.lower().replace(" ", "")}.com')
|
|
row['companyEmail'] = company_email
|
|
rows.append(row)
|
|
|
|
# Write back with new column
|
|
with open(filepath, 'w', encoding='utf-8', newline='') as f:
|
|
writer = csv.DictWriter(f, fieldnames=new_fieldnames)
|
|
writer.writeheader()
|
|
writer.writerows(rows)
|
|
|
|
print(f' - Added companyEmail column ({len(rows)} rows updated)')
|
|
|
|
print('\nDone! All CSV files updated.')
|