Browse Source

feat: Adding inital code for Musikautomat

Matthias Ladkau 9 months ago
parent
commit
77f939345e

+ 6 - 0
.gitignore

@@ -0,0 +1,6 @@
+/musikautomat/bin
+/musikautomat/include
+/musikautomat/lib
+/musikautomat/lib64
+/musikautomat/share
+/musikautomat/pyvenv.cfg

+ 21 - 0
musikautomat/README.md

@@ -0,0 +1,21 @@
+Setup:
+--
+Install:
+- python3 (version >3.6)
+- python3-pip
+- python3-venv
+
+Setup virtual environment:
+```
+python3 -m venv .
+```
+
+Install dependencies:
+```
+./bin/pip3 install -r requirements.txt
+```
+
+Freeze dependencies:
+```
+./bin/pip3 freeze > requirements.txt
+```

+ 2 - 0
musikautomat/config.yml

@@ -0,0 +1,2 @@
+# Frame buffer device to use for output
+fbdev: /dev/fb2

+ 36 - 0
musikautomat/main.py

@@ -0,0 +1,36 @@
+#!./bin/python3
+
+import sys,os
+import yaml
+
+os.environ['PYGAME_HIDE_SUPPORT_PROMPT'] = "hide"
+import pygame
+from pygame.locals import *
+
+# Configuration
+config = yaml.safe_load(open("config.yml"))
+
+cfg_fbdev = config.get("fbdev", "/dev/fb1")
+
+def out(o: str):
+    print("-->", o)
+
+out("Hello %s" % cfg_fbdev)
+
+# Initialise pygame
+
+pygame.init()
+
+# Create the display
+
+dsp = pygame.display.set_mode((128, 160), 0, 32)
+pygame.display.set_caption('Musikautomat')
+
+# Run the game loop
+
+while True:
+    for event in pygame.event.get():
+        if event.type == QUIT:
+            pygame.quit()
+            sys.exit()
+    pygame.display.update()

+ 3 - 0
musikautomat/requirements.txt

@@ -0,0 +1,3 @@
+pkg-resources==0.0.0
+pygame==1.9.6
+PyYAML==5.1.2

display_test/install.txt → old/display_test/install.txt


display_test/test.py → old/display_test/test.py


streaming-client/v1/client.py → old/streaming-client/client.py


streaming-client/v1/install.txt → old/streaming-client/install.txt


streaming-client/v1/mplayer_ctl.py → old/streaming-client/mplayer_ctl.py


streaming-client/v1/web/index.html → old/streaming-client/web/index.html


streaming-client/v1/web/spectre/LICENSE → old/streaming-client/web/spectre/LICENSE


streaming-client/v1/web/spectre/spectre-exp.min.css → old/streaming-client/web/spectre/spectre-exp.min.css


streaming-client/v1/web/spectre/spectre-icons.min.css → old/streaming-client/web/spectre/spectre-icons.min.css


streaming-client/v1/web/spectre/spectre.min.css → old/streaming-client/web/spectre/spectre.min.css


streaming-client/v1/web/thumbnail/radio.xcf → old/streaming-client/web/thumbnail/radio.xcf


streaming-client/v1/web/thumbnail/radio_128.png → old/streaming-client/web/thumbnail/radio_128.png


streaming-client/v1/web/thumbnail/radio_16.gif → old/streaming-client/web/thumbnail/radio_16.gif


streaming-client/v1/web/thumbnail/radio_192.png → old/streaming-client/web/thumbnail/radio_192.png