Created
February 18, 2013 20:05
-
-
Save phred/4980217 to your computer and use it in GitHub Desktop.
Piece of crap web service for putting stuff on the clipboard. Hit /crap for some random Hipster Ipsum! Crap is a fun word. Oh yeah, and don't forget to pip install xerox (and flask)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import xerox, random | |
from flask import Flask, request | |
app = Flask(__name__) | |
@app.route("/crap") | |
def crap(): | |
xerox.copy(random.choice(app.bucket)) | |
return "Copying some randomly chosen crap to your clipboard!" | |
@app.route("/") | |
def home(): | |
if request.args.get('clip', None): | |
xerox.copy(request.args.get('clip')) | |
return "Copied that for you, boss!" | |
return "sup, maybe you want to throw me a ?clip= GET param" | |
app.bucket = 'Culpa officia vice DIY street art voluptate banjo irony cliche williamsburg retro. Neutra aliquip carles, 3 wolf moon readymade cray laboris semiotics next level sed wolf banjo deserunt. Exercitation artisan actually tofu. Irure messenger bag sapiente vinyl veniam synth, Austin gluten-free food truck locavore pinterest YOLO salvia. +1 pork belly blue bottle, american apparel duis et quinoa salvia viral jean shorts portland DIY. Street art aliqua excepteur sunt kale chips, flexitarian pop-up tattooed veniam skateboard before they sold out tofu. Anim literally leggings, DIY nesciunt quinoa organic sapiente gluten-free aesthetic adipisicing laborum carles.'.split('.') | |
if __name__ == "__main__": | |
app.run(debug=True) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment