added ascii-art-but-with-unicode repo, multi columns, and sinus VARIA ascii art

This commit is contained in:
televex 2021-02-23 17:31:49 +00:00
parent ecaf23b2ae
commit 9af0aeafd5
5 changed files with 110 additions and 59 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "tools/ascii-art-but-with-unicode"]
path = tools/ascii-art-but-with-unicode
url = https://git.vvvvvvaria.org/mb/ascii-art-but-with-unicode.git

View File

@ -2,3 +2,4 @@ feedparser
icalendar icalendar
requests requests
pypandoc pypandoc
pyhyphen

View File

@ -14,51 +14,71 @@ now = datetime.datetime.now()
while True: while True:
os.system("toilet --gay -w 125 -W --filter border:gay \ \ \ VARIA\ \ \ ") #os.system("toilet --gay -w 125 -W --filter border:gay \ \ \ \ \ VARIA\ \ \ \ \ ")
os.system("./venv/bin/python3 tools/ascii-art-but-with-unicode/repeated_sinus_amplitude_variation.py | lolcat -a -d 1")
print("") print("")
time.sleep(3) time.sleep(1)
abouts = [""" abouts = ["""
[NL]
--- [NL]
Varia is een collectieve ruimte1 in Rotterdam die zich richt op alledaagse technologie.
--- Varia is een collectieve ruimte in Rotterdam
Wij zijn van mening dat technologie niet het exclusieve domein van specialisten moet zijn. die zich richt op alledaagse technologie.
Technologie beinvloedt iedereen en zou verschillende manieren van leven mogelijk moeten
maken, in plaats van deze uit te sluiten. We vatten alledaagse technologie breed op; Wij zijn van mening dat technologie niet het
niet alleen computers, standaarden of protocollen horen daarbij, maar bijvoorbeeld ook exclusieve domein van specialisten moet zijn.
kookgereedschappen of muziekinstrumenten. Technologie beinvloedt iedereen en zou verschil-
--- lende manieren van leven mogelijk moeten maken,
Vanuit onze achtergrond in kunst, ontwerp, software & hardware, onderwijs en theoretische in plaats van deze uit te sluiten. We vatten
praktijk, voelen we de behoefte om een plek te vormen waar technologie en sociale vragen alledaagse technologie breed op; niet alleen
met elkaar verbonden zijn; een plek waar samenwerking, continuteit, ontwikkeling, computers, standaarden of protocollen horen
collectief leren, nieuwsgierigheid en experiment voorop staan. daarbij, maar bijvoorbeeld ook kookgereedschap
--- of muziekinstrumenten.
Vanuit onze achtergrond in kunst, ontwerp,
software & hardware, onderwijs en theoretische
praktijken, voelen we de behoefte om een plek
te vormen waar technologie en sociale vragen
met elkaar verbonden zijn; een plek waar
samenwerking, continuteit, ontwikkeling,
collectief leren, nieuwsgierigheid en experi-
ment voorop staan.
""", """,
""" """
[EN] [EN]
--- ··················································································
Varia is a collective-space in Rotterdam focused on everyday technologies. ·················································································· Varia is a collective-space in Rotterdam
--- ·················································································· focused on everyday technologies.
We believe technology should not be the exclusive domain of specialists. ··················································································
It affects everyone and should enable, rather than preclude, diverse ways of living. ·················································································· We believe technology should not be the
We understand everyday technology broadly; not just as computers, standards, or ·················································································· exclusive domain of specialists. It affects
protocols, but also, for example, as cooking tools or musical instruments. ·················································································· everyone and should enable, rather than
--- ·················································································· preclude, diverse ways of living. We under-
Being involved in the fields of art, design, software & hardware, education ·················································································· stand everyday technology broadly; not just
and theoretical practices, we felt the need for a place where technology and ·················································································· as computers, standards, or protocols, but
social questions are linked; a place where collaboration, continuity, development, ·················································································· also, for example, as cooking tools or
collective learning, curiosity and experiments are foregrounded. ·················································································· musical instruments.
--- ··················································································
""" Being involved in the fields of art, design,
software & hardware, education and theoretical
practices, we felt the need for a place where
technology and social questions are linked; a
place where collaboration, continuity, develop-
ment, collective learning, curiosity and ex-
periments are foregrounded.
"""
] ]
# for lang in abouts: # for lang in abouts:
# for line in lang.split('\n'): # for line in lang.split('\n'):
# os.system(f"echo '{ line }' | lolcat -a") # os.system(f"echo '{ line }' | lolcat -a -d 1")
#
# print("") os.system("./venv/bin/python3 tools/ascii-art-but-with-unicode/multi_column_page.py | lolcat -a -d 1")
# time.sleep(10)
print("")
time.sleep(3)
for c in gcal.walk(): for c in gcal.walk():
@ -69,44 +89,54 @@ collective learning, curiosity and experiments are foregrounded.
if date > now: if date > now:
os.system("toilet --gay -w 125 -W --filter border:gay \ COMING UP\ \ ") # An attempt to keep TeleVex running throughout the night
# (even if the Multifeeder/server is not available)
try:
url = 'https://multi.vvvvvvaria.org/API/latest/25'
response = urllib.request.urlopen(url).read()
multifeeder = json.loads(response)
print("") except:
time.sleep(3)
url = 'https://multi.vvvvvvaria.org/API/latest/25' multifeeder = []
response = urllib.request.urlopen(url).read() os.system("toilet -f script -w 125 --gay Zzz... the server sleeps.")
multifeeder = json.loads(response)
for post in multifeeder: for post in multifeeder:
# Clean up the title of the RSS & Calendar # Clean up the title of the RSS & Calendar
title = title.lower().strip().replace('\n','') title_check = title.lower().strip().replace('\n','')
rss_title = post["title"].lower().strip().replace('\n','') rss_title_check = post["title"].lower().strip().replace('\n','')
if title == rss_title: if title_check == rss_title_check:
description = pypandoc.convert_text(post["summary"], 'plain', format='html') os.system("toilet --gay -w 125 -W --filter border:gay \ \ \ COMING UP\ \ \ \ ")
# Send the event to the terminal·
os.system(f"toilet -f mono12 --gay -w 125 -W --filter border:gay '{ title }'")
print("") print("")
time.sleep(1) time.sleep(1)
description = pypandoc.convert_text(post["summary"], 'plain', format='html',extra_args=['--columns=64'])
# Send the event to the terminal·
# Title
os.system(f"toilet -f big --gay -w 125 '{ title }'")
print("")
time.sleep(1)
# Date
print(date.strftime("%A %d %B %Y (%H:%M:%S)")) print(date.strftime("%A %d %B %Y (%H:%M:%S)"))
print("") print("")
time.sleep(1) time.sleep(1)
#print(description) # Description
lines = [line for line in description.split('\n')] lines = [line for line in description.split('\n')]
for line in lines: for line in lines:
# HACKY!!! # HACKY!!!
line = line.replace('&', '\&') line = line.replace('\n', '')
line = line.replace('(', '\(') #line = line.replace('(', '(')
line = line.replace(')', '\)') #line = line.replace(')', ')')
line = line.replace(';', '\;') #line = line.replace(';', '\;')
line = line.replace('"', '\"') #line = line.replace('"', '\"')
line = line.replace("'", "\'") #line = line.replace("'", "\'")
os.system(f"echo { line } | lolcat -a") os.system(f"echo '{ line }' | lolcat -a -d 1")
print("") print("")
time.sleep(10) time.sleep(3)

16
texts/about.txt Normal file
View File

@ -0,0 +1,16 @@
[NL]
Varia is een collectieve ruimte in Rotterdam die zich richt op alledaagse technologie.
Wij zijn van mening dat technologie niet het exclusieve domein van specialisten moet zijn. Technologie beinvloedt iedereen en zou verschillende manieren van leven mogelijk moeten maken, in plaats van deze uit te sluiten. We vatten alledaagse technologie breed op; niet alleen computers, standaarden of protocollen horen daarbij, maar bijvoorbeeld ook kookgereedschap of muziekinstrumenten.
Vanuit onze achtergrond in kunst, ontwerp, software & hardware, onderwijs en theoretische praktijken, voelen we de behoefte om een plek te vormen waar technologie en sociale vragen met elkaar verbonden zijn; een plek waar samenwerking, continuteit, ontwikkeling, collectief leren, nieuwsgierigheid en experiment voorop staan.
[EN]
Varia is a collective-space in Rotterdam focused on everyday technologies.
We believe technology should not be the exclusive domain of specialists. It affects everyone and should enable, rather than preclude, diverse ways of living. We understand everyday technology broadly; not just as computers, standards, or protocols, but also, for example, as cooking tools or musical instruments.
Being involved in the fields of art, design, software & hardware, education and theoretical practices, we felt the need for a place where technology and social questions are linked; a place where collaboration, continuity, development, collective learning, curiosity and experiments are foregrounded.

@ -0,0 +1 @@
Subproject commit 8723ac945f14363581c849a2fc8b41bcd58f0af9