Skip to content

Instantly share code, notes, and snippets.

@omgwtfgames
Last active December 31, 2015 03:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save omgwtfgames/7925134 to your computer and use it in GitHub Desktop.
Save omgwtfgames/7925134 to your computer and use it in GitHub Desktop.
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
Copy link
Author

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