placeholder generator website, written in python
HTML Python
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
images/example
templates
.gitignore
Procfile
README.md
requirements.txt
wsgi.py

README.md

What is this?

A quick and simple service for getting pictures of whatever-you-want for use as placeholders in your designs or code. Just put your image size (width & height) after the URL and you'll get a placeholder. Similar URL as Placekitten.

There is also a bookmarklet service which works the same as Horse_ebookmarklet.

Heroku and AppFog ready

PaaS is the shit, right? This placeholder application will work out-of-the-box on Heroku or AppFog.

For Heroku, create an site and push it.

heroku create
git commit -am "adding my images"
push heroku master
heroku open

For AppFog, create the site using af and push it.

Installation

Dependencies are handled by pip, install it on your machine (if you use virtualenv, create a new venv).

  1. Go to the code: cd path/to/holder
  2. Get dependencies in place: pip install -r requirements.txt
  3. Start the app: python wsgi.py
  4. Go to http://localhost:5001 in your web browser.
  5. Done!

Example calls

# generates an image, 200px wide and 300px tall
http://localhost:5001/200/300

# generates an image in grayscale, 200px wide and 300px tall
http://localhost:5001/g/200/300

# generates an image using a specific theme, 200px wide and 300px tall
http://localhost:5001/200/300/custom-theme

# generates an image in grayscale using a specific theme, 200px wide and 300px tall
http://localhost:5001/g/200/300/custom-theme

Images

The images used are stored in images in sub directories (themes).

You can create your own themes by creating new sub directories and populate it with images. High-res JPGs are recommended.