(12-13-2024, 03:14 PM)Tim Curtis Wrote: Its just a file created by the stub script
/var/local/www/comandw/lcd_updater.py
You would put your own code that parses currentsong.txt and writes to your display in this script file
Code:#!/usr/bin/python3
#
# SPDX-License-Identifier: GPL-3.0-or-later
# Copyright 2014 The moOde audio player project / Tim Curtis
#
#
# Stub script for lcd-updater.sh daemon
#
import subprocess
homeDir = subprocess.run(['ls', '/home/'], stdout=subprocess.PIPE).stdout.decode('utf-8').strip()
with open("/var/local/www/currentsong.txt") as file1:
with open("/home/" + homeDir + "/lcd.txt", "w") as file2:
for line in file1:
file2.write(line)
I do admit that Python is not my strength, but...
why copy a file line by line, when a cp would suffice???
Or indeed the culprit is "replace the line-copy cycle with your own code"...?