Browse Source

updating gitignore + add a PYTHON variable in the televex.py

master
televex 3 years ago
parent
commit
d1687eec38
  1. 3
      .gitignore
  2. 9
      Makefile
  3. 1
      requirements.txt
  4. 9
      screen/televex.py

3
.gitignore

@ -1,3 +1,4 @@
.venv*
venv*
print/__pycache__*
*__pycache__*
*.pyc

9
Makefile

@ -1,11 +1,14 @@
# Force these recipes to run at every make request
.PHONY: screen print
setup:
@python3 -m venv .venv && \
.venv/bin/pip install -r requirements.txt
screen:
@cd screen && \
.venv/bin/python televex.py
../.venv/bin/python televex.py
print:
$cd print && \
.venv/bin/python start.py
@cd print && \
../.venv/bin/python start.py

1
requirements.txt

@ -3,3 +3,4 @@ icalendar
requests
pypandoc
python-escpos
flask

9
screen/televex.py

@ -8,6 +8,11 @@ import json
import pypandoc
import time
# Use local python in the .venv (if it exists)
PYTHON = '../.venv/bin/python'
if not os.path.exists(PYTHON):
PYTHON = 'python3'
ics = get("https://varia.zone/events.ics").text
gcal = Calendar.from_ical(ics)
now = datetime.datetime.now()
@ -15,11 +20,11 @@ now = datetime.datetime.now()
while True:
#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")
os.system(f"{ PYTHON } tools/ascii-art-but-with-unicode/repeated_sinus_amplitude_variation.py | lolcat -a -d 1")
print("")
time.sleep(1)
os.system("./venv/bin/python3 tools/ascii-art-but-with-unicode/multi_column_page.py | lolcat -a -d 1")
os.system(f"{ PYTHON } tools/ascii-art-but-with-unicode/multi_column_page.py | lolcat -a -d 1")
print("")
time.sleep(10)

Loading…
Cancel
Save