Two Lines in Requirements.txt: Pillow, Reportlab, and Nothing Else
Описание и применение
Автоматизированный рецепт для генерации CSV‑заголовков, отслеживания загрузок, упаковки продуктов и рендеринга PDF/изображений, работающий на одном ядре и 2 ГБ ОЗУ.
Задача
Uploading vector assets to multiple marketplaces fails because of incorrect CSV headers and duplicate submissions, causing rejection and account flags.
Результат
39 products were successfully uploaded with correct metadata, no duplicates, and proper packaging, all on a single vCPU and 2 GB RAM.
Рабочий процесс
- Generate platform‑specific CSV headers with make_metadata.py
- Optionally supply titles.json for accurate titles
- Track upload status with upload_tracker.py to prevent duplicates
- Package products with pack_product.py, rendering covers and thumbnails via Pillow
- Convert Markdown to PDF with md2pdf.py using ReportLab
- Organize project folder structure for clarity
Доказательства
The rejection email was four words long: "Invalid CSV header."
So make_metadata.py does one job: it walks a folder of files and writes the exact header each platform demands, nothing more.
upload_tracker.py is a plain ledger. It remembers what you have marked done, so a re-run only shows what is left.
pack_product.py zips the files and renders a 1280x720 cover plus a 600x600 thumbnail
The whole pipeline ran on 1 vCPU and 2 GB of RAM
- Дата записи: 2026-10-25T00:26:11.722Z