8 Commits

Author SHA1 Message Date
mco-system
5bd0596281 build: Docker version 2023-04-22 17:07:56 +11:00
mco-system
db7fcbfc3c chore: do not log UnknownSpeakerError 2023-04-21 23:03:27 +11:00
mco-system
9050304a30 typo 2023-04-21 01:25:44 +11:00
mco-system
e15beb74d1 Merge branch 'beta' 2023-04-21 00:40:49 +11:00
mco-system
7883ac1ae6 chore: DEBUG LOG LEVEL 2023-04-21 00:34:49 +11:00
mco-system
0028302b5a chore: INFO log level 2023-04-21 00:18:27 +11:00
ee43e98385 beta (#4)
Co-authored-by: mco-system <michael.costa@mcos.nc>
Reviewed-on: #4
2023-04-20 15:09:57 +02:00
mco-system
ecc56281bb Prod ready 2023-04-21 00:07:47 +11:00
13 changed files with 124 additions and 24 deletions

View File

@@ -1,45 +1,50 @@
.PHONY: clean distclean install run stop .PHONY: clean distclean install run stop all docker-build docker-run docker-stop docker-all
install: install:
set -e ;\ set -e ;\
THSF_DIR=$$(pwd); \ python -m venv thsf_venv; \
echo [+] Déploiement dans $$THSF_DIR; \
python3 -m venv thsf_venv; \
. thsf_venv/bin/activate; \ . thsf_venv/bin/activate; \
pip3 install -r requirements.txt ;\ pip install -r requirements.txt ;\
pip3 install . ;\ pip install . ;\
pip3 install gunicorn; \ pip install gunicorn; \
run: run:
set -e ;\ set -e ;\
THSF_DIR=$$(pwd); \ THSF_DIR=$$(pwd); \
echo [+] Démarrage dans $$THSF_DIR; \
. thsf_venv/bin/activate; \ . thsf_venv/bin/activate; \
thsf_venv/bin/gunicorn -D -p thsf.pid -w 4 -b 127.0.0.1:8042 'thsf:app' thsf_venv/bin/gunicorn -p thsf.pid -w 4 -b 0.0.0.0:8042 'thsf:app'
debug: debug:
set -e ;\ set -e ;\
THSF_DIR=$$(pwd); \ THSF_DIR=$$(pwd); \
echo [+] Démarrage dans $$THSF_DIR; \
. thsf_venv/bin/activate; \ . thsf_venv/bin/activate; \
thsf_venv/bin/gunicorn -p thsf.pid -w 4 -b 127.0.0.1:8042 'thsf:app' thsf_venv/bin/gunicorn -p thsf.pid -w 4 -b 0.0.0.0:8042 'thsf:app'
stop: stop:
-set -e;\ -set -e;\
THSF_DIR=$$(pwd); \ THSF_DIR=$$(pwd); \
echo [+] Arrêt dans $$THSF_DIR; \
kill -15 $$(cat $$THSF_DIR/thsf.pid); \ kill -15 $$(cat $$THSF_DIR/thsf.pid); \
rm thsf.pid rm thsf.pid
clean: clean:
-set -e ;\ -set -e ;\
THSF_DIR=$$(pwd); \ THSF_DIR=$$(pwd); \
echo [+] Nettoyage dans $$THSF_DIR; \
rm -Rf ./build ./src/thsf.egg-info ./thsf.pid ./thsf.log; \ rm -Rf ./build ./src/thsf.egg-info ./thsf.pid ./thsf.log; \
. thsf_venv/bin/activate; \ . thsf_venv/bin/activate; \
pip3 uninstall thsf -y pip uninstall thsf -y
distclean: clean distclean: clean
rm -Rf thsf_venv/ rm -Rf thsf_venv/
all: stop clean install run all: stop clean install run
docker-build:
docker-compose build
docker-run:
docker-compose up -d
docker-stop:
-docker-compose down
docker-all: docker-stop docker-build docker-run

View File

@@ -14,7 +14,7 @@ log:
handlers: [wsgi] handlers: [wsgi]
propagate: no propagate: no
root: root:
level: DEBUG level: INFO
handlers: [wsgi] handlers: [wsgi]
app: app:
secret_key: xxx secret_key: xxx
@@ -57,7 +57,7 @@ navbar:
- name: Tables rondes - name: Tables rondes
classes: fa-solid fa-users-line classes: fa-solid fa-users-line
url: /discussions url: /discussions
- name: Installations artistiques - name: Installation
classes: fa-solid fa-palette classes: fa-solid fa-palette
url: /exhibitions url: /exhibitions
- name: Présentations - name: Présentations

10
docker-compose.yml Normal file
View File

@@ -0,0 +1,10 @@
version: "2"
services:
thsf:
build:
dockerfile: thsf.Dockerfile
context: .
ports:
- "127.0.0.1:8042:8042"
image: thsf:latest
container_name: thsf

View File

@@ -63,7 +63,7 @@ def get_speaker_biography(name):
logging.info(speaker_info) logging.info(speaker_info)
return speaker_info["results"][0]["biography"].strip() return speaker_info["results"][0]["biography"].strip()
except Exception as err: except Exception as err:
logging.error(f"UnknownSpeakerError: {name}") logging.debug(f"UnknownSpeakerError: {name}")
return None return None
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
@@ -98,7 +98,7 @@ def date2dmyhm(slot_type):
"Présentation": "fa-solid fa-person-chalkboard", "Présentation": "fa-solid fa-person-chalkboard",
"Table Ronde": "fa-solid fa-users-line", "Table Ronde": "fa-solid fa-users-line",
"Atelier": "fa-solid fa-screwdriver-wrench", "Atelier": "fa-solid fa-screwdriver-wrench",
"Exposition": "fa-solid fa-palette"} "Installation": "fa-solid fa-palette"}
return slot_types[slot_type] return slot_types[slot_type]
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
@@ -123,16 +123,17 @@ def planning():
return render_template("planning.html", return render_template("planning.html",
slots=sorted(slots.get("slots"), slots=sorted(slots.get("slots"),
key=lambda slot: slot.get("slot").get("start")), key=lambda slot: slot.get("slot").get("start")),
navbar=navbar.get_from_page(page="/planning")) navbar=navbar.get_from_page(page="/planning"),
filter=["concert", "dj set", "panel discussion", "talk", "screening"])
@app.route('/place', methods=['GET']) @app.route('/place', methods=['GET'])
def place(): def place():
return render_template("index.html", return render_template("place.html",
navbar=navbar.get_from_page(page="/place")) navbar=navbar.get_from_page(page="/place"))
@app.route('/food', methods=['GET']) @app.route('/food', methods=['GET'])
def food(): def food():
return render_template("index.html", return render_template("food.html",
navbar=navbar.get_from_page(page="/food")) navbar=navbar.get_from_page(page="/food"))
@app.route('/goodies', methods=['GET']) @app.route('/goodies', methods=['GET'])
@@ -183,7 +184,7 @@ def exhibitions():
slots=sorted(slots.get("slots"), slots=sorted(slots.get("slots"),
key=lambda slot: slot.get("slot").get("start")), key=lambda slot: slot.get("slot").get("start")),
navbar=navbar.get_from_page(page="/exhibitions"), navbar=navbar.get_from_page(page="/exhibitions"),
filter=["exhibition"]) filter=["installation"])
@app.route('/talks', methods=['GET']) @app.route('/talks', methods=['GET'])
def talks(): def talks():

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -64,12 +64,24 @@
</a> </a>
</div> </div>
<div class="subpartners"> <div class="subpartners">
<a href="https://www.tvbruits.org/" target="_new">
<img src="{{ url_for('static', filename='images/tv-bruits.png')}}"
alt="TV Bruits"
title="TV Bruits"
class="logo_partner">
</a>
<a href="https://www.tetaneutral.net/" target="_new"> <a href="https://www.tetaneutral.net/" target="_new">
<img src="{{ url_for('static', filename='images/tetaneutral.png')}}" <img src="{{ url_for('static', filename='images/tetaneutral.png')}}"
alt="Tetaneutral" alt="Tetaneutral"
title="Tetaneutral" title="Tetaneutral"
class="logo_partner"> class="logo_partner">
</a> </a>
<a href="https://www.radio-fmr.net/" target="_new">
<img src="{{ url_for('static', filename='images/fmr.png')}}"
alt="Radio FMR"
title="Radio FMR"
class="logo_partner">
</a>
</div> </div>
<div class="subpartners"> <div class="subpartners">
<a href="https://clutchmag.fr/" target="_new"> <a href="https://clutchmag.fr/" target="_new">

View File

@@ -0,0 +1,14 @@
{% extends "base.html" %}
{% block content %}
<div class="logo_wrapper">
<img class="logo"
src="{{ url_for('static', filename='images/logo.svg') }}"
alt="THSF 2023 - S/Extraire"
title="THSF 2023 - S/Extraire">
</div>
<div class="content">
<h2>Restauration</h2>
<p>La restauration sur place est prévue.</p>
<p>Détails à venir...</p>
</div>
{% endblock %}

View File

@@ -16,12 +16,12 @@
<h2>Le THSF est enfin de retour !</h2> <h2>Le THSF est enfin de retour !</h2>
<p>Nous vous invitons à passer un week-end de 3 jours à <a href="https://www.cinemas-utopia.org/toulouse/" target="_new">Utopia Borderouge Toulouse</a> pour partager avec vous nos projets, nos réflexions, nos performances, nos poésies et nos doutes sur la technologie.</p> <p>Nous vous invitons à passer un week-end de 3 jours à <a href="https://www.cinemas-utopia.org/toulouse/" target="_new">Utopia Borderouge Toulouse</a> pour partager avec vous nos projets, nos réflexions, nos performances, nos poésies et nos doutes sur la technologie.</p>
<p>Après avoir été soutenu et accueilli pendant 10 ans par <a href="https://vive.mixart-myrys.org/" target="_new">Mix'Art Myrys</a>, le <strong>Toulouse HackerSpace Factory</strong> se tient désormais dans un autre lieu où l'utopie nécessaire est inscrite programme.</p> <p>Après avoir été soutenu et accueilli pendant 10 ans par <a href="https://vive.mixart-myrys.org/" target="_new">Mix'Art Myrys</a>, le <strong>Toulouse HackerSpace Factory</strong> se tient désormais dans un autre lieu où l'utopie nécessaire est inscrite au programme.</p>
<p>Cette année nous mettons en avant des réflexions sur <a href="https://fr.wikipedia.org/wiki/Extractivisme" target="_new">l'extractivisme des ressources</a> planétaires, des données, de la valeur travail.</p> <p>Cette année nous mettons en avant des réflexions sur <a href="https://fr.wikipedia.org/wiki/Extractivisme" target="_new">l'extractivisme des ressources</a> planétaires, des données, de la valeur travail.</p>
<p>Comme toujours, notre objectif est de créer un festival qui poétise les bifurcations de nos idées communes et qui réinvente le sens de certains schémas imposés par notre époque. Rejoignez-nous pour une expérience enrichissante et pleine de surprises !</p> <p>Comme toujours, notre objectif est de créer un festival qui poétise les bifurcations de nos idées communes et qui réinvente le sens de certains schémas imposés par notre époque. Rejoignez-nous pour une expérience enrichissante et pleine de surprises !</p>
<p>Consulter <a href="/planning">le programme du THSF</a>.</p> <p>Retrouvez <a href="/planning">le programme du THSF</a> avec ses <a href="/workshops">ateliers</a>, ses <a href="/exhibitions">expositions et installations</a> mais également ses <a href="/concerts">concerts</a>, ses <a href="/projections">projections</a>, ses <a href="/talks">présentations</a> et ses <a href="/discussions">tables rondes</a>.</p>
</div> </div>
{% endblock %} {% endblock %}

View File

@@ -0,0 +1,34 @@
{% extends "base.html" %}
{% block content %}
<div class="logo_wrapper">
<img class="logo"
src="{{ url_for('static', filename='images/logo.svg') }}"
alt="THSF 2023 - S/Extraire"
title="THSF 2023 - S/Extraire"
onclick="document.getElementById('wemakeporn').style.visibility='visible';">
<div id="wemakeporn" class="wemakeporn"
onclick="document.getElementById('wemakeporn').style.visibility='hidden';">
<div class="wemake">WE MAKE</div>
<div class="porn">PORN</div>
</div>
</div>
<div class="content">
<h2>Toujours plus d'utopies</h2>
<p>
La fermeture administrative imposée à <a href="https://vive.mixart-myrys.org/" target="_new">Mix'Art Myrys</a>, terre d'accueil des 10 éditions antérieures du THSF, nous montre qu'il est plus que jamais important de continuer à bâtir, consolider et faire vivre nos utopies face à la repression systémique qu'on voudrait nous imposer.
</p>
<p>
Connu pour sa programmation alternative et engagée, ainsi que pour son ambiance conviviale et chaleureuse, le cinéma d'art et d'essai indépendant <a href="https://www.cinemas-utopia.org/toulouse/">Utopia Borderouge</a>, dont l'utopie est naturellement au programme, s'est proposé pour accueillir le <strong>THSF 2023</strong>.
</p>
<h3>Plan d'accès</h3>
<ul>
<li><strong>Adresse:</strong> 59, avenue Maurice Bourgès-Maunoury, Les Izards - Toulouse</li>
<li><strong>GPS:</strong> 43°38'22.7"N 1°27'07.3"E</li>
<li><strong>Métro:</strong> Ligne B - Borderouge</li>
<li><strong>Velooz:</strong> Station 175 - Métro Borderouge - Maunoury</li>
</ul>
<div class="map">
<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://www.openstreetmap.org/export/embed.html?bbox=1.4502596855163576%2C43.63879667815726%2C1.4538002014160158%2C43.64046408342326&amp;layer=mapnik&amp;marker=43.639631357124614%2C1.4520299434661865" style="border: 1px solid black"></iframe><br/><small><a href="https://www.openstreetmap.org/?mlat=43.63963&amp;mlon=1.45203#map=19/43.63963/1.45203">Afficher une carte plus grande</a></small>
</div>
</div>
{% endblock %}

View File

@@ -6,6 +6,7 @@
<span class="title">{{slot.title}}</span> <span class="title">{{slot.title}}</span>
</div> </div>
<div class="slot_info"> <div class="slot_info">
{% if slot.slot.room.fr != "Workshops" %}
<div class="start"> <div class="start">
<i class="fa-solid fa-caret-right"></i> <i class="fa-solid fa-caret-right"></i>
{{slot.slot.start | date2dmyhm}} - {{slot.duration}} minutes ({{slot.content_locale | capitalize}}) {{slot.slot.start | date2dmyhm}} - {{slot.duration}} minutes ({{slot.content_locale | capitalize}})
@@ -14,6 +15,7 @@
<i class="fa-solid fa-caret-right"></i> <i class="fa-solid fa-caret-right"></i>
{{slot.slot.room.fr}} {{slot.slot.room.fr}}
</div> </div>
{% endif %}
<div class="speakers"> <div class="speakers">
{% for speaker in slot.speakers %} {% for speaker in slot.speakers %}
<div class="speaker"> <div class="speaker">

14
thsf.Dockerfile Normal file
View File

@@ -0,0 +1,14 @@
FROM python:3.9.16-bullseye as thsf_base
RUN apt-get update -y && \
apt-get install -y bash make python3-pip && \
useradd -m -d /home/thsf -s /bin/bash thsf
from thsf_base as thsf_build
COPY . /home/thsf/
RUN chown -R thsf:thsf /home/thsf/
USER thsf
WORKDIR /home/thsf/
from thsf_build
RUN make install
CMD ["make", "run"]

8
thsf.net.code-workspace Normal file
View File

@@ -0,0 +1,8 @@
{
"folders": [
{
"path": "."
}
],
"settings": {}
}