Skip to content

Instantly share code, notes, and snippets.

@omgwtfgames omgwtfgames/monetize.py
Last active Dec 31, 2015

Embed
What would you like to do?
A simple Python CGI script for producing permission forms for Let's Players
<h1>OMGWTFGAMES !1!! Let's Players</h1>
<h1>"moolah for the viddya" permission form</h1>
<form method="get" action="monetize.py">
<table><tr>
<td>Your name:</td><td><input type="text" name="name"></td>
</tr>
<tr>
<td>The game you've made a video of (optional):</td><td><input type="text" name="game"></td>
</tr>
</table>
<br/>
<input type="submit" value="Submit">
</form>
</body></html>
"""
template_str = """
<h1>Monetization permission for '${name}'</h1>
<br/>
I,<br/>
<br/>
<em>Andrew Perry</em>,<br/>
<br/>
Founder of OMGWTFGAMES !1!!<br/>
<br/>
give explicit and legal permission to<br/>
<br/>
<em>'${name}'</em>,<br/>
<br/>
a user of your video broadcasting service,<br/>
<br/>
to monetize streamed or recorded videos of any game developed by <br/>
OMGWTFGAMES !1!! (omgwtfgames.com), <br/>
including but not limited to ${game}.<br/>
<br/>
This permission is (retro-actively) valid from the moment your <br/>
service has been launched until the end of time. This permission <br/>
shall not be limited to any specific state, country or territory.<br/>
"""
print "Content-Type: text/html\n\n"
values = cgi.FieldStorage()
if "name" not in values:
print form_str
else:
template = Template(template_str)
if "game" not in values:
game = ""
else:
game = "the game titled '%s'" % (values['game'].value)
#print template.render(name=values['name'].value, game=game)
print template.substitute(name=values['name'].value, game=game)
@omgwtfgames

This comment has been minimized.

Copy link
Owner Author

commented Dec 14, 2013

As hosted here (with an added stylesheet): http://omgwtfgames.com/letsplay/monetize.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.