PyPlaceholder

When mocking up layouts, I want to ensure that the HTML I’m building wraps real images in the correct aspect ratios. I also want to be able to fiddle with the sizes without getting distracted by squashed/stretched faces or by color schemes that are anethema to a particular design. I’d like something akin to a visual “Lorem ipsum…”, that says “Hey! An image is going to go here! At some point! In the future!” Importantly for some future work, I want these images to be autogenerated.

So, PyPlaceholder. Using PyPNG as a base, it generates s very simple image that you can stick into a layout to hold the place of images to come.

They look like this:

Demonstration image goes here.

Or like this:

Demonstration image goes here.

I know, right? Whatever width you’d like, whatever foreground, whatever background. It’s like magic.

Online Demo

You can build your own placeholders for as long as my server holds up: placeholder.mikewest.org

Usage

Usage: placeholder.py [options]

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  --verbose             Verbose mode
  -o OUT, --output=OUT  Output file
  --background=RRGGBB   Background color in hex (`RRGGBB`) format
  --foreground=RRGGBB   Foreground color in hex (`RRGGBB`) format
  --width=WIDTH         Width of placeholder
  --height=HEIGHT       Height of placeholder
  --no-border           Suppress rendering of border around the placeholder
                        image.

Changelog