Why My Single-Core Server Handles Metadata, PDFs And Covers With Just Pillow And Reportlab
说明与用途
脚本自动生成正确的 CSV 标题,跟踪上传,使用 Pillow 和 Reportlab 渲染 PDF 和封面,使单核 2 GB 服务器能够处理 39 个产品,避免被拒绝或标记为垃圾邮件。
问题
Adobe and other stock platforms reject CSV uploads due to incorrect headers, and duplicate submissions flag accounts as spam.
结果
The pipeline processed 39 products, producing 856 MB of output on a 1‑core, 2 GB server, avoiding CSV rejections and duplicate upload flags.
工作流
- 1. Run make_metadata.py to generate platform‑specific CSV headers and rows from filenames or titles.json.
- 2. Use upload_tracker.py to record completed uploads and prevent re‑uploads.
- 3. Convert Markdown to PDF with md2pdf.py using Reportlab.
- 4. Render 1280x720 cover and 600x600 thumbnail with Pillow via pack_product.py and zip them.
- 5. Monitor memory with resource.getrusage and gc.collect() after each asset.
- 6. Organize files in assets/, output/, packs/, scripts/, research/ folders.
证据
Adobe had rejected the entire CSV. One wrong column in the header.
Adobe Stock wants a 5-column CSV. Vecteezy wants 4 columns. Dreamstime wants 15.
upload_tracker.py is a ledger, standard library only, no database.
md2pdf.py uses reportlab alone: headings, tables, lists, links, clean styling, one command: python md2pdf.py content.md product.pdf "My Product Title"
Pack_product.py renders both with Pillow, zips the files, and writes everything into a _system folder.
One process at a time. Never fan out image jobs in parallel on a 1-core box.
I validated the whole thing on that box: 39 finished products, 856 MB of output, running under a pipeline of roughly 19,000 lines with an agent orchestrator on top.
- 记录日期: 2026-10-22T00:26:03.382Z