About tgapp-placeholder
tgapp-placeholder is a Pluggable application for TurboGears2 that allows placeholder images generation on the fly. Inspired by http://dummyimage.com/ and https://github.com/darkrho/django-dummyimage.
Installing
placeholder can be installed both from pypi or from github:
pip install tgapp-placeholder
should just work for most of the users
Plugging placeholder
In your application config/app_cfg.py import plug:
from tgext.pluggable import plug
Then at the end of the file call plug with placeholder:
plug(base_config, 'placeholder')
You will be able to access the plugged application at http://localhost:8080/placeholder.
Using placeholder
You are now able to get your fake images by calling:
http://you-application/placeholder/{width} #for a square image
http://you-application/placeholder/{width}x{height}
http://you-application/placeholder/{width}x{height}?text={some text value}
- actually the parameters you can play with are:
text : a custom online text wich size is calculated to fit your image width
bgcolor : the background color in HEX rgb form (default set to ‘DDDDDD’)
color : the text color in HEX rgb form (default set to ‘888888’)
format : available formats available here (default set to PNG)
font_size : font_size of the eventtual text. If none is provided it is automagically calculated to fit the whole text in the image width.
Moviestars
Your movie stars by placeholder! Now you can generate custom-size placeholder images of Bill Murray, Steven Seagal and the greatest artist of all times Nicolas Cage!
Just add the name of you movie hero in the URL, like:
http://you-application/placeholder/stevenseagal/{width} #for a square image
http://you-application/placeholder/nicolascage/{width}x{height}
http://you-application/placeholder/billmurray/{width}x{height}
No text, bgcolor, color, format or font size needed! Just the name of an hero, and see the magic!
EXTRA: Nicolas Cage
Nicolas The Great Cage images supports the gray or the gif mode. Just add the mode in your URL:
http://you-application/placeholder/nicolascage/g/{width}x{height}
http://you-application/placeholder/billmurray/gif/{width}x{height}
- Available modes:
g : gray mode
gif: gif mode
c: Wanna see some crazy stuff? Try the crazy Cage mode!
Based on famous placeholder generator by Dave Cowart (http://www.placecage.com, https://www.stevensegallery.com/, http://www.fillmurray.com)
Metadata
Release files for tgapp-placeholder 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tgapp-placeholder-1.0.1.tar.gz | 27.8 kB | Without provenance | Details for tgapp-placeholder-1.0.1.tar.gz |
Release files / tgapp-placeholder-1.0.1.tar.gz
| Download URL | tgapp-placeholder-1.0.1.tar.gz |
|---|---|
| Size | 27.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2768190eeb956043cb3f596a784372be277fe92486185ded868715de20ec6e9d
|
|
BLAKE2b-256 checksum How to use checksums |
315f2b46f32cbadf9184ad1bddb5d0437ab0e2a91a79beebfc088e6f2d90d185
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for tgapp-placeholder 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.