abcminiuser / python-elgato-streamdeck

Python library to control the Elgato Stream Deck.
Other
903 stars 134 forks source link

Adding a higher level support for config files #111

Closed DidierMalenfant closed 1 year ago

DidierMalenfant commented 1 year ago

I'm toying with the idea of writing a higher level layer which would read a simple toml config file and use this to populate the buttons and dispatch their actions. Something like:

[MainPage]
Button1Icon = "myicon.png"
Button1Text = "Launch!"
Button1Action = MyClass.launch
Button2Icon = ...

The main point of doing this would be not just to make it easier to write layouts for the stream deck but also to implement folders, akin to the ones provided by the stream deck app itself.

Is there any interest in having this included in this project as a higher level option and submit it as a PR, or should I just write it as a module which uses this one to implement its interactions with the stream deck?

abcminiuser commented 1 year ago

Hi @DidierMalenfant - that sort of thing is probably outside of the scope of the base library. My intention was to create a generic foundation that others could then use to create their own higher level systems, so I didn't lock anyone into an unwanted use-case.

There's a few such apps around; I have my https://github.com/abcminiuser/python-homeassistant-streamdeck and there's https://github.com/timothycrosley/streamdeck-ui just to name two.

DidierMalenfant commented 1 year ago

I wasn't considering a full blown app though, just a higher level python API to populate the stream deck more easily using this API and a config file.

I understand the goal to keep this one simple though so I will just develop a new Python module that will use this one.

Thanks for the great work on this by the way!

DidierMalenfant commented 1 year ago

If anyone is interested, I wrote the library and made it available here and via pip install StreamDeskLayoutManager.