mfontanini / presenterm

A markdown terminal slideshow tool
https://mfontanini.github.io/presenterm/
BSD 2-Clause "Simplified" License
1.19k stars 29 forks source link

feat: make snippet executors multiplatform #282

Closed mfontanini closed 2 months ago

mfontanini commented 2 months ago

Recently it was brought up in https://github.com/mfontanini/presenterm/issues/271#issuecomment-2201031920 that snippet code execution doesn't work in Windows because it used a bash script to run. This change addresses that and changes the way executors are defined entirely so that rather than being a bash script per language, they're defined in a executors.yaml file baked into the presenterm binary and can similarly be extended within the config file placed in ~/.config/presenter/config.yaml.

This makes defining executors much simpler as you have a single file with all of them and you don't have to deal with tempdirs and whatnot. Every time a snippet is executed the following now happens: