From d0856ce50c093f816836cfa0920c2b4ae5292aa8 Mon Sep 17 00:00:00 2001 From: xpub1 Date: Tue, 20 Jun 2023 19:57:49 +0200 Subject: [PATCH] madefiles to make files --- gesture/.env | 2 ++ gesture/Makefile | 10 +++++++++ gesture/__pycache__/app.cpython-310.pyc | Bin 1185 -> 1717 bytes gesture/app.py | 21 +++++++++++++----- gesture/settings.py | 10 +++++++++ gesture/static/{media => }/img1.png | Bin gesture/static/{media => }/img2.png | Bin gesture/static/{media => }/img3.png | Bin .../static/media/{pebbels.gif => pebbles.gif} | Bin gesture/static/style.css | 9 ++++++-- gesture/templates/template-index.html | 3 ++- gesture/templates/template-word.html | 2 +- 12 files changed, 47 insertions(+), 10 deletions(-) create mode 100644 gesture/.env create mode 100644 gesture/Makefile create mode 100644 gesture/settings.py rename gesture/static/{media => }/img1.png (100%) rename gesture/static/{media => }/img2.png (100%) rename gesture/static/{media => }/img3.png (100%) rename gesture/static/media/{pebbels.gif => pebbles.gif} (100%) diff --git a/gesture/.env b/gesture/.env new file mode 100644 index 0000000..a516326 --- /dev/null +++ b/gesture/.env @@ -0,0 +1,2 @@ +GESTURE_APPLICATION_ROOT=/breadcube/gesture +GESTURE_PORTNUMBER=5002 diff --git a/gesture/Makefile b/gesture/Makefile new file mode 100644 index 0000000..eb2ac03 --- /dev/null +++ b/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/gesture/__pycache__/app.cpython-310.pyc b/gesture/__pycache__/app.cpython-310.pyc index f9b6d1e3ff298f2463ad4a2447050ec40ffae64f..d914c6aebd8177946a6a04b5a05dcc53466af5b6 100644 GIT binary patch literal 1717 zcmZ8hTW=#Z6t*4D#F^ZBS$2C_AlwOT8o?u4tw5AYNYyT4;bjDhCb5%FGm}X@PScE1 z32Axd0r3Y~-uO%NhIrzQJ8YN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6h-24?&P7&1QoDK@xPaKtQN4WN~aOmPCc3 zcGrd%D3D%z=skzsz2yP=GQ8&0S1@|$Q0^{@5a95e84hRk%}Dlo9fIrGUw?`bBjl4+ z{=Ym_9^tN5CS31^dV!Ryh#2AbQl`g;pvIG@tsWyX4H2lxy z)kP|ckZt;qgPK8+EQb>SWtf$log|*ZPypI8Ysxat7KPNItJ+wg@sFiifa2b<%wv3J z6{Pv>-l!~Q4ccu`-$vXyN(IPKUjEQ{zPFwYy_?wYyj&Ckc7;5_U44lHxuX~KlxSpp zO@#Z0<%YcsZ#LQ0HN2v1Lsfuc<$t#bF%xfQAiKtl$4Sps(_@aaoSarD1cKgDtYM9YNnC($0E& zy0#x{jMEIe;x%1a?bvM1?A;%(u3xcWtqln{k<2QleRWaUQVc6&JrBLD;^SB0WE-zk zX`vgsOz-gZi&u~L#`~{c>^=Pjhwm1KsoPC#iisK`x8f`7v2IIoWhaC=0qxQbb$$zI zK(Eur8xD*&wZE2fY=C7&S@yR199fxQJTBrK#$)4RMd}-L8unJEh5FXsYYO+2tTi-j rZ%eWb{j3-hJjkV}Gk9p*P}z5G5v;`NQ{V9^qdxWj34#s{SfBn2;ioX@ diff --git a/gesture/app.py b/gesture/app.py index 05db0a9..09619ec 100644 --- a/gesture/app.py +++ b/gesture/app.py @@ -2,15 +2,17 @@ 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"], "box.gif": ["box"], - "cafe-de-bel": ["coffee", "bell", "beer", "cafe de bel"], + "cafe-de-bel.gif": ["coffee", "bell", "beer", "cafe de bel"], "cloud-storm.gif": ["cloud", "storm"], "cloud.gif": ["cloud"], - "coffee.gif": ["coffee", "cafe fe bel"], + "coffee.gif": ["coffee", "cafe de bel"], "er-beer.gif": ["emergency beer"], "hands.gif": ["joking", "okay", "sure"], "hurry.gif": ["time", "hurry", "pebbles"], @@ -20,13 +22,20 @@ media = { "pdf-impose.gif": ["pdf impose", "makarena"], "pebbles.gif": ["time", "clockwise", "anticlockwise"], "strike.gif": ["strike", "worker", "woman", "operator"] - } -# media = ["operator", "worker", "woman"] @app.route("/") def home(): - text = ["operator", "worker", "operator strike", "strike", "(k)not","pebbles","time","hurry","clockwise","anticlockwise","cloud","teletype","box","emergency beer","beer","cafe de bel","coffee","bell","food","breakfast","I love you"] + 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("/") @@ -37,4 +46,4 @@ def word(word): wordmedia.append(item) print("wordmedia: ") print(wordmedia) - return render_template("template-word.html", word=word, wordmedia=wordmedia, media=media, path=UPLOAD_FOLDER) \ No newline at end of file + return render_template("template-word.html", word=word, wordmedia=wordmedia, media=media, path=UPLOAD_FOLDER) diff --git a/gesture/settings.py b/gesture/settings.py new file mode 100644 index 0000000..695ea4e --- /dev/null +++ b/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/gesture/static/media/img1.png b/gesture/static/img1.png similarity index 100% rename from gesture/static/media/img1.png rename to gesture/static/img1.png diff --git a/gesture/static/media/img2.png b/gesture/static/img2.png similarity index 100% rename from gesture/static/media/img2.png rename to gesture/static/img2.png diff --git a/gesture/static/media/img3.png b/gesture/static/img3.png similarity index 100% rename from gesture/static/media/img3.png rename to gesture/static/img3.png diff --git a/gesture/static/media/pebbels.gif b/gesture/static/media/pebbles.gif similarity index 100% rename from gesture/static/media/pebbels.gif rename to gesture/static/media/pebbles.gif diff --git a/gesture/static/style.css b/gesture/static/style.css index 00ffaa5..17c531c 100644 --- a/gesture/static/style.css +++ b/gesture/static/style.css @@ -12,6 +12,7 @@ body{ font-size: 1.5rem; margin: 2rem auto; max-width: 60rem; + padding: 1rem; } .button{ font-family: monospace; @@ -19,15 +20,18 @@ body{ 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{max-width: 100%; margin-bottom: 1rem;} +img{width: 100%; margin-bottom: 1rem;} input{ margin: 0 0 0.5rem; } @@ -61,6 +65,7 @@ textarea{ max-width: calc(50% - 4rem); float: left; padding-right: 2rem; + margin: 1rem 0; } - +p{font-size: 1rem;} diff --git a/gesture/templates/template-index.html b/gesture/templates/template-index.html index 0bc7735..5552f58 100644 --- a/gesture/templates/template-index.html +++ b/gesture/templates/template-index.html @@ -5,7 +5,8 @@

gesture glossary ✌️

-

This is the home page for the gesture glossary. It has every word in the glossary to the right. Click a word to visit its page. This is the introduction.

+

This is the the gesture glossary. Click a word to the right 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 channel 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 diff --git a/gesture/templates/template-word.html b/gesture/templates/template-word.html index c3ae93e..340b47a 100644 --- a/gesture/templates/template-word.html +++ b/gesture/templates/template-word.html @@ -6,7 +6,7 @@

{{word}} x

{% for file in wordmedia %}
-

Video {{file}}

+ {% for tag in media[file]