It's nothing too complicated:
The value of $STREAMER_APP defines which set of scripts is run.
Each script must exist and be written in Bash.
All 3 scripts are run on each virtual tuning cycle.
Generally:
Use prebmitune.sh to confirm adb connectivity and wake your device (if needed).
Use bmitune.sh to do the virtual tuning.
Use stopbmitune.sh to stop the streaming and put your device to sleep (if needed).
Each script is passed the value of $TUNERx_IP and whatever the value is after the last slash in the URL for that virtual channel in the M3U. Note that for historical reasons those arguments switch order in bmitune.sh.
Super simple, but also very flexible, as you'll see if you explore the various scripts in the repo. As I understand your requirements, something like those that were done for scripts/allente/livetv may be about all you'll need. There's always an M3U file as well, for each set of scripts, so have a look at allente.m3u to model that.