Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

initial commit

  • Loading branch information...
commit b46b545f15bae9b9612fef5d287dd0a07fbba503 0 parents
@mitsuhiko mitsuhiko authored
2  .gitignore
@@ -0,0 +1,2 @@
+settings.cfg
+*.pyc
193 artwork/logo.svg
@@ -0,0 +1,193 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="518.02063"
+ height="128.04468"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.0 r9654"
+ sodipodi:docname="logo.svg">
+ <defs
+ id="defs4">
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ id="perspective10" />
+ <inkscape:perspective
+ id="perspective2824"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective2840"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective2878"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective2894"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective2910"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective2926"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective2976"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective3020"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective3036"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective3052"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective3866"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="1.4"
+ inkscape:cx="214.44367"
+ inkscape:cy="96.274195"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:window-width="1676"
+ inkscape:window-height="1006"
+ inkscape:window-x="4"
+ inkscape:window-y="0"
+ inkscape:window-maximized="0"
+ fit-margin-top="0"
+ fit-margin-left="0"
+ fit-margin-right="0"
+ fit-margin-bottom="0" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(-42.665152,-30.998114)">
+ <g
+ style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ id="text3850"
+ transform="matrix(0.65949959,0,0,0.65949959,-66.677987,10.887738)">
+ <path
+ d="m 229.85182,43.77803 c -0.79695,3.140714 -1.28913,8.414146 -1.47656,15.820313 -7e-5,1.453199 -0.65632,2.179761 -1.96875,2.179687 -1.31257,7.4e-5 -2.22663,-0.632738 -2.74219,-1.898437 -1.40631,-3.421796 -2.74225,-5.812419 -4.00781,-7.171875 -1.50006,-1.593666 -3.49225,-2.554603 -5.97656,-2.882813 -2.67193,-0.421789 -9.32818,-0.632726 -19.96875,-0.632812 -2.43754,8.6e-5 -4.03129,0.257898 -4.78125,0.773437 -0.46879,0.32821 -0.70316,1.031335 -0.70313,2.109375 l 0,31.851563 c -3e-5,1.078175 0.67966,1.5938 2.03906,1.546875 4.17184,-0.04682 10.21871,-0.328075 18.14063,-0.84375 1.54682,-0.187449 2.58979,-0.691355 3.12891,-1.511719 0.539,-0.820259 1.06634,-2.941351 1.58203,-6.363281 0.32806,-1.87494 1.42963,-2.601502 3.30468,-2.179688 1.59369,0.328186 2.27338,1.054747 2.03907,2.179688 -1.31256,6.375052 -1.73444,14.671919 -1.26563,24.890627 0.0468,1.21878 -0.72662,1.87503 -2.32031,1.96875 -1.31256,0.14065 -2.13287,-0.56247 -2.46094,-2.10938 -1.2188,-5.859333 -3.48052,-8.988236 -6.78515,-9.386716 -3.30474,-0.398394 -8.68364,-0.597612 -16.13672,-0.597656 -0.84379,4.4e-5 -1.26566,0.304731 -1.26563,0.914062 l 0,31.64063 c -3e-5,2.34375 0.86716,3.9375 2.60156,4.78125 1.35934,0.70313 4.28903,1.33594 8.78907,1.89843 2.29683,0.23438 3.30464,1.24219 3.02343,3.02344 -0.28129,1.54688 -2.34379,2.15625 -6.1875,1.82813 -11.1094,-0.89063 -20.27345,-0.84375 -27.49218,0.14062 -2.01564,0.28125 -3.02345,-0.53906 -3.02344,-2.46094 -1e-5,-1.21874 1.0078,-1.92187 3.02344,-2.10937 4.59373,-0.51562 6.8906,-4.54687 6.89062,-12.09375 l 0,-60.187502 c -2e-5,-3.093671 -0.5508,-5.472575 -1.65234,-7.136719 -1.10158,-1.663977 -3.15236,-3.175695 -6.15235,-4.535156 -1.87501,-0.843661 -2.57813,-1.992098 -2.10937,-3.445313 0.23436,-0.890532 0.60936,-1.382719 1.125,-1.476562 0.46874,-0.140532 1.71092,-0.04678 3.72656,0.28125 2.95311,0.468842 9.91404,0.703217 20.88281,0.703125 12.93746,9.2e-5 24.11713,-0.281158 33.53907,-0.84375 3.14055,-0.187407 4.71086,0.07041 4.71093,0.773437 -7e-5,0.187592 -0.0235,0.375092 -0.0703,0.5625 z"
+ style="font-size:144px;font-family:High Tower Text;-inkscape-font-specification:High Tower Text"
+ id="path2830"
+ inkscape:connector-curvature="0" />
+ <path
+ d="m 275.55495,133.14522 c -4e-5,1.875 -1.05473,2.69531 -3.16407,2.46094 -6.46877,-0.60938 -14.48439,-0.51563 -24.04687,0.28125 -1.92189,0.18749 -3.10548,0.14062 -3.55078,-0.14063 -0.44532,-0.28125 -0.66798,-1.05469 -0.66797,-2.32031 -1e-5,-1.125 1.27733,-2.07422 3.83203,-2.84766 2.55467,-0.77343 3.83202,-3.08202 3.83203,-6.92578 l 0,-63.632812 c -1e-5,-3.796796 -0.55079,-6.585856 -1.65234,-8.367188 -1.10158,-1.781164 -3.03517,-3.163975 -5.80078,-4.148437 -1.45313,-0.515537 -2.1797,-1.242099 -2.17969,-2.179688 -1e-5,-1.406158 1.05468,-2.460845 3.16406,-3.164062 3.18749,-1.031156 6.49217,-2.624904 9.91406,-4.78125 2.81248,-1.687401 4.59373,-2.53115 5.34375,-2.53125 1.73435,1e-4 2.60154,1.195412 2.60157,3.585937 -3e-5,-0.187403 -0.0938,2.156345 -0.28125,7.03125 -0.14065,4.64071 -0.18753,9.211018 -0.14063,13.710938 l 0.28125,62.789062 c -2e-5,2.85939 0.7031,4.9336 2.10938,6.22266 1.40622,1.28906 3.82028,2.14453 7.24218,2.5664 2.10934,0.23438 3.16403,1.03126 3.16407,2.39063 z"
+ style="font-size:144px;font-family:High Tower Text;-inkscape-font-specification:High Tower Text"
+ id="path2832"
+ inkscape:connector-curvature="0" />
+ <path
+ d="m 339.67995,128.43428 c -7e-5,0.98438 -1.79303,2.47266 -5.37891,4.46484 -3.58599,1.99219 -6.45708,2.98828 -8.61328,2.98829 -1.82817,-10e-6 -3.44536,-0.89063 -4.85156,-2.67188 -1.40629,-1.78125 -2.39067,-2.67187 -2.95313,-2.67187 -0.42191,0 -2.64847,0.96094 -6.67969,2.88281 -4.03128,1.92187 -8.08596,2.88281 -12.16406,2.88281 -3.84377,0 -7.0547,-1.125 -9.63281,-3.375 -2.81251,-2.48437 -4.21876,-5.85937 -4.21875,-10.125 -1e-5,-8.10935 9.28123,-13.92185 27.84375,-17.4375 3.18746,-0.60934 4.80465,-1.89841 4.85156,-3.86719 l 0.14063,-4.499997 c 0.28121,-7.687454 -3.11723,-11.5312 -10.19532,-11.53125 -2.01565,5e-5 -3.9258,1.804735 -5.73046,5.414062 -1.80471,3.609416 -4.39456,5.554727 -7.76954,5.835938 -3.84376,0.375038 -5.76563,-1.242148 -5.76562,-4.851563 -1e-5,-2.249954 2.85936,-4.874951 8.57812,-7.875 5.99998,-3.14057 11.7656,-4.710881 17.29688,-4.710937 9.51558,5.6e-5 14.22651,4.523489 14.13281,13.570312 l -0.28125,28.968755 c -0.0469,3.04688 1.24214,4.57032 3.86719,4.57031 0.51557,1e-5 1.49994,-0.11718 2.95312,-0.35156 1.45307,-0.23437 2.29682,-0.35156 2.53125,-0.35157 1.35932,1e-5 2.039,0.91407 2.03907,2.74219 z M 318.0237,112.40303 c 0.0468,-1.17185 -0.2227,-1.94529 -0.8086,-2.32031 -0.58597,-0.37498 -1.51175,-0.44529 -2.77734,-0.21094 -11.2969,2.01565 -16.94533,5.69533 -16.94531,11.03906 -2e-5,5.39064 2.92966,8.08595 8.78906,8.08594 2.34372,1e-5 4.75778,-0.44531 7.24219,-1.33594 2.90621,-1.03124 4.35933,-2.27342 4.35937,-3.72656 z"
+ style="font-size:144px;font-family:High Tower Text;-inkscape-font-specification:High Tower Text"
+ id="path2834"
+ inkscape:connector-curvature="0" />
+ <path
+ d="m 392.13307,120.06709 c -5e-5,4.96876 -1.9102,8.91798 -5.73047,11.84766 -3.82035,2.92969 -9.03519,4.39453 -15.64453,4.39453 -4.40627,0 -8.81252,-0.46875 -13.21875,-1.40625 -3.79688,-0.84375 -6.00001,-1.61719 -6.60937,-2.32031 -0.37501,-0.65625 -0.56251,-3.86718 -0.5625,-9.63281 -1e-5,-2.48436 0.56249,-3.77343 1.6875,-3.86719 1.12499,-0.14061 2.08592,0.46876 2.88281,1.82812 3.51561,6.14064 9.18748,9.21095 17.01562,9.21094 6.60934,1e-5 9.91403,-2.29687 9.91407,-6.89062 -4e-5,-2.01562 -0.75004,-3.70311 -2.25,-5.0625 -1.64066,-1.54686 -4.82816,-3.35155 -9.5625,-5.41407 -6.84377,-3.04685 -11.41408,-5.71872 -13.71094,-8.01562 -2.48439,-2.43747 -3.72657,-5.718716 -3.72656,-9.843752 -1e-5,-5.062455 1.9453,-8.999951 5.83593,-11.8125 3.60936,-2.718695 8.43748,-4.078069 14.48438,-4.078125 3.79684,5.6e-5 7.26559,0.304743 10.40625,0.914062 3.37496,0.60943 5.13277,1.359429 5.27344,2.25 0.37495,2.625051 1.14839,6.421922 2.32031,11.390625 0.14058,0.609416 -0.51567,1.101603 -1.96875,1.476563 -1.54692,0.328165 -2.57817,0.07035 -3.09375,-0.773438 -3.70317,-6.046828 -8.39066,-9.070262 -14.0625,-9.070312 -6.4219,5e-5 -9.63283,2.062548 -9.63281,6.1875 -2e-5,2.296916 0.86716,4.12504 2.60156,5.484375 1.54685,1.171912 5.17966,3.000035 10.89844,5.484372 5.99996,2.57816 10.07808,4.89847 12.23437,6.96094 2.81245,2.6719 4.2187,6.25783 4.21875,10.75781 z"
+ style="font-size:144px;font-family:High Tower Text;-inkscape-font-specification:High Tower Text"
+ id="path2836"
+ inkscape:connector-curvature="0" />
+ <path
+ d="m 473.69557,132.72334 c -7e-5,1.64063 -1.10163,2.50782 -3.30469,2.60157 -3.28131,0.0469 -7.57037,0.28124 -12.86718,0.70312 -2.62506,0.51562 -4.50006,0.1875 -5.625,-0.98437 -7.4063,-7.96875 -13.68754,-16.31249 -18.84375,-25.03125 -0.42191,-0.74998 -0.96097,-1.12498 -1.61719,-1.125 -0.79691,2e-5 -2.17972,0.70315 -4.14844,2.10937 -2.20315,1.21877 -3.30471,2.95315 -3.30469,5.20313 -2e-5,1.59376 0.0469,3.89064 0.14063,6.89062 0.0937,3.00001 0.84372,4.96876 2.25,5.90625 0.98435,0.65626 3.25778,1.17188 6.82031,1.54688 2.20309,0.28125 3.30465,1.10156 3.30469,2.46093 -4e-5,1.07813 -0.17582,1.7461 -0.52734,2.00391 -0.3516,0.25781 -1.27738,0.31641 -2.77735,0.17578 -4.68753,-0.42187 -12.60939,-0.1875 -23.76562,0.70313 -2.81251,0.23437 -4.33595,-0.11719 -4.57032,-1.05469 -0.0937,-0.32813 -0.14063,-0.79688 -0.14062,-1.40625 -1e-5,-1.45312 1.42968,-2.55469 4.28906,-3.30469 2.57811,-0.65624 3.86718,-3.67968 3.86719,-9.07031 l 0,-61.453127 c -1e-5,-3.843671 -0.37501,-6.515543 -1.125,-8.015625 -1.03126,-1.92179 -3.18751,-3.421788 -6.46875,-4.5 -1.54688,-0.515536 -2.32032,-1.242098 -2.32031,-2.179688 -1e-5,-1.359283 1.10155,-2.413969 3.30468,-3.164062 3.51562,-1.17178 6.86718,-2.788966 10.05469,-4.851563 2.57811,-1.6874 4.17186,-2.531149 4.78125,-2.53125 1.92185,1.01e-4 2.88279,1.21885 2.88281,3.65625 -2e-5,-0.328027 -0.0235,1.992283 -0.0703,6.960938 -0.0469,3.421962 -0.0703,8.015707 -0.0703,13.78125 l 0.14062,44.015627 c -2e-5,1.21878 0.3281,1.82815 0.98438,1.82812 0.7031,3e-5 1.78122,-0.60934 3.23437,-1.82812 3.8906,-3.046842 8.67184,-7.031213 14.34375,-11.953127 1.12496,-1.17183 1.68746,-2.109329 1.6875,-2.8125 -4e-5,-1.265577 -1.89848,-2.156201 -5.69531,-2.671875 -1.64066,-0.18745 -2.4141,-1.101512 -2.32031,-2.742188 0.14059,-1.64057 0.9609,-2.343695 2.46094,-2.109375 3.37495,0.468805 8.29682,0.726617 14.76562,0.773438 4.49994,0.04693 8.9765,0.07037 13.42969,0.07031 1.45306,0.04693 2.17962,0.914116 2.17969,2.601563 -7e-5,1.5938 -1.14851,2.460986 -3.44532,2.601562 -3.60943,0.140674 -7.00787,0.960986 -10.19531,2.460938 -4.45317,2.015669 -9.21098,5.554728 -14.27344,10.617187 -0.37504,0.281286 -0.56254,0.632847 -0.5625,1.054687 -4e-5,0.65629 0.79684,2.2266 2.39063,4.71094 5.85933,8.90627 11.39057,15.63283 16.59375,20.17969 3.32806,2.85938 6.44525,4.28907 9.35156,4.28906 2.15618,1e-5 3.49212,0.15235 4.00781,0.45703 0.51556,0.30469 0.77337,1.11329 0.77344,2.42578 z"
+ style="font-size:144px;font-family:High Tower Text;-inkscape-font-specification:High Tower Text"
+ id="path2838"
+ inkscape:connector-curvature="0" />
+ </g>
+ <text
+ xml:space="preserve"
+ style="font-size:40.3021698px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:none;stroke:#000000;stroke-width:1.00755429;stroke-opacity:1;font-family:Sans"
+ x="259.91782"
+ y="100.22276"
+ id="text6925"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan6927"
+ x="259.91782"
+ y="100.22276"
+ style="font-size:96.72520447px;font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;fill:none;stroke:#000000;stroke-width:1.00755429;stroke-opacity:1;font-family:Savoye LET;-inkscape-font-specification:Savoye LET Medium">Feedback</tspan></text>
+ <path
+ style="fill:#000000"
+ d="m 524.16057,148.60602 c -0.0771,-0.0771 0.17975,-2.24227 0.57078,-4.8115 0.39103,-2.56923 0.71494,-4.838 0.71981,-5.04171 0.005,-0.20371 0.39777,-0.38793 0.87309,-0.40937 0.51629,-0.0233 0.6157,-0.13927 0.24692,-0.28808 -1.11476,-0.44982 -0.70604,-1.73055 0.49385,-1.54748 0.61113,0.0932 1.05005,0.45868 0.97537,0.81208 -0.0855,0.40457 0.28029,0.59696 0.98769,0.51947 0.61791,-0.0677 1.98398,0.24902 3.0357,0.70381 2.31157,0.99955 2.55218,1.02305 1.6946,0.16547 -0.36377,-0.36376 -1.32412,-0.8823 -2.13411,-1.1523 -1.83377,-0.61126 -1.69796,-1.38658 0.24973,-1.42566 0.80519,-0.0162 1.62952,-0.19491 1.83184,-0.39724 0.68568,-0.68567 -1.07585,-1.32439 -2.81352,-1.02017 l -1.72846,0.30261 1.31251,-1.03291 c 0.72188,-0.5681 1.49968,-1.04569 1.72846,-1.06131 0.69759,-0.0476 5.24122,-6.17077 7.21008,-9.71655 3.06142,-5.51341 4.5735,-11.1229 6.02596,-22.35498 1.08578,-8.396517 2.23272,-12.841692 5.44039,-21.085271 2.91835,-7.500052 3.43168,-9.724098 1.74437,-7.557752 -0.52889,0.679037 -0.85227,1.592142 -0.71864,2.029121 0.13364,0.436978 -0.15095,1.103669 -0.63241,1.481535 -0.79092,0.620744 -0.81171,0.605731 -0.21555,-0.155571 0.3629,-0.463424 0.52049,-1.068034 0.3502,-1.34357 -0.32736,-0.529679 0.86469,-3.20588 2.01373,-4.520876 0.37529,-0.429497 1.11558,-2.762916 1.64507,-5.185374 0.82858,-3.79078 3.00389,-10.862693 4.20304,-13.664069 0.21489,-0.502018 0.15751,-0.864229 -0.13693,-0.864229 -0.5704,0 0.0483,-2.905246 1.04179,-4.891541 0.80544,-1.610419 0.61833,-6.330122 -0.29205,-7.366995 -0.40002,-0.455596 -1.17603,-1.717282 -1.72448,-2.803741 -1.40652,-2.786309 -3.07665,-4.232273 -4.46811,-3.868398 -1.13279,0.296233 -4.36861,6.08515 -6.99308,12.510688 -0.61016,1.493882 -2.61581,5.716258 -4.45699,9.383058 -4.02392,8.013823 -6.173,13.174658 -8.63718,20.741497 -1.0172,3.123571 -2.28265,6.759856 -2.8121,8.080631 -0.52946,1.320779 -1.41187,5.098694 -1.96092,8.395367 -0.54905,3.296679 -1.08767,6.086553 -1.19694,6.199728 -0.50779,0.525925 -0.49159,-0.473114 0.0594,-3.662687 0.32845,-1.901304 0.54757,-3.517802 0.48693,-3.592215 -0.24725,-0.303443 -2.81597,7.457146 -4.45821,13.469114 -1.91094,6.99565 -2.73701,13.12736 -2.97594,22.08988 -0.0849,3.18614 -0.31569,6.05391 -0.5128,6.37282 -0.1971,0.31892 -0.15371,0.45337 0.0964,0.29878 0.25013,-0.15459 0.7208,0.28263 1.04594,0.97159 0.5814,1.23198 0.57481,1.23786 -0.39973,0.35591 -0.95814,-0.8671 -0.97935,-0.86667 -0.64185,0.0128 0.30164,0.78608 0.15493,0.87247 -1.08051,0.6363 -1.32733,-0.25373 -1.36167,-0.22364 -0.48032,0.42082 0.52208,0.38175 1.26388,0.69409 1.64844,0.69409 0.44011,0 0.58606,0.29488 0.39386,0.79575 -0.2299,0.59913 -0.0904,0.72086 0.56447,0.49264 0.73391,-0.25576 0.72004,-0.18718 -0.0888,0.43886 -0.93796,0.72598 -0.9353,0.74197 0.12346,0.74197 0.59515,-1e-5 1.08208,-0.22224 1.08208,-0.49386 0,-0.27161 0.20266,-0.49384 0.45036,-0.49384 0.468,0 0.45562,0.15352 -0.43829,5.4323 -0.29897,1.76549 -0.67484,6.51595 -0.83528,10.55656 -0.24004,6.04556 -0.17352,7.30718 0.3756,7.12414 0.76993,-0.25664 1.31539,-1.91866 1.38608,-4.22342 0.31619,-4.10872 0.30144,-2.8636 0.72515,-6.19676 z m -2.15746,5.79723 c 0,-0.3914 0.22223,-0.71163 0.49384,-0.71163 0.27162,0 0.49385,0.45758 0.49385,1.01684 0,0.55926 -0.22223,0.87949 -0.49385,0.71162 -0.27161,-0.16786 -0.49384,-0.62544 -0.49384,-1.01683 z m 1.48153,-12.6222 c 0,-0.27161 0.22223,-0.3565 0.49385,-0.18863 0.27161,0.16787 0.49384,0.52744 0.49384,0.79905 0,0.27162 -0.22223,0.35651 -0.49384,0.18864 -0.27162,-0.16787 -0.49385,-0.52744 -0.49385,-0.79906 z m 2.97515,-7.55516 c 0.0655,-2.90231 2.37222,-8.8217 3.29913,-8.46601 0.35176,0.13498 0.64797,-0.0254 0.65825,-0.35639 0.0159,-0.51021 2.86153,-3.0319 4.74207,-4.20216 0.86784,-0.54006 7.07502,-10.83465 7.05991,-11.70885 -0.005,-0.27161 -0.66619,0.27557 -1.47,1.21596 -0.8038,0.94039 -1.46146,1.52432 -1.46146,1.29761 0,-0.66881 -1.55634,0.82103 -1.99932,1.91389 -0.37899,0.93499 -0.40948,0.92103 -0.4386,-0.2007 -0.0294,-1.13209 -0.0718,-1.15021 -0.69538,-0.29736 -0.63209,0.86443 -0.67826,0.85394 -0.95852,-0.21777 -0.22051,-0.84324 -0.54975,-1.05917 -1.3113,-0.86002 -0.55928,0.14625 -1.01687,0.0645 -1.01687,-0.18169 0,-0.24619 -0.44446,-0.44761 -0.98769,-0.44761 -0.66876,0 -0.98769,-0.32924 -0.98769,-1.01961 0,-1.19311 1.94093,-5.89423 2.43354,-5.89423 0.18508,0 1.21331,-0.81876 2.28494,-1.81947 1.25361,-1.17065 2.34467,-1.77442 3.05958,-1.69312 0.61113,0.0695 1.11115,-0.11177 1.11115,-0.40282 0,-0.29106 0.22616,-0.52919 0.50257,-0.52919 0.58269,0 3.94204,-3.35138 3.94204,-3.932686 0,-0.215039 0.376,-0.69598 0.83557,-1.068759 0.63659,-0.516375 0.74309,-0.524044 0.44723,-0.0322 -0.21359,0.355065 -0.5902,2.910713 -0.83692,5.679215 -0.51369,5.76424 -1.93718,13.06052 -3.07938,15.78375 -0.42928,1.02348 -0.78718,1.96947 -0.79534,2.10219 -0.0169,0.27508 -2.03102,4.08009 -3.52249,6.6546 -0.55073,0.95065 -1.87875,2.56984 -2.95114,3.59821 -1.0724,1.02837 -1.95698,2.02841 -1.96574,2.2223 -0.0248,0.5483 -4.37393,3.39793 -5.18599,3.39793 -0.39832,0 -0.71879,-0.24075 -0.71215,-0.53501 z m 8.86283,-11.13338 c 0.39956,-0.25268 0.5979,-0.588 0.44076,-0.74513 -0.15714,-0.15715 -0.56681,0.053 -0.91039,0.46699 -0.71242,0.85841 -0.57582,0.93931 0.46963,0.27814 z m 1.98969,-2.02381 c 0,-0.28765 -0.22223,-0.38565 -0.49385,-0.21778 -0.27161,0.16787 -0.49384,0.40322 -0.49384,0.52299 0,0.11978 0.22223,0.21778 0.49384,0.21778 0.27162,0 0.49385,-0.23535 0.49385,-0.52299 z m -13.65097,10.02951 c -0.64092,-0.82308 -0.65864,-0.82308 -0.37199,0 0.54089,1.55317 -0.33183,0.90646 -0.99966,-0.74077 -0.80711,-1.99078 -1.0251,-8.0624 -0.30544,-8.50718 0.3087,-0.19078 0.64884,0.29866 0.82715,1.19023 0.16658,0.83285 0.60843,1.51427 0.9819,1.51427 0.37347,0 0.68244,0.50002 0.68659,1.11115 0.006,0.89852 0.0992,0.9694 0.48629,0.37039 0.34624,-0.53577 0.48081,-0.0916 0.48628,1.60499 0.004,1.29017 -0.19386,2.34577 -0.44005,2.34577 -0.24619,0 -0.33138,0.44446 -0.18932,0.98769 0.31858,1.21827 -0.26126,1.27989 -1.16175,0.12346 z m 2.44902,-2.19144 c 0.15765,-0.39395 0.27467,-0.27694 0.29836,0.29837 0.0214,0.52059 -0.0953,0.81227 -0.25937,0.64817 -0.1641,-0.16411 -0.18164,-0.59005 -0.039,-0.94654 z m 0.49385,-2.46923 c 0.15764,-0.39395 0.27466,-0.27693 0.29836,0.29837 0.0214,0.52059 -0.0953,0.81227 -0.25938,0.64817 -0.1641,-0.1641 -0.18164,-0.59004 -0.039,-0.94654 z m 0.50413,-2.99393 c 0.137,-0.33952 0.24909,-0.0617 0.24909,0.6173 0,0.67904 -0.11209,0.95683 -0.24909,0.61731 -0.137,-0.33952 -0.137,-0.89509 0,-1.23461 z m 0.48356,-1.94452 c 0.15764,-0.39395 0.27467,-0.27694 0.29836,0.29837 0.0214,0.52059 -0.0953,0.81227 -0.25938,0.64817 -0.1641,-0.1641 -0.18164,-0.59004 -0.039,-0.94654 z m 0.48896,-2.73761 c 0.12521,-0.4805 0.23589,-0.20694 0.24596,0.60791 0.0101,0.81484 -0.0924,1.20797 -0.22766,0.87362 -0.13527,-0.33435 -0.14351,-1.00104 -0.0183,-1.48153 z m 0.49873,-2.20084 c 0.15764,-0.39395 0.27467,-0.27694 0.29836,0.29837 0.0214,0.52059 -0.0953,0.81227 -0.25938,0.64817 -0.1641,-0.16411 -0.18164,-0.59005 -0.039,-0.94654 z m 0.49384,-1.97538 c 0.15765,-0.39395 0.27467,-0.27694 0.29837,0.29837 0.0214,0.52059 -0.0953,0.81227 -0.25938,0.64817 -0.1641,-0.16411 -0.18164,-0.59005 -0.039,-0.94654 z m 0.50414,-2.50009 c 0.13699,-0.33952 0.24909,-0.0617 0.24909,0.61731 0,0.67903 -0.1121,0.95682 -0.24909,0.6173 -0.137,-0.33952 -0.137,-0.89509 0,-1.23461 z m -3.24834,-0.0502 c -0.29038,0.17946 -0.39718,0.11468 -0.23733,-0.14397 0.15986,-0.25865 0.0865,-0.793 -0.16305,-1.18746 -0.36595,-0.57846 -0.45517,-0.58609 -0.46127,-0.0394 -0.006,0.51193 -0.17022,0.54277 -0.67235,0.12605 -1.00193,-0.83154 -0.63961,-8.47532 0.5765,-12.162262 l 0.97736,-2.963071 0.12711,2.963071 c 0.0699,1.629692 0.12297,3.203822 0.1179,3.498072 -0.005,0.29425 0.29327,0.535 0.66297,0.535 0.42004,0 0.67501,-0.57118 0.67974,-1.52269 0.005,-1.08504 0.1342,-1.32265 0.44815,-0.82671 0.24233,0.38279 0.32627,0.99393 0.18653,1.35808 -0.13974,0.36414 0.0157,0.66208 0.34545,0.66208 0.33001,0 0.47173,0.33301 0.31526,0.74077 -0.17876,0.46583 0.005,0.74077 0.49597,0.74077 0.62903,0 0.71845,0.35886 0.46145,1.85191 -0.66644,3.87174 -0.8715,4.56807 -1.3452,4.56807 -0.27273,0 -0.34099,0.46284 -0.15477,1.04953 0.21282,0.67055 0.14799,0.93514 -0.17953,0.73272 -0.28194,-0.17426 -0.67978,-0.0464 -0.88409,0.28421 -0.28891,0.46748 -0.41561,0.46859 -0.57014,0.005 -0.10928,-0.32784 -0.43627,-0.44923 -0.72666,-0.26976 z m 4.60424,-5.95822 c 0.31871,-1.26571 0.69273,-2.18803 0.83115,-2.04961 0.13843,0.13842 -0.0319,1.26446 -0.37845,2.5023 -0.82047,2.93043 -1.2072,2.54371 -0.4527,-0.45269 z m 3.45692,-11.852281 c 0.31871,-1.265711 0.67207,-2.208693 0.78524,-2.095524 0.11317,0.113175 -0.055,1.241354 -0.3737,2.507065 -0.31871,1.26571 -0.67207,2.208692 -0.78524,2.095523 -0.11317,-0.113175 0.055,-1.241354 0.3737,-2.507064 z m 1.76856,-0.972747 c 0.0447,-0.174505 0.23323,-1.216805 0.41898,-2.316228 0.34795,-2.059522 1.85099,-3.223786 3.39629,-2.630797 0.3823,0.146702 0.84023,0.0319 1.01762,-0.25512 0.20378,-0.329726 -0.005,-0.404474 -0.56735,-0.203025 -0.6595,0.23629 -0.57026,0.0025 0.34473,-0.903006 0.67904,-0.672004 1.40129,-1.138253 1.605,-1.036107 0.20371,0.102147 0.37038,-0.186599 0.37038,-0.641658 0,-0.614294 -0.5091,-0.367435 -1.9768,0.958549 -2.24748,2.030469 -3.34982,2.343592 -2.22912,0.633198 0.64425,-0.983255 4.87283,-3.774275 8.37624,-5.528636 0.55828,-0.279565 1.28511,-1.071481 1.61517,-1.759817 0.66598,-1.388895 2.60988,-3.332763 2.60988,-2.609838 0,0.253273 -0.29651,0.898852 -0.65893,1.43461 -0.3624,0.535763 -0.95258,2.085266 -1.31151,3.44334 -0.90917,3.440071 -2.02432,6.204162 -2.40749,5.967354 -0.17737,-0.109619 -0.75653,0.693052 -1.28704,1.783714 -0.53051,1.090667 -1.4514,2.168124 -2.04643,2.394354 -0.59502,0.226231 -1.24235,0.670988 -1.43849,0.988357 -0.26341,0.426198 -0.4676,0.401891 -0.78118,-0.093 -0.34219,-0.540039 -0.42602,-0.520858 -0.43212,0.09887 -0.0113,1.151469 -2.48449,1.949444 -3.7114,1.1975 -0.54323,-0.332935 -0.95112,-0.748106 -0.90643,-0.922611 z m -5.24808,-1.549098 c -0.44512,0.275101 -0.30518,-4.869255 0.20792,-7.643133 0.45394,-2.45409 1.80664,-6.526875 2.07774,-6.255779 0.1255,0.125511 0.24779,0.917712 0.27176,1.760454 0.024,0.842737 0.19213,1.532254 0.37372,1.532254 0.18158,0 0.19748,1.055594 0.0353,2.345764 -0.35047,2.788438 -0.13931,4.205052 0.56219,3.771501 0.32789,-0.202645 0.3837,0.08116 0.15664,0.796567 -0.2643,0.832727 -0.19461,1.013652 0.27794,0.721597 0.45434,-0.280796 0.53817,-0.148717 0.29983,0.472392 -0.18197,0.474195 -0.33085,1.190458 -0.33085,1.591693 0,0.407659 -0.24123,0.580436 -0.54675,0.391614 -0.36312,-0.224423 -0.44111,-0.005 -0.23221,0.65314 0.3232,1.018299 -0.81984,1.892889 -1.73483,1.327396 -0.2471,-0.152721 -0.48257,0.01323 -0.52327,0.368779 -0.0407,0.355549 -0.16694,0.03156 -0.28054,-0.719991 -0.11359,-0.751549 -0.39017,-1.25296 -0.61461,-1.114248 z m 4.9648,-2.659786 c 0.33395,-1.114653 0.69811,-1.93573 0.80922,-1.824615 0.11112,0.111115 -0.0712,1.114016 -0.40517,2.228669 -0.33396,1.114653 -0.69811,1.93573 -0.80922,1.824615 -0.11112,-0.111116 0.0712,-1.114016 0.40517,-2.228669 z m 3.37011,-10.467409 c 0.26023,-0.650567 0.48723,-0.923234 0.50445,-0.605933 0.0418,0.770704 -0.53347,2.232926 -0.78108,1.985307 -0.10809,-0.108088 0.0164,-0.728807 0.27663,-1.379374 z m 5.96805,-3.528351 c 0,0.222966 -0.44996,0.405398 -0.99992,0.405398 -0.65317,0 -0.90811,-0.239249 -0.73517,-0.689932 0.17436,-0.454367 0.0185,-0.595434 -0.45646,-0.41317 -0.48391,0.18569 -0.63086,0.04129 -0.44661,-0.438861 0.15103,-0.393589 0.48703,-0.715616 0.74666,-0.715616 0.25963,0 0.41109,-0.388903 0.33657,-0.864229 -0.0745,-0.475326 0.56778,-1.624583 1.42732,-2.553901 0.85952,-0.929317 1.42776,-1.908133 1.26273,-2.175146 -0.16502,-0.267007 -0.0771,-0.347706 0.19532,-0.179325 0.27245,0.168382 0.97348,-0.139284 1.55784,-0.683704 0.58436,-0.544414 1.06248,-0.835635 1.06248,-0.647149 0,0.188486 0.42497,-0.04188 0.94438,-0.511945 0.5194,-0.470056 1.30688,-0.907855 1.74995,-0.972885 0.44306,-0.06502 1.27035,-0.516186 1.83842,-1.002579 1.0093,-0.864195 1.02646,-0.857839 0.75299,0.279037 -0.15392,0.63986 -0.43821,2.052302 -0.63177,3.138761 -0.19355,1.08646 -0.86006,2.585314 -1.48113,3.330788 -0.62106,0.74548 -1.27168,1.804298 -1.44581,2.352936 -0.17413,0.548642 -0.50747,0.879563 -0.74076,0.735384 -0.23329,-0.144183 -1.02102,0.290999 -1.7505,0.967068 -1.04502,0.968489 -1.52363,1.123631 -2.25644,0.731444 -0.51155,-0.273773 -0.93009,-0.31534 -0.93009,-0.09237 z m -8.88921,-1.070261 c 0,-0.656399 -0.2558,-1.278723 -0.56844,-1.382935 -0.60611,-0.202037 1.79269,-8.782043 2.45529,-8.782043 0.19016,0 0.73382,2.109701 1.20814,4.68822 0.82194,4.468375 0.8217,4.732765 -0.005,5.638067 -0.47715,0.522415 -1.36755,0.968362 -1.97869,0.991 -0.85713,0.03175 -1.11115,-0.231683 -1.11115,-1.152309 z m 4.19402,-13.529106 c 0.36545,-1.948056 3.35379,-5.322465 4.96205,-5.603128 1.20884,-0.21095 1.1981,-0.02356 -0.2631,4.593363 -0.87522,2.76539 -1.53055,3.978678 -2.4511,4.538037 -1.19698,0.727315 -1.28785,0.703813 -1.91843,-0.496171 -0.42245,-0.803916 -0.54163,-1.900924 -0.32942,-3.032101 z m 10.38367,-0.594323 c -0.41252,0.342358 -0.75003,0.4397 -0.75003,0.216309 0,-0.223385 -0.26668,-0.139481 -0.59261,0.186457 -0.72506,0.725058 -2.8643,0.786976 -2.8643,0.08291 0,-2.181077 4.34347,-7.725797 5.65714,-7.2217 0.40217,0.154327 0.87192,0.05292 1.0439,-0.225351 0.17198,-0.278267 0.62356,-0.386652 1.00351,-0.240854 0.37995,0.145798 0.69081,0.08066 0.69081,-0.14477 0,-0.225426 0.56847,-0.301197 1.26326,-0.168377 0.78176,0.149443 1.16865,0.488028 1.01504,0.888319 -0.13652,0.355756 -0.49335,1.557212 -0.79297,2.6699 -0.29961,1.112692 -1.144,2.667534 -1.8764,3.455212 -1.22414,1.316517 -1.4009,1.369462 -2.18949,0.655807 -0.69803,-0.631717 -0.99754,-0.660375 -1.60786,-0.153858 z m -4.12233,-13.928054 c 0.39174,-0.619612 0.99936,-2.114511 1.35027,-3.321997 0.35091,-1.207491 1.48113,-4.020329 2.51159,-6.250756 1.80516,-3.907269 3.18929,-5.437502 4.27811,-4.729714 1.03932,0.675615 1.74534,2.712741 1.46378,4.223562 -0.25804,1.384638 -0.21772,1.453144 0.38919,0.661258 0.6263,-0.817195 0.71951,-0.761672 1.24353,0.740768 0.40583,1.163534 0.68206,1.437351 0.97397,0.965458 0.59973,-0.969512 1.03876,0.45327 1.03876,3.366335 0,2.355725 -0.0226,2.389203 -2.22045,3.293063 -1.22125,0.502231 -2.22128,1.072849 -2.2223,1.268031 -0.003,0.55447 -1.66153,-0.160618 -2.34762,-1.012125 -0.92753,-1.151178 -0.75165,-3.174462 0.61633,-7.089918 0.6785,-1.942012 1.14325,-3.621312 1.03278,-3.731781 -0.11047,-0.110468 -0.35912,0.315913 -0.55257,0.947516 -0.97798,3.193174 -3.93757,8.399981 -5.19771,9.144368 -0.75373,0.445241 -1.61991,1.357092 -1.92484,2.026341 -0.30493,0.669244 -0.68731,1.083911 -0.84974,0.92148 -0.16243,-0.16243 0.0252,-0.802281 0.41692,-1.421889 z m 11.9935,-5.783968 c 0.15627,-0.252849 0.0953,-0.576416 -0.13547,-0.719044 -0.23078,-0.142627 -0.41959,0.06424 -0.41959,0.459721 0,0.832706 0.15573,0.90546 0.55506,0.259323 z m -21.59403,99.380364 c -0.4805,-0.12521 -1.14719,-0.11698 -1.48154,0.0183 -0.33435,0.13528 0.0588,0.23772 0.87363,0.22766 0.81484,-0.0101 1.0884,-0.12075 0.60791,-0.24595 z m -0.49385,-0.98769 c -0.48049,-0.12521 -1.14718,-0.11698 -1.48153,0.0183 -0.33435,0.13528 0.0588,0.23772 0.87362,0.22766 0.81485,-0.0101 1.08841,-0.12075 0.60791,-0.24596 z"
+ id="path7467"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="csccsscssssssscscssssssssssssssssssssscsssscsssssssssscsssssccsssssssssssssscssscsssssssssssssssscsscssscsssssssssscsscscsssccccccccccssssccccccccccccccccccccsssscsscsscscssssssssssscsccscccscscsssssscsssssssssssssscsccsccsscssssssscscssssssscsssssscscsssssscssssccssccssssscssssssssssssssssssssssssssssssscssssssssssscccccccccc" />
+ </g>
+</svg>
157 feedback.py
@@ -0,0 +1,157 @@
+#! -*- coding: utf-8 -*-
+"""
+ Flask Feedback
+ ~~~~~~~~~~~~~~
+
+ We want to know what where we should improve. This website should
+ help us achieve that goal.
+
+ Inspired by what the Mozilla guys did for Firefox.
+
+ :copyright: (c) Copyright 2011 by Armin Ronacher.
+ :license: BSD, see LICENSE for more details.
+"""
+
+from datetime import datetime
+from random import SystemRandom
+from flask import Flask, render_template, session, flash, request, \
+ url_for, redirect, Response, jsonify
+from flaskext.sqlalchemy import SQLAlchemy, Pagination
+
+
+app = Flask(__name__)
+app.config['FEEDBACK_PER_PAGE'] = 30
+app.config.from_pyfile('settings.cfg')
+db = SQLAlchemy(app)
+rnd = SystemRandom()
+
+
+class Feedback(db.Model):
+ id = db.Column('feedback_id', db.Integer, primary_key=True)
+ kind = db.Column(db.Integer)
+ text = db.Column(db.String(1000))
+ version = db.Column(db.String(40))
+ pub_date = db.Column(db.DateTime)
+
+ UNHAPPY = -1
+ HAPPY = 1
+ KINDS = {'unhappy': UNHAPPY, 'happy': HAPPY}
+
+ def __init__(self, kind, text, version):
+ assert kind in (self.UNHAPPY, self.HAPPY)
+ self.kind = kind
+ self.text = text
+ self.version = version
+ self.pub_date = datetime.utcnow()
+
+ @property
+ def kind_symbol(self):
+ if self.kind == self.HAPPY:
+ return '+'
+ elif self.kind == self.UNHAPPY:
+ return '-'
+ return '?'
+
+ def to_json(self):
+ return {
+ 'kind': self.kind_symbol,
+ 'text': self.text,
+ 'version': self.version,
+ 'pub_date': self.pub_date.strftime('%Y-%m-%dT%H:%M:%SZ')
+ }
+
+
+def show_feedback(kind, page):
+ """Renders returned feedback."""
+ pagination = Feedback.query \
+ .filter_by(kind=Feedback.KINDS[kind]) \
+ .order_by(Feedback.pub_date.desc()) \
+ .paginate(page, app.config['FEEDBACK_PER_PAGE'])
+ return render_template('show_feedback.html', kind=kind,
+ pagination=pagination)
+
+
+def get_challenge():
+ """Return a random challenge"""
+ return rnd.randrange(1 << 32)
+
+
+def challenge_response_accepted(challenge, response):
+ """Simple check if a valid response for the challenge was provided."""
+ try:
+ response = int(response)
+ except ValueError:
+ return False
+ expected = int((challenge / 2.0) + (challenge / 3.0) - (challenge / 4.0))
+ return expected == response
+
+
+@app.route('/', methods=['GET', 'POST'])
+def give_feedback():
+ if request.method == 'POST':
+ challenge = session.pop('challenge', None)
+ kind = Feedback.KINDS.get(request.form['kind'])
+ text = request.form['feedback']
+ version = request.form['version']
+ if challenge and challenge_response_accepted(
+ challenge, request.form['response']) and \
+ kind is not None and len(text) <= 140 and len(version) <= 20:
+ feedback = Feedback(kind, text, version)
+ db.session.add(feedback)
+ db.session.commit()
+ return redirect(url_for('show_message', id=feedback.id))
+ return redirect(url_for('give_feedback'))
+ session['challenge'] = challenge = get_challenge()
+ return render_template('give_feedback.html', challenge=challenge)
+
+
+@app.route('/message/<int:id>')
+def show_message(id):
+ feedback = Feedback.query.get_or_404(id)
+ return render_template('show_message.html', feedback=feedback)
+
+
+@app.route('/happy', defaults={'page': 1})
+@app.route('/happy/page/<int:page>')
+def happy(page):
+ return show_feedback('happy', page)
+
+
+@app.route('/unhappy', defaults={'page': 1})
+@app.route('/unhappy/page/<int:page>')
+def unhappy(page):
+ return show_feedback('unhappy', page)
+
+
+@app.route('/faq')
+def faq():
+ return render_template('faq.html')
+
+
+@app.route('/feedback.txt', defaults={'version': 'all'})
+@app.route('/feedback-<version>.txt')
+def export_text(version):
+ q = Feedback.query
+ if version != 'all':
+ q = q.filter_by(version=version)
+ messages = q.order_by(Feedback.pub_date).all()
+ return Response(u'\n'.join('[%s] %s: %s (Flask-%s)' % (
+ fb.kind_symbol,
+ fb.pub_date.strftime('%Y-%m-%dT%H:%M:%SZ'),
+ fb.text,
+ fb.version or 'unknown'
+ ) for fb in messages), mimetype='text/plain')
+
+
+@app.route('/feedback.json', defaults={'version': 'all'})
+@app.route('/feedback-<version>.json')
+def export_json(version):
+ q = Feedback.query
+ if version != 'all':
+ q = q.filter_by(version=version)
+ messages = q.order_by(Feedback.pub_date).all()
+ return jsonify(messages=[fb.to_json() for fb in messages])
+
+
+if __name__ == '__main__':
+ app.run()
26 manage.py
@@ -0,0 +1,26 @@
+#!/usr/bin/env python
+from flaskext.script import Manager
+from feedback import app, db
+
+
+manager = Manager(app)
+
+
+@manager.command
+def initdb():
+ """Creates all database tables"""
+ print 'Database: %s' % db.engine.url
+ db.create_all()
+ print 'All tables created'
+
+
+@manager.command
+def dropdb():
+ """Drops all database tables"""
+ print 'Database: %s' % db.engine.url
+ db.drop_all()
+ print 'All tables dropped'
+
+
+if __name__ == '__main__':
+ manager.run()
BIN  static/logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
81 static/script.js
@@ -0,0 +1,81 @@
+function makeFeedbackBox(feedback) {
+ var charsLeft, feedbackInput, errorLog = null;
+
+ function showFormError(error) {
+ if (errorLog === null)
+ errorLog = $('<p class=error></p>').insertAfter('.feedback p.version');
+ errorLog.hide().slideDown();
+ errorLog.text(error);
+ }
+
+ function updateCharsLeft() {
+ var delta = 140 - feedbackInput.val().length;
+ charsLeft.text('' + delta);
+ charsLeft.toggleClass('chars-over-limit', delta < 0);
+ if (!charsLeft.is(':visible'))
+ charsLeft.fadeIn('slow');
+ }
+
+ function calculateResponse() {
+ var challenge = +$('input[name="challenge"]', feedback).val();
+ return parseInt((challenge / 2) + (challenge / 3) - (challenge / 4));
+ }
+
+ function justWantedToSayThatIm(kind) {
+ return function() {
+ updateCharsLeft();
+ var step2 = $('#step-2', feedback);
+ $('input[name="kind"]').val(kind);
+ $('.kind-selector', feedback).removeClass('active-kind');
+ $(this).parent().addClass('active-kind');
+ if (!step2.is(':visible')) {
+ $('textarea', step2).val('');
+ step2.slideDown('fast', function() {
+ $('textarea', step2).focus();
+ });
+ }
+ return false;
+ };
+ }
+
+ feedback.bind('submit', function() {
+ if (this.feedback.value.length > 140) {
+ showFormError('Your message is too long :-(');
+ return false;
+ }
+ if (this.version.value.length > 0 &&
+ !this.version.value.match(/^((\d{1,5}\.\d{1,5})|(dev))$/)) {
+ showFormError('Malformed version. Use Major.Minor or dev');
+ return false;
+ }
+ });
+
+ $($('li', feedback).hide()[0]).show();
+ $('a.happy', feedback).click(justWantedToSayThatIm('happy'));
+ $('a.unhappy', feedback).click(justWantedToSayThatIm('unhappy'));
+ feedbackInput = $('p.text textarea', feedback)
+ .keyup(function() {
+ updateCharsLeft();
+ var nextStep = $('#step-3', feedback);
+ if (this.value.length >= 5)
+ nextStep.slideDown('fast');
+ else
+ nextStep.slideUp('fast');
+ });
+ charsLeft = $('<span class=chars-left></span>')
+ .insertBefore(feedbackInput)
+ .hide();
+ feedback.animate({height: 'show', opacity: 'show'});
+
+ /* get away stupid spam */
+ $('<input type=hidden name=response>')
+ .val(calculateResponse())
+ .insertAfter('input[name="challenge"]', feedback);
+}
+
+$(function() {
+ var feedback = $('.feedback');
+ if (feedback.length)
+ makeFeedbackBox(feedback);
+ $('.javascript-required').hide();
+});
70 static/style.css
@@ -0,0 +1,70 @@
+/* general style */
+body { font-family: 'Georgia', serif; font-size: 17px; color: #000; }
+a { color: #004B6B; }
+a:hover { color: #6D4100; }
+.box { width: 540px; margin: 40px auto; }
+h2, h3 { font-family: 'Garamond', 'Georgia', serif; font-weight: normal; }
+h1 { margin: 0; background: url(logo.png) no-repeat; height: 140px }
+h1 span { display: none; }
+h2 { font-size: 36px; margin: 15px 0 5px 0; }
+h3 { font-size: 30px; margin: 15px 0 5px 0; }
+p { line-height: 1.4; }
+.footer { font-size: 13px; color: #888; text-align: right; margin-top: 25px; }
+.hidden { display: none; }
+
+/* navigation */
+.nav { height: 42px; margin: -35px 0 0 0; padding: 0; font-size: 15px;
+ list-style: none; }
+.nav li:before { display: none; }
+.nav li { float: left; padding: 0; background: #D3E6EC;
+ margin: 0 8px 0 0; }
+.nav li a { padding: 4px 8px; display: block; text-decoration: none; }
+.nav li a:hover { color: white; background: #004B6B; }
+.nav .active a { border-bottom: 3px solid #004B6B; }
+.pagination { margin: 15px 0; text-align: center; }
+
+/* feedback box */
+.feedback { font-size: 17px; border: 1px solid #A2BEC7;
+ padding: 0 20px; background: #EDF5F8;
+ display: none; }
+.feedback .happy,
+.feedback .unhappy { padding: 2px 5px; border: 1px solid transparent; }
+.feedback .happy { background: #CBE2CA; color: #1D7324; }
+.feedback .active-kind .happy { border: 1px solid #1D7324; }
+.feedback .unhappy { background: #E3CACA; color: #741D1D; }
+.feedback .active-kind .unhappy { border: 1px solid #741D1D; }
+.feedback .kind-selector a { text-decoration: none; }
+.feedback input,
+.feedback textarea { font-family: 'Georgia', serif; font-size: 24px;
+ border: 1px solid #A2BEC7; padding: 2px 5px; }
+.feedback .text textarea { width: 487px; }
+.feedback p { margin: 0; padding: 10px 0 0 0; }
+.feedback ul { margin: 15px 0; padding: 0; list-style: none; }
+.feedback li { margin: 0; padding: 0; }
+.feedback p.version input { width: 50px; text-align: center; font-size: 17px;
+ margin-left: 7px; }
+.feedback .submit { float: right; background: #D3E6EC; border-style: outset;
+ cursor: pointer; }
+.feedback .submit:active { background: white; border-style: inset; }
+.feedback .chars-left { display: block; float: right; margin-top: -32px;
+ font-weight: bold; font-size: 15px; }
+.feedback .chars-over-limit { color: #A52020; }
+.feedback .error { font-size: 15px; color: #A52020; font-weight: bold; }
+
+/* feedback list */
+.feedback-list { list-style: none; margin: 30px 30px; padding: 0; }
+.feedback-list li { margin: 15px 0; padding: 0; }
+.feedback-list p { margin: 0; }
+.feedback-list p.text { font-style: italic; }
+.feedback-list p.meta { font-size: 15px; color: #666; margin-left: 20px; }
+
+/* single message */
+.message { margin: 30px 0; }
+.message h2 { font-style: italic; font-size: 46px; text-align: center; }
+.message .meta { color: #666; margin-top: 30px; text-align: right; }
+
+/* faq */
+dl.qa dt { margin: 15px 0 10px 0; font-style: italic; }
+dl.qa dt:before { content: "Q: "; font-weight: bold; }
+dl.qa dd:before { content: "A: "; font-weight: bold; float: left; line-height: 1.4;
+ padding-right: 5px; }
15 templates/_helpers.html
@@ -0,0 +1,15 @@
+{% macro render_pagination(pagination, endpoint) %}
+ <div class=pagination>
+ {%- for page in pagination.iter_pages() %}
+ {% if page %}
+ {% if page != pagination.page %}
+ <a href="{{ url_for(endpoint, page=page) }}">{{ page }}</a>
+ {% else %}
+ <strong>{{ page }}</strong>
+ {% endif %}
+ {% else %}
+ <span class=ellipsis>…</span>
+ {% endif %}
+ {%- endfor %}
+ </div>
+{% endmacro %}
43 templates/faq.html
@@ -0,0 +1,43 @@
+{% extends 'layout.html' %}
+{% block title %}Frequently Asked Questions{% endblock %}
+{% block body %}
+ <h2>Frequently Asked Questions</h2>
+ <dl class=qa>
+ <dt>What's the purpose of this website?
+ <dd>
+ <p>
+ The guys from Mozilla did an experiment during the deployment of the
+ Firefox 4 betas where they added a button into the toolbar with a
+ happy and a sad face. Upon clicking that button the user was taken
+ to a website that asked him in less than 140 characters about their
+ experience with Firefox.
+ <p>
+ While we cannot integrate that into Flask in the same way because we do
+ not have any kind of user interface that could accomodate such a button,
+ we however encourage users to send us little messages about their
+ experience with Flask.
+ <dt>Why is this not on the main Flask website?
+ <dd>
+ <p>
+ For the very simple reason that this is an experient on its own and
+ might be shut down without further notice. We haven't done anything
+ like that before and are not yet sure about the consequences.
+ <dt>Will you censor here?
+ <dd>
+ <p>
+ Unless hateful comments or spam end up on this website we will not
+ remove any of them. The raw data is available for everyone who is
+ interested.
+ <dt>Why does this website require JavaScript?
+ <dd>
+ <p>
+ For the very simple reason that we currently use JavaScript as a simple
+ method of preventing spam. At least that is the motivation, if the
+ efforts pay off we can't say yet.
+ <dt>Is the source of this website available?
+ <dd>
+ <p>
+ Indeed it is. You can download it from github:<br>
+ <a href=http://github.com/mitsuhiko/flask-feedback>mitsuhiko/flask-feedback</a>
+ </dl>
+{% endblock %}
31 templates/give_feedback.html
@@ -0,0 +1,31 @@
+{% extends 'layout.html' %}
+{% block title %}Give Feedback{% endblock %}
+{% block body %}
+ <h2>We Love Feedback</h2>
+ <p>
+ Are you happy with <a href=http://flask.pocoo.org/>Flask</a>? Or is
+ something not right? We would love to hear your opinion about your
+ experience with Flask in 140 characters or less so that we can
+ become better.
+ <form action="" method=post class=feedback>
+ <ul>
+ <li id=step-1>
+ Flask makes me <span class=kind-selector><a href=# class=happy>happy</a></span> /
+ <span class=kind-selector><a href=# class=unhappy>unhappy</a></span> because …
+ <li id=step-2>
+ <p class=text><textarea name=feedback cols=50 rows=2></textarea>
+ <li id=step-3>
+ <p class=version>
+ <input class=submit type=submit value="Share this">
+ BTW. I am using Flask Version <input type=text name=version>
+ </ul>
+ <div class=hidden>
+ <input type=hidden name=kind>
+ <input type=hidden name=challenge value="{{ challenge }}">
+ </div>
+ </form>
+ <p class=javascript-required>
+ <strong>We're sorry</strong>, but this system requires JavaScript to be
+ available in order to give feedback. Please whitelist this website in
+ order to use it.
+{% endblock %}
38 templates/layout.html
@@ -0,0 +1,38 @@
+<!doctype html>
+<title>{% block title %}{% endblock %} | Flask Feedback</title>
+<link href={{ url_for('static', filename='style.css') }} rel=stylesheet type=text/css>
+<script type=text/javascript src=https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js></script>
+<script type=text/javascript src={{ url_for('static', filename='script.js') }}></script>
+<div class=box>
+ <div class=header>
+ <h1><span>Flask Feedback</span></h1>
+ <ul class=nav>
+ {%- for endpoint, title in [
+ ('give_feedback', 'Give Feedback'),
+ ('happy', 'What people like'),
+ ('unhappy', 'Where we have to improve')
+ ] %}
+ <li{% if endpoint == request.endpoint %} class=active{% endif
+ %}><a href={{ url_for(endpoint) }}>{{ title }}</a>
+ {%- endfor %}
+ </ul>
+ </div>
+ {%- with messages = get_flashed_messages() %}
+ {%- if messages %}
+ <ul class=messages>
+ {%- for message in messages %}
+ <li>{{ message }}
+ {%- endfor %}
+ </ul>
+ {%- endif %}
+ {%- endwith %}
+ <div class=body>{% block body %}{% endblock %}</div>
+ <div class=footer>
+ <p>
+ &copy; Copyright 2011 by <a href=http://lucumr.pocoo.org/>Armin Ronacher</a>
+ and the Flask Team.<br>
+ Get the raw data as <a href={{ url_for('export_text') }}>text</a> or
+ <a href={{ url_for('export_json') }}>json</a> for playing around.
+ <a href={{ url_for('faq') }}>faq</a>
+ </div>
+</div>
20 templates/show_feedback.html
@@ -0,0 +1,20 @@
+{% extends 'layout.html' %}
+{% from '_helpers.html' import render_pagination %}
+{% block title %}
+ {%- if kind == 'happy' %}Happy Users Say
+ {%- else %}Unhappy Users Say{% endif -%}
+{% endblock %}
+{% block body %}
+ <h2>{{ self.title() }}</h2>
+ <ul class=feedback-list>
+ {%- for feedback in pagination.items %}
+ <li>
+ <p class=text><q>{{ feedback.text }}</q>
+ <p class=meta>—
+ written on {{ feedback.pub_date.strftime('%Y-%m-%d at %H:%M') }}
+ {% if feedback.version %}about Flask-{{ feedback.version }}{% endif %}
+ <a href={{ url_for('show_message', id=feedback.id) }}>#</a>
+ {%- endfor %}
+ </ul>
+ {{ render_pagination(pagination, request.endpoint) }}
+{% endblock %}
10 templates/show_message.html
@@ -0,0 +1,10 @@
+{% extends 'layout.html' %}
+{% block title %}Single Message{% endblock %}
+{% block body %}
+ <div class=message>
+ <h2>“{{ feedback.text }}”</h2>
+ <p class=meta>
+ written on {{ feedback.pub_date.strftime('%Y-%m-%d at %H:%M') }}
+ {% if feedback.version %}about Flask-{{ feedback.version }}{% endif %}
+ </div>
+{% endblock %}
Please sign in to comment.
Something went wrong with that request. Please try again.