ferrero-opentext/Python-Version/scripts/shared
DJP b6b9d7337a Add CreativeX score extraction and storage system
Implements new workflow to extract CreativeX quality scores from PDFs
using LlamaExtract AI and store results in PostgreSQL database.

Components added:
- creativex_scoring_storing.py: Main script to process PDFs from Box
- creativex_scores table: Database table with JSONB for full JSON storage
- Database methods: store_creativex_score() and get_creativex_score_by_filename()
- Email templates: creativex_complete, creativex_partial, creativex_no_files
- Configuration: creativex section in config.yaml
- CREATIVEX_DEPLOYMENT.md: Complete deployment and usage guide

Features:
- Monitors Box folder 350605024645 for PDFs
- Extracts scores using LlamaExtract agent "Creativex-Extract"
- Stores 4 key fields (filename, ID, URL, score) + full JSON
- Deletes processed PDFs from Box after successful extraction
- Sends email notifications for success/partial/no-files scenarios
- Manual execution (python scripts/creativex_scoring_storing.py)

Database schema:
- Table: creativex_scores with 10 columns
- Indexes on filename, box_file_id, status for fast lookups
- JSONB column stores complete extraction for future flexibility

Future integration ready:
db.get_creativex_score_by_filename() available for DAM upload workflows
to attach CreativeX metadata during asset processing.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-11 16:15:45 -05:00
..
__pycache__ Update comprehensive README and reorganize documentation files 2025-11-05 10:57:11 -05:00
__init__.py Start Python automation - Foundation components 2025-10-30 16:38:26 -04:00
box_client.py Implement V2 naming convention updates and folder structure support 2025-11-05 18:33:35 -05:00
config_loader.py Add country code mapping system (ISO -> DAM codes) 2025-11-05 19:15:26 -05:00
dam_client.py Implement V2 naming convention updates and folder structure support 2025-11-05 18:33:35 -05:00
database.py Add CreativeX score extraction and storage system 2025-11-11 16:15:45 -05:00
filename_parser.py Implement V2 naming convention updates and folder structure support 2025-11-05 18:33:35 -05:00
metadata_extractor_mvp.py Add CreativeX fields to MVP and fix score update logic 2025-11-11 13:54:39 -05:00
notifier.py Add CreativeX score extraction and storage system 2025-11-11 16:15:45 -05:00