Urgent.News

What's breaking now, across thousands of outlets.

Tech

From One Prompt to 39 Finished Products: What Actually Broke

Last March I ran a batch of 40 uploads to Adobe Stock overnight. I woke up to a rejection screen and a bad feeling. The art was fine. The CSV was not. One wrong header column and Adobe's uploader rejects the file before it even looks at your images. That morning I learned that the prompt engine was the easy part, and everything after it was where the product actually gets made. Here is what…

A single prompt resulted in 39 completed products, with an unexpected breakdown of the challenges faced and improvements made along the way. The initial batch of 40 uploads to Adobe Stock was rejected due to a single header column mismatch, highlighting the critical role of metadata in the process. Adobe's uploader is rigid, rejecting entire files if the structure is even slightly incorrect.

To mitigate this, a script called make_metadata.py was created to generate the required CSV files for multiple platforms like Adobe, Vecteezy, and Dreamstime. This script ensures each platform's specific header format is adhered to, preventing rejections due to formatting issues.

Another significant issue was double-posting, which could lead to account flagging. To avoid this, a ledger script named upload_tracker.py was implemented. This script maintains a record of pending uploads, marks items as done, and provides a status overview. By using a plain-text ledger and the Python standard library, it ensures that each item is uploaded only once, eliminating the risk of duplicates.

This script emphasizes the importance of discipline and memory management in automated pipelines, especially when interacting with external accounts.

The entire workflow was executed on a single-core server with limited resources (1 vCPU, 2 GB RAM), forcing a focus on efficiency and simplicity. The make_metadata.py script writes files in a structured manner, which is crucial for maintaining a well-organized catalogue. The folder layout consists of five key directories: assets/ for raw outputs, output/ for files ready for submission along with metadata CSVs, packs/ for finished zips and covers, research/ for notes and logs, and scripts/ for tools.

Keeping a separate research/ directory is essential as it contains valuable material that might be needed for future projects. The pipeline also includes a script called md2pdf.py that converts Markdown documents into sellable PDFs by applying styling through reportlab, and another called pack_product.py that bundles files into zips with appropriate covers and thumbnails using Pillow.

This entire kit, consisting of four primary scripts, is designed to streamline the process of producing digital products without relying on any external frameworks or cloud services, making it a zero-cost solution that can be run on a simple server.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

A good prediction doesn't always make a good decision

I started building an FPL tool because I kept coming back to one question: what's the point of predicting the best player if signing him isn't actually the best move?

  • Predicting best player doesn't guarantee best decision
  • FPL Decision Engine merges data, AI, rules to evaluate real decisions
  • Engine's effectiveness in improving FPL performance still under testing

The License Layer — Or, Who Can Rewrite the Terms Underneath You?

Twelve essays into this series, the line has never moved: the layer you don't own is the layer that owns you. I've named distribution (#45), the model (#46), identity (#47), access (#48), the harness…

  • License Layer controls software use, modification, distribution
  • Bitwarden switched to dual-license model, sparking debate
  • Nvidia acquisition, Apple removal highlight license control risks

The Silent Alert Bug: When Your Instant Push Exists but Never Fires

Your alert formatter is probably fine. The problem is that nobody calls it. The Symptom A user reports that instant push notifications stopped working. The daily report arrives on schedule.

  • formatinstantalert function built push messages, but never invoked
  • Four code paths for opening positions each contained copy-pasted push logic
  • Dead code persisted due to lack of enforcement mechanism

A five-file Laravel release when the production worktree has drifted

On 5 October I shipped a design refresh to the storefront I run: one stylesheet and four Blade templates, the hero, catalog, operations and homepage views. Nothing else moved.

  • Laravel released five files on October 5th
  • Production worktree diverged from branch
  • Release ensured production templates matched committed versions

More from Monday 12 October →