mirror of
https://github.com/migatu/conjurer.git
synced 2026-07-19 16:22:10 +00:00
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
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
# 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()
|
||||
Reference in New Issue
Block a user