add requirements.txt
This commit is contained in:
parent
6226f2ba08
commit
62fc2188b3
@ -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
|
|
||||||
|
|
||||||
@ -10,7 +10,6 @@ import pickle
|
|||||||
import re
|
import re
|
||||||
import webview
|
import webview
|
||||||
|
|
||||||
|
|
||||||
async def scan_for_pi() -> dict():
|
async def scan_for_pi() -> dict():
|
||||||
ip = socket.gethostbyname(socket.gethostname())
|
ip = socket.gethostbyname(socket.gethostname())
|
||||||
baseIP = '.'.join(ip.split(".")[:3])
|
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")
|
# @click.option("-v", help="Set HEX Color as base visualizer color: -v ffffff")
|
||||||
def main(arg):
|
def main(arg):
|
||||||
if 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:
|
for line in proc.stdout:
|
||||||
if line == b' You can now view your Streamlit app in your browser.\n':
|
if line == b' You can now view your Streamlit app in your browser.\n':
|
||||||
break
|
break
|
||||||
|
|||||||
5
controller/install.sh
Executable file
5
controller/install.sh
Executable 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
|
||||||
3
controller/requirements.txt
Normal file
3
controller/requirements.txt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
click==8.1.3
|
||||||
|
pywebview==3.7.2
|
||||||
|
streamlit==1.17.0
|
||||||
@ -3,5 +3,12 @@
|
|||||||
```
|
```
|
||||||
git clone https://git.timssfo.com/lucca/led_control
|
git clone https://git.timssfo.com/lucca/led_control
|
||||||
cd led_control/controller
|
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
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user