diff --git a/web/gesture/.env b/web/gesture/.env new file mode 100644 index 0000000..a516326 --- /dev/null +++ b/web/gesture/.env @@ -0,0 +1,2 @@ +GESTURE_APPLICATION_ROOT=/breadcube/gesture +GESTURE_PORTNUMBER=5002 diff --git a/web/gesture/Makefile b/web/gesture/Makefile new file mode 100644 index 0000000..eb2ac03 --- /dev/null +++ b/web/gesture/Makefile @@ -0,0 +1,10 @@ +include .env +export + +default: local + +local: + @flask run --debug + +breadcube: + @SCRIPT_NAME=${GESTURE_APPLICATION_ROOT} gunicorn -b localhost:${GESTURE_PORTNUMBER} --reload app:app diff --git a/web/gesture/__pycache__/app.cpython-310.pyc b/web/gesture/__pycache__/app.cpython-310.pyc new file mode 100644 index 0000000..d914c6a Binary files /dev/null and b/web/gesture/__pycache__/app.cpython-310.pyc differ diff --git a/web/gesture/app.py b/web/gesture/app.py new file mode 100644 index 0000000..862e28e --- /dev/null +++ b/web/gesture/app.py @@ -0,0 +1,74 @@ +from flask import Flask, request, redirect, render_template +import os + +app = Flask(__name__) +app.config.from_pyfile('settings.py') + +UPLOAD_FOLDER = os.path.join("static", "media") +media = { + "beer.gif": ["beer"], + "bell.gif": ["beer", "cafe de bel", "bell"], + "birds.gif": ["birds", "lasercut", "book making"], + "book-end.gif": ["book", "finished book"], + "book-reading.gif": ["book", "reading", "unfinished book"], + "box.gif": ["box"], + "bridge.gif": ["bridge", "book making"], + "cafe-de-bel.gif": ["coffee", "bell", "beer", "cafe de bel"], + "cards.gif": ["cards"], + "cloud-storm.gif": ["cloud", "storm"], + "cloud.gif": ["cloud"], + "coffee.gif": ["coffee", "cafe de bel"], + "coffee-reading.gif": ["coffee reading", "reading", "coffee"], + "collective.gif": ["collective", "studio", "xpub", "community", "bubble"], + "elevator.gif": ["elevator", "collective", "xpub"], + "er-beer.gif": ["emergency beer"], + "femcare.gif": ["care", "feminism", "woman", "collective", "community"], + "gilotine.gif": ["gilotine", "book making", "book"], + "glue-machine.gif": ["book making", "glue binding machine", "machine", "book binding", "book"], + "gyozleme.gif": ["gozleme", "food", "xpub"], + "hands.gif": ["joking", "okay", "sure"], + "hurry.gif": ["time", "hurry", "pebbles"], + "iloveu.gif": ["i love you", "i see you", "i feel you", "i miss you"], + "invisible.gif": ["invisible", "worker", "operator"], + "lasercut.gif": ["lasercutter", "book making", "book"], + "oper-strike.gif": ["operator", "worker", "woman", "strike"], + "operator.gif": ["operator", "worker", "woman"], + "paper.gif": ["paper", "book", "reading", "printer"], + "pdf-impose.gif": ["pdf impose", "makarena"], + "pebbles.gif": ["time", "clockwise"], + "printer.gif": ["printer", "book", "paper", "book making"], + "reverse-pebbles.gif": ["time", "anticlockwise"], + "sea.gif": ["sea", "printer"], + "stairs.gif": ["stairs", "studio"], + "strike.gif": ["strike", "worker", "woman", "operator"], + "studio.gif": ["studio", "xpub", "community", "collective"], + "teletype.gif": ["teletype", "printer", "book", "xpub", "operator", "collective", "worker", "paper", "cloud"], + "visible.gif": ["visible", "i see you", "worker", "strike", "operator", "woman"], + "whosfirst.gif": ["who is first", "collective", "xpub", "community"], + "whosnext.gif": ["who is next", "collective", "xpub", "community", "time"] + +} + +@app.route("/") +def home(): + text = [] + for x in media: + for y in media[x]: + print(y) + if y not in text: + text.append(y) + # print("added") + # print(text) + else: + print("already there") + return render_template("template-index.html", text=text) + +@app.route("/") +def word(word): + wordmedia = [] + for item in media: + if word in media[item]: + wordmedia.append(item) + print("wordmedia: ") + print(wordmedia) + return render_template("template-word.html", word=word, wordmedia=wordmedia, media=media, path=UPLOAD_FOLDER) diff --git a/web/gesture/settings.py b/web/gesture/settings.py new file mode 100644 index 0000000..695ea4e --- /dev/null +++ b/web/gesture/settings.py @@ -0,0 +1,10 @@ +import os +from dotenv import main + +# Load environment variables from the .env file +main.load_dotenv() + +# Bind them to Python variables +APPLICATION_ROOT = os.environ.get('GESTURE_APPLICATION_ROOT', '/') +PORTNUMBER = int(os.environ.get('GESTURE_PORTNUMBER', 5001)) + diff --git a/web/gesture/static/img1.png b/web/gesture/static/img1.png new file mode 100644 index 0000000..fee4b45 Binary files /dev/null and b/web/gesture/static/img1.png differ diff --git a/web/gesture/static/img2.png b/web/gesture/static/img2.png new file mode 100644 index 0000000..59929fd Binary files /dev/null and b/web/gesture/static/img2.png differ diff --git a/web/gesture/static/img3.png b/web/gesture/static/img3.png new file mode 100644 index 0000000..292a5fc Binary files /dev/null and b/web/gesture/static/img3.png differ diff --git a/web/gesture/static/media/beer.gif b/web/gesture/static/media/beer.gif new file mode 100644 index 0000000..ba47fea Binary files /dev/null and b/web/gesture/static/media/beer.gif differ diff --git a/web/gesture/static/media/bell.gif b/web/gesture/static/media/bell.gif new file mode 100644 index 0000000..84a9b02 Binary files /dev/null and b/web/gesture/static/media/bell.gif differ diff --git a/web/gesture/static/media/birds.gif b/web/gesture/static/media/birds.gif new file mode 100644 index 0000000..f8cc833 Binary files /dev/null and b/web/gesture/static/media/birds.gif differ diff --git a/web/gesture/static/media/book-end.gif b/web/gesture/static/media/book-end.gif new file mode 100644 index 0000000..91697f5 Binary files /dev/null and b/web/gesture/static/media/book-end.gif differ diff --git a/web/gesture/static/media/book-reading.gif b/web/gesture/static/media/book-reading.gif new file mode 100644 index 0000000..f772979 Binary files /dev/null and b/web/gesture/static/media/book-reading.gif differ diff --git a/web/gesture/static/media/box.gif b/web/gesture/static/media/box.gif new file mode 100644 index 0000000..491173b Binary files /dev/null and b/web/gesture/static/media/box.gif differ diff --git a/web/gesture/static/media/bridge.gif b/web/gesture/static/media/bridge.gif new file mode 100644 index 0000000..9639eb4 Binary files /dev/null and b/web/gesture/static/media/bridge.gif differ diff --git a/web/gesture/static/media/cafe-de-bel.gif b/web/gesture/static/media/cafe-de-bel.gif new file mode 100644 index 0000000..6273103 Binary files /dev/null and b/web/gesture/static/media/cafe-de-bel.gif differ diff --git a/web/gesture/static/media/cards.gif b/web/gesture/static/media/cards.gif new file mode 100644 index 0000000..283c511 Binary files /dev/null and b/web/gesture/static/media/cards.gif differ diff --git a/web/gesture/static/media/cloud-storm.gif b/web/gesture/static/media/cloud-storm.gif new file mode 100644 index 0000000..2da1f53 Binary files /dev/null and b/web/gesture/static/media/cloud-storm.gif differ diff --git a/web/gesture/static/media/cloud.gif b/web/gesture/static/media/cloud.gif new file mode 100644 index 0000000..44060fe Binary files /dev/null and b/web/gesture/static/media/cloud.gif differ diff --git a/web/gesture/static/media/coffee-reading.gif b/web/gesture/static/media/coffee-reading.gif new file mode 100644 index 0000000..d2a3239 Binary files /dev/null and b/web/gesture/static/media/coffee-reading.gif differ diff --git a/web/gesture/static/media/coffee.gif b/web/gesture/static/media/coffee.gif new file mode 100644 index 0000000..f0845b6 Binary files /dev/null and b/web/gesture/static/media/coffee.gif differ diff --git a/web/gesture/static/media/collective.gif b/web/gesture/static/media/collective.gif new file mode 100644 index 0000000..5f4043b Binary files /dev/null and b/web/gesture/static/media/collective.gif differ diff --git a/web/gesture/static/media/elevator.gif b/web/gesture/static/media/elevator.gif new file mode 100644 index 0000000..e01d7cd Binary files /dev/null and b/web/gesture/static/media/elevator.gif differ diff --git a/web/gesture/static/media/er-beer.gif b/web/gesture/static/media/er-beer.gif new file mode 100644 index 0000000..3c7d712 Binary files /dev/null and b/web/gesture/static/media/er-beer.gif differ diff --git a/web/gesture/static/media/femcare.gif b/web/gesture/static/media/femcare.gif new file mode 100644 index 0000000..b5f7dbf Binary files /dev/null and b/web/gesture/static/media/femcare.gif differ diff --git a/web/gesture/static/media/gilotine.gif b/web/gesture/static/media/gilotine.gif new file mode 100644 index 0000000..e6d111c Binary files /dev/null and b/web/gesture/static/media/gilotine.gif differ diff --git a/web/gesture/static/media/glue-machine.gif b/web/gesture/static/media/glue-machine.gif new file mode 100644 index 0000000..a432e77 Binary files /dev/null and b/web/gesture/static/media/glue-machine.gif differ diff --git a/web/gesture/static/media/gyozleme.gif b/web/gesture/static/media/gyozleme.gif new file mode 100644 index 0000000..9578535 Binary files /dev/null and b/web/gesture/static/media/gyozleme.gif differ diff --git a/web/gesture/static/media/hands.gif b/web/gesture/static/media/hands.gif new file mode 100644 index 0000000..33c2118 Binary files /dev/null and b/web/gesture/static/media/hands.gif differ diff --git a/web/gesture/static/media/hurry.gif b/web/gesture/static/media/hurry.gif new file mode 100644 index 0000000..03a815c Binary files /dev/null and b/web/gesture/static/media/hurry.gif differ diff --git a/web/gesture/static/media/iloveu.gif b/web/gesture/static/media/iloveu.gif new file mode 100644 index 0000000..41a6401 Binary files /dev/null and b/web/gesture/static/media/iloveu.gif differ diff --git a/web/gesture/static/media/invisible.gif b/web/gesture/static/media/invisible.gif new file mode 100644 index 0000000..ee11b62 Binary files /dev/null and b/web/gesture/static/media/invisible.gif differ diff --git a/web/gesture/static/media/lasercut.gif b/web/gesture/static/media/lasercut.gif new file mode 100644 index 0000000..1dc7af9 Binary files /dev/null and b/web/gesture/static/media/lasercut.gif differ diff --git a/web/gesture/static/media/oper-strike.gif b/web/gesture/static/media/oper-strike.gif new file mode 100644 index 0000000..22f8199 Binary files /dev/null and b/web/gesture/static/media/oper-strike.gif differ diff --git a/web/gesture/static/media/operator.gif b/web/gesture/static/media/operator.gif new file mode 100644 index 0000000..919b5d6 Binary files /dev/null and b/web/gesture/static/media/operator.gif differ diff --git a/web/gesture/static/media/paper.gif b/web/gesture/static/media/paper.gif new file mode 100644 index 0000000..73f395c Binary files /dev/null and b/web/gesture/static/media/paper.gif differ diff --git a/web/gesture/static/media/pdf-impose.gif b/web/gesture/static/media/pdf-impose.gif new file mode 100644 index 0000000..4a12789 Binary files /dev/null and b/web/gesture/static/media/pdf-impose.gif differ diff --git a/web/gesture/static/media/pebbles.gif b/web/gesture/static/media/pebbles.gif new file mode 100644 index 0000000..e711fda Binary files /dev/null and b/web/gesture/static/media/pebbles.gif differ diff --git a/web/gesture/static/media/printer.gif b/web/gesture/static/media/printer.gif new file mode 100644 index 0000000..3cfb619 Binary files /dev/null and b/web/gesture/static/media/printer.gif differ diff --git a/web/gesture/static/media/reverse-pebbles.gif b/web/gesture/static/media/reverse-pebbles.gif new file mode 100644 index 0000000..44dbf5f Binary files /dev/null and b/web/gesture/static/media/reverse-pebbles.gif differ diff --git a/web/gesture/static/media/sea.gif b/web/gesture/static/media/sea.gif new file mode 100644 index 0000000..9add314 Binary files /dev/null and b/web/gesture/static/media/sea.gif differ diff --git a/web/gesture/static/media/stairs.gif b/web/gesture/static/media/stairs.gif new file mode 100644 index 0000000..e78b545 Binary files /dev/null and b/web/gesture/static/media/stairs.gif differ diff --git a/web/gesture/static/media/strike.gif b/web/gesture/static/media/strike.gif new file mode 100644 index 0000000..10bd509 Binary files /dev/null and b/web/gesture/static/media/strike.gif differ diff --git a/web/gesture/static/media/studio.gif b/web/gesture/static/media/studio.gif new file mode 100644 index 0000000..2821e40 Binary files /dev/null and b/web/gesture/static/media/studio.gif differ diff --git a/web/gesture/static/media/teletype.gif b/web/gesture/static/media/teletype.gif new file mode 100644 index 0000000..5122d0a Binary files /dev/null and b/web/gesture/static/media/teletype.gif differ diff --git a/web/gesture/static/media/visible.gif b/web/gesture/static/media/visible.gif new file mode 100644 index 0000000..619332d Binary files /dev/null and b/web/gesture/static/media/visible.gif differ diff --git a/web/gesture/static/media/whosfirst.gif b/web/gesture/static/media/whosfirst.gif new file mode 100644 index 0000000..a3a6889 Binary files /dev/null and b/web/gesture/static/media/whosfirst.gif differ diff --git a/web/gesture/static/media/whosnext.gif b/web/gesture/static/media/whosnext.gif new file mode 100644 index 0000000..55a20d1 Binary files /dev/null and b/web/gesture/static/media/whosnext.gif differ diff --git a/web/gesture/static/style.css b/web/gesture/static/style.css new file mode 100644 index 0000000..722a2d3 --- /dev/null +++ b/web/gesture/static/style.css @@ -0,0 +1,75 @@ +:root{ + --color1: #418; + --color2: #ff0; +} + +a{text-decoration: none;} + +body{ + font-family: monospace; + background-color: var(--color1); + color: var(--color2); + margin: 2rem auto; + max-width: 60rem; + padding: 1rem; +} +.button{ + font-family: monospace; + padding: 0.5em 1em; + border-radius: 2em; + background: var(--color2); + color: var(--color1); + border: none; + margin: 0 0.25rem 0.25rem 0; +} +button:after{ + content: " →"; + break-before: avoid; +} +h1.button{font-size: 1.4rem;} +.button:hover{opacity: 0.7; cursor: pointer;} +.close{float: right; text-decoration: none;} +.close:hover{opacity: 0.7} +img{width: 100%; margin-bottom: 1rem;} +input{ + margin: 0 0 0.5rem; +} +input[type="submit"]{ + background-color: var(--color2); + color:var(--color1); + font-size: 1.5rem; + padding: 0.5rem; + font-family: monospace; + font-weight: 600; + width: 100%; +} +#floating-form{ + position: fixed; + z-index: 2; + background-color: var(--color2); + color:var(--color1); + width: 20rem; + padding: 2rem; + display: none; +} + +h4{margin: 0;} +textarea{ + width: 100%; + min-height: 20rem; + margin: 0 0 0.5rem; +} + +.two-col{ + float: left; + padding-right: 2rem; + margin: 1rem 0; +} +@media screen and (min-width: 768px){ + .two-col{max-width: calc(50% - 4rem);} + p{font-size: 1rem;} + body{font-size: 1.5rem;} + +@media screen and (max-width: 767px){ + body{font-size: 3rem;} +} diff --git a/web/gesture/templates/template-index.html b/web/gesture/templates/template-index.html new file mode 100644 index 0000000..a99051c --- /dev/null +++ b/web/gesture/templates/template-index.html @@ -0,0 +1,18 @@ + + + + + + +

gesture glossary ✌️

+
+

This is the gesture glossary. Click a word to see the gestures related to it.

+

The aim is to see if a gesture glossary works and how it will work best. Also to see what kind of different interpretations there will be on gestures of our memory. To test the gesture glossary idea, and see what different meanings appear or already exist in the current vocabulary. Putting next to each other different agreements on linguistic and body units, testing what makes sense. Investigating and playing with communicational channels in between us, how a body language is documented, how it expands, how it is capable of creating or enhancing identities. To be an xpub means to speak/perform the xpub language?

+
+
+ {% for word in text + %}{% + endfor %} +
+ + diff --git a/web/gesture/templates/template-word.html b/web/gesture/templates/template-word.html new file mode 100644 index 0000000..372d752 --- /dev/null +++ b/web/gesture/templates/template-word.html @@ -0,0 +1,19 @@ + + + + + + +

{{word}} x

+ {% for file in wordmedia %} +
+ + + + {% for tag in media[file] + %}{% + endfor %} +
+ {% endfor %} + +