madefiles to make files

master
xpub1 1 year ago
parent ae1e73c9b0
commit d0856ce50c

@ -0,0 +1,2 @@
GESTURE_APPLICATION_ROOT=/breadcube/gesture
GESTURE_PORTNUMBER=5002

@ -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

@ -2,15 +2,17 @@ from flask import Flask, request, redirect, render_template
import os import os
app = Flask(__name__) app = Flask(__name__)
app.config.from_pyfile('settings.py')
UPLOAD_FOLDER = os.path.join("static", "media") UPLOAD_FOLDER = os.path.join("static", "media")
media = { media = {
"beer.gif": ["beer"], "beer.gif": ["beer"],
"bell.gif": ["beer", "cafe de bel", "bell"], "bell.gif": ["beer", "cafe de bel", "bell"],
"box.gif": ["box"], "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-storm.gif": ["cloud", "storm"],
"cloud.gif": ["cloud"], "cloud.gif": ["cloud"],
"coffee.gif": ["coffee", "cafe fe bel"], "coffee.gif": ["coffee", "cafe de bel"],
"er-beer.gif": ["emergency beer"], "er-beer.gif": ["emergency beer"],
"hands.gif": ["joking", "okay", "sure"], "hands.gif": ["joking", "okay", "sure"],
"hurry.gif": ["time", "hurry", "pebbles"], "hurry.gif": ["time", "hurry", "pebbles"],
@ -20,13 +22,20 @@ media = {
"pdf-impose.gif": ["pdf impose", "makarena"], "pdf-impose.gif": ["pdf impose", "makarena"],
"pebbles.gif": ["time", "clockwise", "anticlockwise"], "pebbles.gif": ["time", "clockwise", "anticlockwise"],
"strike.gif": ["strike", "worker", "woman", "operator"] "strike.gif": ["strike", "worker", "woman", "operator"]
} }
# media = ["operator", "worker", "woman"]
@app.route("/") @app.route("/")
def home(): 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) return render_template("template-index.html", text=text)
@app.route("/<word>") @app.route("/<word>")
@ -37,4 +46,4 @@ def word(word):
wordmedia.append(item) wordmedia.append(item)
print("wordmedia: ") print("wordmedia: ")
print(wordmedia) print(wordmedia)
return render_template("template-word.html", word=word, wordmedia=wordmedia, media=media, path=UPLOAD_FOLDER) return render_template("template-word.html", word=word, wordmedia=wordmedia, media=media, path=UPLOAD_FOLDER)

@ -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))

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Before

Width:  |  Height:  |  Size: 3.2 MiB

After

Width:  |  Height:  |  Size: 3.2 MiB

@ -12,6 +12,7 @@ body{
font-size: 1.5rem; font-size: 1.5rem;
margin: 2rem auto; margin: 2rem auto;
max-width: 60rem; max-width: 60rem;
padding: 1rem;
} }
.button{ .button{
font-family: monospace; font-family: monospace;
@ -19,15 +20,18 @@ body{
border-radius: 2em; border-radius: 2em;
background: var(--color2); background: var(--color2);
color: var(--color1); color: var(--color1);
border: none;
margin: 0 0.25rem 0.25rem 0;
} }
button:after{ button:after{
content: " →"; content: " →";
break-before: avoid; break-before: avoid;
} }
h1.button{font-size: 1.4rem;}
.button:hover{opacity: 0.7; cursor: pointer;} .button:hover{opacity: 0.7; cursor: pointer;}
.close{float: right; text-decoration: none;} .close{float: right; text-decoration: none;}
.close:hover{opacity: 0.7} .close:hover{opacity: 0.7}
img{max-width: 100%; margin-bottom: 1rem;} img{width: 100%; margin-bottom: 1rem;}
input{ input{
margin: 0 0 0.5rem; margin: 0 0 0.5rem;
} }
@ -61,6 +65,7 @@ textarea{
max-width: calc(50% - 4rem); max-width: calc(50% - 4rem);
float: left; float: left;
padding-right: 2rem; padding-right: 2rem;
margin: 1rem 0;
} }
p{font-size: 1rem;}

@ -5,7 +5,8 @@
<body> <body>
<h1>gesture glossary ✌️</h1> <h1>gesture glossary ✌️</h1>
<div class="two-col"> <div class="two-col">
<h4>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.</h4> <h4>This is the the gesture glossary. Click a word to the right to see the gestures related to it. </h4>
<p>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?</p>
</div> </div>
<div class="two-col"> <div class="two-col">
{% for word in text {% for word in text

@ -6,7 +6,7 @@
<a href="/" ><h1 class="button">{{word}} <span class="close">x</span></h1></a> <a href="/" ><h1 class="button">{{word}} <span class="close">x</span></h1></a>
{% for file in wordmedia %} {% for file in wordmedia %}
<div class="two-col"> <div class="two-col">
<h2>Video {{file}}</h2> <!-- <h2>Video {{file}}</h2> -->
<!-- This file path might need to change --> <!-- This file path might need to change -->
<img src="{{path}}/{{file}}" /> <img src="{{path}}/{{file}}" />
{% for tag in media[file] {% for tag in media[file]

Loading…
Cancel
Save