Skip to content

About

AI-powered dummy content generator for Drupal, paired with a standalone PHP assets server that caches generated images across projects. Define recipes per content type, run a Drush command, get fully populated nodes with Gemini-generated text and images.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Ypermedia Dummy Generator

AI-powered dummy content generator for Drupal, with a standalone PHP assets server as caching layer. Built for the Ypermedia workflow to skip the manual cycle of generating images in Gemini, resizing in Photoshop, uploading to a server, and importing into Drupal.

What's in this repo

Two components that work together, but can also be used separately:

  • ypermedia_dummy/ — Drupal 11 module. Define a "recipe" per content type (content context, image style guide, field mapping, aspect ratio, quality). Run a Drush command, get fully populated nodes with realistic AI-generated data and images.

  • assets-server/ — Tiny standalone PHP endpoint (single index.php). Acts as a persistent cache for generated images, so the same image isn't generated twice across projects or installs.

The workflow

[Drush command] → [Gemini text API] → JSON records with specs
       ↓
[For each record]
       ↓
[Assets server: HEAD /project/recipe/machinename.jpg]
       ↓
  cached? ───yes──▶ [download] ──▶ [attach to node]
       │
       no
       ↓
[Gemini image API] ──▶ [resize/crop to target size]
       ↓
[Upload to assets server] ──▶ [download back] ──▶ [attach to node]

The assets server trick is the interesting bit. Images generated for one project's dummy data are reusable across other projects and across fresh installs, so you pay Gemini once per unique (project, recipe, title) and never again.

Status

This is a personal tool built for the Ypermedia workflow, shared as a showcase project. It's not actively maintained as a general-purpose module and has no stable release cycle, support channel, or backwards compatibility guarantees.

If you want a production-ready dummy content generator for Drupal, use one of these instead:

That said, if the assets server caching pattern or recipe-based approach is useful to you, feel free to fork or copy whatever helps.

Requirements

  • Drupal 10 or 11 with PHP 8.2+ and GD extension
  • A Gemini API key (Google AI Studio, free tier available)
  • A webserver (Apache with mod_rewrite, or Nginx) to host the assets server endpoint

Quick start

  1. Deploy the assets server (instructions)
  2. Install the Drupal module (instructions)
  3. Configure the module with your Gemini API key, assets server URL, and project identifier
  4. Create a recipe via /admin/config/content/dummy-recipe
  5. Generate content: drush ypermedia:generate-dummy my_recipe 10

License

GPL-2.0-or-later, matching Drupal convention.

About

Built by Ypermedia.

About

AI-powered dummy content generator for Drupal, paired with a standalone PHP assets server that caches generated images across projects. Define recipes per content type, run a Drush command, get fully populated nodes with Gemini-generated text and images.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages