I used the script and noticed some problems, so I fixed them:
the file has the extension .sh but the shebang is /bin/bash, this prevented execution via sh, so I removed the bashisms and fixed the shebang, it still works even with bash
the python command in some distributions, such as on Debian, is replaced by python2 and python3, I know that some derived distributions configure an alias but in case it is not present so the script simply did not work, so I managed the presence of both, giving priority to python3 given the recent rewrite for python3, this should reduce the chance of it running under python2 in case this is the default alias for the python command
I discovered just by running the script that node is a requirement, so I added a dependency check at the beginning of the script
I noticed that when converting from a tm theme to a jb one, sometimes an exception is thrown when reading the file, I didn't want to investigate much and I simply suppressed the exception handling
I took the opportunity to reformat the python script using Black
I used the script and noticed some problems, so I fixed them:
I hope it can be useful