From f3fab159caee8a4425121f2511148ee537c29754 Mon Sep 17 00:00:00 2001 From: Veno Server Date: Tue, 15 Jun 2010 04:24:08 -0500 Subject: [PATCH] Readme and junk. Open source yo --- index.html | 76 ++++++++++++++++++++++++++++++++++++++++++++ lulz.html | 21 ++++++++++++ readme.md | 11 +++++++ redditimages.user.js | 13 ++++++++ upload_lulz.py | 42 ++++++++++++++++++++++++ 5 files changed, 163 insertions(+) create mode 100644 index.html create mode 100644 lulz.html create mode 100644 readme.md create mode 100644 redditimages.user.js create mode 100644 upload_lulz.py diff --git a/index.html b/index.html new file mode 100644 index 0000000..c893583 --- /dev/null +++ b/index.html @@ -0,0 +1,76 @@ + + + + + Images in Comments on Reddit + + + + +

Put Images in your Reddit Comments

+ +

+ Once upon a time, there existed a magical subreddit + where a user by the name of jamt9000 + did some real mad scientist type work. He basically created a script (and corresponding stylesheet) to generate small-scale images in comments on Reddit. It + was a neat trick, but limited solely to that subreddit, as it required custom CSS to function. You see, madness, as you know, is like gravity - all + it takes is a little push! +

+ +

+ Then I got bored. I wrapped up his work into a service to generate the code necessary to show the images in the comments, and wrote a corresponding + user script (Firefox, Opera, Chrome, et al that support user scripts) to handle the necessary CSS injection. That's part of why this is cool - unless you + install said userscript, your Reddit experience will (mostly) not change at all - almost 100% opt-in. +

+ + Download the Reddit: Images in Comments User Script + +
+ + +
+ + + + diff --git a/lulz.html b/lulz.html new file mode 100644 index 0000000..deab1b4 --- /dev/null +++ b/lulz.html @@ -0,0 +1,21 @@ + + + + + Images in Comments on Reddit + + + +
+ + +
+ + diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..3841867 --- /dev/null +++ b/readme.md @@ -0,0 +1,11 @@ +Reddit: Images in Comments +----------------------------------------------------------------- +Based off the work done by Reddit user jamt9000 in http://www.reddit.com/r/commentimages/. + +Requires +----------------------------------------------------------------- +This stack runs on mod_wsgi/Python 2.5. Extremely barebones; fork, patch, port, whatever, just enjoy. + +Contact? +------------------------------------------------------------------ +ryan [/at\] venodesigns.net diff --git a/redditimages.user.js b/redditimages.user.js new file mode 100644 index 0000000..bca16e9 --- /dev/null +++ b/redditimages.user.js @@ -0,0 +1,13 @@ +// ==UserScript== +// @name Reddit: Images in Comments +// @description Alternate reality Reddit to allow you to see images generated by http://reddit.venodesigns.net/ +// @include http://reddit.com/* +// @include http://www.reddit.com/* +// @author User Script & Web Service by Ryan McGrath (ryan@venodesigns.net), original work by jamt9000 (Reddit user) +// ==/UserScript== + +var styleNode = document.createElement("style"); +styleNode.setAttribute("id", "redditcommentimagesjunkstables"); +var cssJunk = document.createTextNode('.usertext a[href^="/"]{display:inline-block;width:1px;height:1px;font-size:0}.usertext a[href="/image"]{width:0px}.usertext a[href="/image"][title="1px"]~a[href^="/"]{width:1px;height:1px}.usertext a[href="/image"][title="2px"]~a[href^="/"]{width:2px;height:2px}.usertext a[href="/image"][title="5px"]~a[href^="/"]{width:5px;height:5px}.usertext a[href="/image"][title="10px"]~a[href^="/"]{width:10px;height:10px}a[href="/000"]{background:#000}a[href="/003"]{background:#003}a[href="/006"]{background:#006}a[href="/009"]{background:#009}a[href="/00C"]{background:#00C}a[href="/00F"]{background:#00F}a[href="/030"]{background:#030}a[href="/033"]{background:#033}a[href="/036"]{background:#036}a[href="/039"]{background:#039}a[href="/03C"]{background:#03C}a[href="/03F"]{background:#03F}a[href="/060"]{background:#060}a[href="/063"]{background:#063}a[href="/066"]{background:#066}a[href="/069"]{background:#069}a[href="/06C"]{background:#06C}a[href="/06F"]{background:#06F}a[href="/090"]{background:#090}a[href="/093"]{background:#093}a[href="/096"]{background:#096}a[href="/099"]{background:#099}a[href="/09C"]{background:#09C}a[href="/09F"]{background:#09F}a[href="/0C0"]{background:#0C0}a[href="/0C3"]{background:#0C3}a[href="/0C6"]{background:#0C6}a[href="/0C9"]{background:#0C9}a[href="/0CC"]{background:#0CC}a[href="/0CF"]{background:#0CF}a[href="/0F0"]{background:#0F0}a[href="/0F3"]{background:#0F3}a[href="/0F6"]{background:#0F6}a[href="/0F9"]{background:#0F9}a[href="/0FC"]{background:#0FC}a[href="/0FF"]{background:#0FF}a[href="/300"]{background:#300}a[href="/303"]{background:#303}a[href="/306"]{background:#306}a[href="/309"]{background:#309}a[href="/30C"]{background:#30C}a[href="/30F"]{background:#30F}a[href="/330"]{background:#330}a[href="/333"]{background:#333}a[href="/336"]{background:#336}a[href="/339"]{background:#339}a[href="/33C"]{background:#33C}a[href="/33F"]{background:#33F}a[href="/360"]{background:#360}a[href="/363"]{background:#363}a[href="/366"]{background:#366}a[href="/369"]{background:#369}a[href="/36C"]{background:#36C}a[href="/36F"]{background:#36F}a[href="/390"]{background:#390}a[href="/393"]{background:#393}a[href="/396"]{background:#396}a[href="/399"]{background:#399}a[href="/39C"]{background:#39C}a[href="/39F"]{background:#39F}a[href="/3C0"]{background:#3C0}a[href="/3C3"]{background:#3C3}a[href="/3C6"]{background:#3C6}a[href="/3C9"]{background:#3C9}a[href="/3CC"]{background:#3CC}a[href="/3CF"]{background:#3CF}a[href="/3F0"]{background:#3F0}a[href="/3F3"]{background:#3F3}a[href="/3F6"]{background:#3F6}a[href="/3F9"]{background:#3F9}a[href="/3FC"]{background:#3FC}a[href="/3FF"]{background:#3FF}a[href="/600"]{background:#600}a[href="/603"]{background:#603}a[href="/606"]{background:#606}a[href="/609"]{background:#609}a[href="/60C"]{background:#60C}a[href="/60F"]{background:#60F}a[href="/630"]{background:#630}a[href="/633"]{background:#633}a[href="/636"]{background:#636}a[href="/639"]{background:#639}a[href="/63C"]{background:#63C}a[href="/63F"]{background:#63F}a[href="/660"]{background:#660}a[href="/663"]{background:#663}a[href="/666"]{background:#666}a[href="/669"]{background:#669}a[href="/66C"]{background:#66C}a[href="/66F"]{background:#66F}a[href="/690"]{background:#690}a[href="/693"]{background:#693}a[href="/696"]{background:#696}a[href="/699"]{background:#699}a[href="/69C"]{background:#69C}a[href="/69F"]{background:#69F}a[href="/6C0"]{background:#6C0}a[href="/6C3"]{background:#6C3}a[href="/6C6"]{background:#6C6}a[href="/6C9"]{background:#6C9}a[href="/6CC"]{background:#6CC}a[href="/6CF"]{background:#6CF}a[href="/6F0"]{background:#6F0}a[href="/6F3"]{background:#6F3}a[href="/6F6"]{background:#6F6}a[href="/6F9"]{background:#6F9}a[href="/6FC"]{background:#6FC}a[href="/6FF"]{background:#6FF}a[href="/900"]{background:#900}a[href="/903"]{background:#903}a[href="/906"]{background:#906}a[href="/909"]{background:#909}a[href="/90C"]{background:#90C}a[href="/90F"]{background:#90F}a[href="/930"]{background:#930}a[href="/933"]{background:#933}a[href="/936"]{background:#936}a[href="/939"]{background:#939}a[href="/93C"]{background:#93C}a[href="/93F"]{background:#93F}a[href="/960"]{background:#960}a[href="/963"]{background:#963}a[href="/966"]{background:#966}a[href="/969"]{background:#969}a[href="/96C"]{background:#96C}a[href="/96F"]{background:#96F}a[href="/990"]{background:#990}a[href="/993"]{background:#993}a[href="/996"]{background:#996}a[href="/999"]{background:#999}a[href="/99C"]{background:#99C}a[href="/99F"]{background:#99F}a[href="/9C0"]{background:#9C0}a[href="/9C3"]{background:#9C3}a[href="/9C6"]{background:#9C6}a[href="/9C9"]{background:#9C9}a[href="/9CC"]{background:#9CC}a[href="/9CF"]{background:#9CF}a[href="/9F0"]{background:#9F0}a[href="/9F3"]{background:#9F3}a[href="/9F6"]{background:#9F6}a[href="/9F9"]{background:#9F9}a[href="/9FC"]{background:#9FC}a[href="/9FF"]{background:#9FF}a[href="/C00"]{background:#C00}a[href="/C03"]{background:#C03}a[href="/C06"]{background:#C06}a[href="/C09"]{background:#C09}a[href="/C0C"]{background:#C0C}a[href="/C0F"]{background:#C0F}a[href="/C30"]{background:#C30}a[href="/C33"]{background:#C33}a[href="/C36"]{background:#C36}a[href="/C39"]{background:#C39}a[href="/C3C"]{background:#C3C}a[href="/C3F"]{background:#C3F}a[href="/C60"]{background:#C60}a[href="/C63"]{background:#C63}a[href="/C66"]{background:#C66}a[href="/C69"]{background:#C69}a[href="/C6C"]{background:#C6C}a[href="/C6F"]{background:#C6F}a[href="/C90"]{background:#C90}a[href="/C93"]{background:#C93}a[href="/C96"]{background:#C96}a[href="/C99"]{background:#C99}a[href="/C9C"]{background:#C9C}a[href="/C9F"]{background:#C9F}a[href="/CC0"]{background:#CC0}a[href="/CC3"]{background:#CC3}a[href="/CC6"]{background:#CC6}a[href="/CC9"]{background:#CC9}a[href="/CCC"]{background:#CCC}a[href="/CCF"]{background:#CCF}a[href="/CF0"]{background:#CF0}a[href="/CF3"]{background:#CF3}a[href="/CF6"]{background:#CF6}a[href="/CF9"]{background:#CF9}a[href="/CFC"]{background:#CFC}a[href="/CFF"]{background:#CFF}a[href="/F00"]{background:#F00}a[href="/F03"]{background:#F03}a[href="/F06"]{background:#F06}a[href="/F09"]{background:#F09}a[href="/F0C"]{background:#F0C}a[href="/F0F"]{background:#F0F}a[href="/F30"]{background:#F30}a[href="/F33"]{background:#F33}a[href="/F36"]{background:#F36}a[href="/F39"]{background:#F39}a[href="/F3C"]{background:#F3C}a[href="/F3F"]{background:#F3F}a[href="/F60"]{background:#F60}a[href="/F63"]{background:#F63}a[href="/F66"]{background:#F66}a[href="/F69"]{background:#F69}a[href="/F6C"]{background:#F6C}a[href="/F6F"]{background:#F6F}a[href="/F90"]{background:#F90}a[href="/F93"]{background:#F93}a[href="/F96"]{background:#F96}a[href="/F99"]{background:#F99}a[href="/F9C"]{background:#F9C}a[href="/F9F"]{background:#F9F}a[href="/FC0"]{background:#FC0}a[href="/FC3"]{background:#FC3}a[href="/FC6"]{background:#FC6}a[href="/FC9"]{background:#FC9}a[href="/FCC"]{background:#FCC}a[href="/FCF"]{background:#FCF}a[href="/FF0"]{background:#FF0}a[href="/FF3"]{background:#FF3}a[href="/FF6"]{background:#FF6}a[href="/FF9"]{background:#FF9}a[href="/FFC"]{background:#FFC}a[href="/FFF"]{background:#FFF}a[href="/!"]{background:#000}a[href="/#"]{background:#003}a[href="/$"]{background:#006}a[href="/%"]{background:#009}a[href="/&"]{background:#00C}a[href="/*"]{background:#00F}a[href="/+"]{background:#030}a[href="/,"]{background:#033}a[href="/-"]{background:#036}a[href="/."]{background:#039}a[href="/0"]{background:#03C}a[href="/1"]{background:#03F}a[href="/2"]{background:#060}a[href="/3"]{background:#063}a[href="/4"]{background:#066}a[href="/5"]{background:#069}a[href="/6"]{background:#06C}a[href="/7"]{background:#06F}a[href="/8"]{background:#090}a[href="/9"]{background:#093}a[href="/:"]{background:#096}a[href="/;"]{background:#099}a[href="/<"]{background:#09C}a[href="/="]{background:#09F}a[href="/>"]{background:#0C0}a[href="/?"]{background:#0C3}a[href="/@"]{background:#0C6}a[href="/A"]{background:#0C9}a[href="/B"]{background:#0CC}a[href="/C"]{background:#0CF}a[href="/D"]{background:#0F0}a[href="/E"]{background:#0F3}a[href="/F"]{background:#0F6}a[href="/G"]{background:#0F9}a[href="/H"]{background:#0FC}a[href="/I"]{background:#0FF}a[href="/J"]{background:#300}a[href="/K"]{background:#303}a[href="/L"]{background:#306}a[href="/M"]{background:#309}a[href="/N"]{background:#30C}a[href="/O"]{background:#30F}a[href="/P"]{background:#330}a[href="/Q"]{background:#333}a[href="/R"]{background:#336}a[href="/S"]{background:#339}a[href="/T"]{background:#33C}a[href="/U"]{background:#33F}a[href="/V"]{background:#360}a[href="/W"]{background:#363}a[href="/X"]{background:#366}a[href="/Y"]{background:#369}a[href="/Z"]{background:#36C}a[href="/^"]{background:#36F}a[href="/_"]{background:#390}a[href="/`"]{background:#393}a[href="/a"]{background:#396}a[href="/b"]{background:#399}a[href="/c"]{background:#39C}a[href="/d"]{background:#39F}a[href="/e"]{background:#3C0}a[href="/f"]{background:#3C3}a[href="/g"]{background:#3C6}a[href="/h"]{background:#3C9}a[href="/i"]{background:#3CC}a[href="/j"]{background:#3CF}a[href="/k"]{background:#3F0}a[href="/l"]{background:#3F3}a[href="/m"]{background:#3F6}a[href="/n"]{background:#3F9}a[href="/o"]{background:#3FC}a[href="/p"]{background:#3FF}a[href="/q"]{background:#600}a[href="/r"]{background:#603}a[href="/s"]{background:#606}a[href="/t"]{background:#609}a[href="/u"]{background:#60C}a[href="/v"]{background:#60F}a[href="/w"]{background:#630}a[href="/x"]{background:#633}a[href="/y"]{background:#636}a[href="/z"]{background:#639}a[href="/{"]{background:#63C}a[href="/|"]{background:#63F}a[href="/}"]{background:#660}a[href="/~"]{background:#663}a[href="/%E2%91%A0"]{background:#666}a[href="/%E2%91%A1"]{background:#669}a[href="/%E2%91%A2"]{background:#66C}a[href="/%E2%91%A3"]{background:#66F}a[href="/%E2%91%A4"]{background:#690}a[href="/%E2%91%A5"]{background:#693}a[href="/%E2%91%A6"]{background:#696}a[href="/%E2%91%A7"]{background:#699}a[href="/%E2%91%A8"]{background:#69C}a[href="/%E2%91%A9"]{background:#69F}a[href="/%E2%91%AA"]{background:#6C0}a[href="/%E2%91%AB"]{background:#6C3}a[href="/%E2%91%AC"]{background:#6C6}a[href="/%E2%91%AD"]{background:#6C9}a[href="/%E2%91%AE"]{background:#6CC}a[href="/%E2%91%AF"]{background:#6CF}a[href="/%E2%91%B0"]{background:#6F0}a[href="/%E2%91%B1"]{background:#6F3}a[href="/%E2%91%B2"]{background:#6F6}a[href="/%E2%91%B3"]{background:#6F9}a[href="/%E2%91%B4"]{background:#6FC}a[href="/%E2%91%B5"]{background:#6FF}a[href="/%E2%91%B6"]{background:#900}a[href="/%E2%91%B7"]{background:#903}a[href="/%E2%91%B8"]{background:#906}a[href="/%E2%91%B9"]{background:#909}a[href="/%E2%91%BA"]{background:#90C}a[href="/%E2%91%BB"]{background:#90F}a[href="/%E2%91%BC"]{background:#930}a[href="/%E2%91%BD"]{background:#933}a[href="/%E2%91%BE"]{background:#936}a[href="/%E2%91%BF"]{background:#939}a[href="/%E2%92%80"]{background:#93C}a[href="/%E2%92%81"]{background:#93F}a[href="/%E2%92%82"]{background:#960}a[href="/%E2%92%83"]{background:#963}a[href="/%E2%92%84"]{background:#966}a[href="/%E2%92%85"]{background:#969}a[href="/%E2%92%86"]{background:#96C}a[href="/%E2%92%87"]{background:#96F}a[href="/%E2%92%88"]{background:#990}a[href="/%E2%92%89"]{background:#993}a[href="/%E2%92%8A"]{background:#996}a[href="/%E2%92%8B"]{background:#999}a[href="/%E2%92%8C"]{background:#99C}a[href="/%E2%92%8D"]{background:#99F}a[href="/%E2%92%8E"]{background:#9C0}a[href="/%E2%92%8F"]{background:#9C3}a[href="/%E2%92%90"]{background:#9C6}a[href="/%E2%92%91"]{background:#9C9}a[href="/%E2%92%92"]{background:#9CC}a[href="/%E2%92%93"]{background:#9CF}a[href="/%E2%92%94"]{background:#9F0}a[href="/%E2%92%95"]{background:#9F3}a[href="/%E2%92%96"]{background:#9F6}a[href="/%E2%92%97"]{background:#9F9}a[href="/%E2%92%98"]{background:#9FC}a[href="/%E2%92%99"]{background:#9FF}a[href="/%E2%92%9A"]{background:#C00}a[href="/%E2%92%9B"]{background:#C03}a[href="/%E2%92%9C"]{background:#C06}a[href="/%E2%92%9D"]{background:#C09}a[href="/%E2%92%9E"]{background:#C0C}a[href="/%E2%92%9F"]{background:#C0F}a[href="/%E2%92%A0"]{background:#C30}a[href="/%E2%92%A1"]{background:#C33}a[href="/%E2%92%A2"]{background:#C36}a[href="/%E2%92%A3"]{background:#C39}a[href="/%E2%92%A4"]{background:#C3C}a[href="/%E2%92%A5"]{background:#C3F}a[href="/%E2%92%A6"]{background:#C60}a[href="/%E2%92%A7"]{background:#C63}a[href="/%E2%92%A8"]{background:#C66}a[href="/%E2%92%A9"]{background:#C69}a[href="/%E2%92%AA"]{background:#C6C}a[href="/%E2%92%AB"]{background:#C6F}a[href="/%E2%92%AC"]{background:#C90}a[href="/%E2%92%AD"]{background:#C93}a[href="/%E2%92%AE"]{background:#C96}a[href="/%E2%92%AF"]{background:#C99}a[href="/%E2%92%B0"]{background:#C9C}a[href="/%E2%92%B1"]{background:#C9F}a[href="/%E2%92%B2"]{background:#CC0}a[href="/%E2%92%B3"]{background:#CC3}a[href="/%E2%92%B4"]{background:#CC6}a[href="/%E2%92%B5"]{background:#CC9}a[href="/%E2%92%B6"]{background:#CCC}a[href="/%E2%92%B7"]{background:#CCF}a[href="/%E2%92%B8"]{background:#CF0}a[href="/%E2%92%B9"]{background:#CF3}a[href="/%E2%92%BA"]{background:#CF6}a[href="/%E2%92%BB"]{background:#CF9}a[href="/%E2%92%BC"]{background:#CFC}a[href="/%E2%92%BD"]{background:#CFF}a[href="/%E2%92%BE"]{background:#F00}a[href="/%E2%92%BF"]{background:#F03}a[href="/%E2%93%80"]{background:#F06}a[href="/%E2%93%81"]{background:#F09}a[href="/%E2%93%82"]{background:#F0C}a[href="/%E2%93%83"]{background:#F0F}a[href="/%E2%93%84"]{background:#F30}a[href="/%E2%93%85"]{background:#F33}a[href="/%E2%93%86"]{background:#F36}a[href="/%E2%93%87"]{background:#F39}a[href="/%E2%93%88"]{background:#F3C}a[href="/%E2%93%89"]{background:#F3F}a[href="/%E2%93%8A"]{background:#F60}a[href="/%E2%93%8B"]{background:#F63}a[href="/%E2%93%8C"]{background:#F66}a[href="/%E2%93%8D"]{background:#F69}a[href="/%E2%93%8E"]{background:#F6C}a[href="/%E2%93%8F"]{background:#F6F}a[href="/%E2%93%90"]{background:#F90}a[href="/%E2%93%91"]{background:#F93}a[href="/%E2%93%92"]{background:#F96}a[href="/%E2%93%93"]{background:#F99}a[href="/%E2%93%94"]{background:#F9C}a[href="/%E2%93%95"]{background:#F9F}a[href="/%E2%93%96"]{background:#FC0}a[href="/%E2%93%97"]{background:#FC3}a[href="/%E2%93%98"]{background:#FC6}a[href="/%E2%93%99"]{background:#FC9}a[href="/%E2%93%9A"]{background:#FCC}a[href="/%E2%93%9B"]{background:#FCF}a[href="/%E2%93%9C"]{background:#FF0}a[href="/%E2%93%9D"]{background:#FF3}a[href="/%E2%93%9E"]{background:#FF6}a[href="/%E2%93%9F"]{background:#FF9}a[href="/%E2%93%A0"]{background:#FFC}a[href="/%E2%93%A1"]{background:#FFF}'); +styleNode.appendChild(cssJunk); +document.body.appendChild(styleNode); diff --git a/upload_lulz.py b/upload_lulz.py new file mode 100644 index 0000000..86917f9 --- /dev/null +++ b/upload_lulz.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +import numpy, sys, os, cgi +from PIL import Image +from cStringIO import StringIO + +def application(environ, start_response): + if environ['REQUEST_METHOD'] == 'POST': + bert = environ.copy() + bert['QUERY_STRING'] = '' + post = cgi.FieldStorage( + fp = bert['wsgi.input'], + environ=bert, + keep_blank_values=True + ) + map = {'000':'!','003':'#','006':'$','009':'%','00C':'&','00F':'*','030':'+','033':',','036':'-','039':'.','03C':'0','03F':'1','060':'2','063':'3','066':'4','069':'5','06C':'6','06F':'7','090':'8','093':'9','096':':','099':';','09C':'<','09F':'=','0C0':'>','0C3':'?','0C6':'@','0C9':'A','0CC':'B','0CF':'C','0F0':'D','0F3':'E','0F6':'F','0F9':'G','0FC':'H','0FF':'I','300':'J','303':'K','306':'L','309':'M','30C':'N','30F':'O','330':'P','333':'Q','336':'R','339':'S','33C':'T','33F':'U','360':'V','363':'W','366':'X','369':'Y','36C':'Z','36F':'^','390':'_','393':'`','396':'a','399':'b','39C':'c','39F':'d','3C0':'e','3C3':'f','3C6':'g','3C9':'h','3CC':'i','3CF':'j','3F0':'k','3F3':'l','3F6':'m','3F9':'n','3FC':'o','3FF':'p','600':'q','603':'r','606':'s','609':'t','60C':'u','60F':'v','630':'w','633':'x','636':'y','639':'z','63C':'{','63F':'|','660':'}','663':'~','666':'①','669':'②','66C':'③','66F':'④','690':'⑤','693':'⑥','696':'⑦','699':'⑧','69C':'⑨','69F':'⑩','6C0':'⑪','6C3':'⑫','6C6':'⑬','6C9':'⑭','6CC':'⑮','6CF':'⑯','6F0':'⑰','6F3':'⑱','6F6':'⑲','6F9':'⑳','6FC':'⑴','6FF':'⑵','900':'⑶','903':'⑷','906':'⑸','909':'⑹','90C':'⑺','90F':'⑻','930':'⑼','933':'⑽','936':'⑾','939':'⑿','93C':'⒀','93F':'⒁','960':'⒂','963':'⒃','966':'⒄','969':'⒅','96C':'⒆','96F':'⒇','990':'⒈','993':'⒉','996':'⒊','999':'⒋','99C':'⒌','99F':'⒍','9C0':'⒎','9C3':'⒏','9C6':'⒐','9C9':'⒑','9CC':'⒒','9CF':'⒓','9F0':'⒔','9F3':'⒕','9F6':'⒖','9F9':'⒗','9FC':'⒘','9FF':'⒙','C00':'⒚','C03':'⒛','C06':'⒜','C09':'⒝','C0C':'⒞','C0F':'⒟','C30':'⒠','C33':'⒡','C36':'⒢','C39':'⒣','C3C':'⒤','C3F':'⒥','C60':'⒦','C63':'⒧','C66':'⒨','C69':'⒩','C6C':'⒪','C6F':'⒫','C90':'⒬','C93':'⒭','C96':'⒮','C99':'⒯','C9C':'⒰','C9F':'⒱','CC0':'⒲','CC3':'⒳','CC6':'⒴','CC9':'⒵','CCC':'Ⓐ','CCF':'Ⓑ','CF0':'Ⓒ','CF3':'Ⓓ','CF6':'Ⓔ','CF9':'Ⓕ','CFC':'Ⓖ','CFF':'Ⓗ','F00':'Ⓘ','F03':'Ⓙ','F06':'Ⓚ','F09':'Ⓛ','F0C':'Ⓜ','F0F':'Ⓝ','F30':'Ⓞ','F33':'Ⓟ','F36':'Ⓠ','F39':'Ⓡ','F3C':'Ⓢ','F3F':'Ⓣ','F60':'Ⓤ','F63':'Ⓥ','F66':'Ⓦ','F69':'Ⓧ','F6C':'Ⓨ','F6F':'Ⓩ','F90':'ⓐ','F93':'ⓑ','F96':'ⓒ','F99':'ⓓ','F9C':'ⓔ','F9F':'ⓕ','FC0':'ⓖ','FC3':'ⓗ','FC6':'ⓘ','FC9':'ⓙ','FCC':'ⓚ','FCF':'ⓛ','FF0':'ⓜ','FF3':'ⓝ','FF6':'ⓞ','FF9':'ⓟ','FFC':'ⓠ','FFF':'ⓡ',} + #print post['derimagen'].value + im = Image.open( StringIO(post['derimagen'].value) ) + im = im.convert('P', palette = Image.WEB) + im = im.convert('RGB') + pixels = numpy.asarray(im) + output= "" + for line in pixels: + for pixel in line: + color = "" + for value in pixel: + hex = "%X" % value + color += hex[0] + link = "[](/%s)" % map[color] + output += link + output += " blol" + else: + output = "N/A" + te = '' + te += '' + te += '' + te += '' + response_headers = [ + ('Content-Length', str(len(te))), + ('Content-Type', 'text/html'), + ] + start_response('200 OK', response_headers) + return [te]