add requirements.txt

This commit is contained in:
Lucca Ketterer 2023-01-14 14:57:45 +01:00
parent 6226f2ba08
commit 62fc2188b3
6 changed files with 18 additions and 7 deletions

View File

@ -1,4 +0,0 @@
install :
pip install -r requirements.txt
cp controller.py /bin/lc; mkdir -p ~/.config/lc; cp cava.conf ~/.config/lc/cava.conf; sudo chmod 666 ~/.config/lc/cava.conf

View File

@ -10,7 +10,6 @@ import pickle
import re
import webview
async def scan_for_pi() -> dict():
ip = socket.gethostbyname(socket.gethostname())
baseIP = '.'.join(ip.split(".")[:3])
@ -82,7 +81,8 @@ def set_pixels(color):
# @click.option("-v", help="Set HEX Color as base visualizer color: -v ffffff")
def main(arg):
if arg == ():
proc = subprocess.Popen(["streamlit", "run", "streamlit.py", "--server.headless", "True"], stdout=subprocess.PIPE)
path = os.path.expanduser("~/.config/lc/gui.py")
proc = subprocess.Popen(["python", "-m", "streamlit", "run", path, "--server.headless", "True"], stdout=subprocess.PIPE)
for line in proc.stdout:
if line == b' You can now view your Streamlit app in your browser.\n':
break

5
controller/install.sh Executable file
View File

@ -0,0 +1,5 @@
sudo cp controller.py /bin/lc
mkdir -p ~/.config/lc
cp cava.conf ~/.config/lc/cava.conf
sudo chmod 666 ~/.config/lc/cava.conf
cp gui.py ~/.config/lc/gui.py

View File

@ -0,0 +1,3 @@
click==8.1.3
pywebview==3.7.2
streamlit==1.17.0

View File

@ -3,5 +3,12 @@
```
git clone https://git.timssfo.com/lucca/led_control
cd led_control/controller
sudo make install
pip install -r requirements.txt
bash install.sh
```
# Usage
`lc` for opening the gui
`lc search` searching in local network
`lc set 101010` for setting a fix color