How to create a KODI entry to run a script?

Okay, so this is threefold:

  • Your bash script, already in place /home/osmc/bin/getstreamlist
  • The python script, create /home/osmc/bin/getstreamlistwrapper.py
#!/usr/bin/env python3

import subprocess
subprocess.run(["/home/osmc/bin/getstreamlist", "R"])

Ive done something similar, using the osmc skin you can just add an entry to the sub menu of one of the main menu items…eg, Settings.
From there you can select ‘Change action’, then ‘Custom item’, then enter:

XBMC.RunScript(/home/osmc/bin/getstreamlistwrapper.py)