Files
conjurer/conjurer_musician/music_utils.py
T
gitea a63368adb5 Tag: 1.7
Intermediate commits (oldest → newest):
- Streaming hls
- Fx bug
- Fxs
- Small fixes
- Revert fix
- Small improvements
- Fine tuning
- Fine tune
- Add microphone
- Fixing memory of Conjurer
- Local output
- Fix
- Fx
- Fine tuning
- Adding script logging current tracks in queue
2025-10-30 16:59:02 +01:00

27 lines
771 B
Python

# This Python file uses the following encoding: utf-8
"""This module contains utility scripts used by musi radiostation Conjurer"""
import time
import re
NAME = "/home/pi/Conjurer/persistence.log"
def print_top():
"""
Prints the top 65 lines from a file specified by the NAME variable.
"""
while True:
line = ""
buffer = ""
with open(NAME, "r", encoding="utf-8") as f:
for _ in range (45):
line = f.readline()
if re.match(".*mp3", line):
buffer += line
print("=====================================")
print(buffer)
print("=====================================")
time.sleep(180)
if __name__ == "__main__":
print_top()