plx-pdg / plx

Practice programming exos in a delightful Learning eXperience
https://plx.rs
Other
3 stars 0 forks source link

Feat: support external commands #118

Open samuelroland opened 1 month ago

samuelroland commented 1 month ago

Complex execution of binaries like in SYE: sh.elf with a non supported build command like cmake cmake . -Bbuild && cmake --build build/ can benefit from this.

Checking output of an external command like tree to validate a structure of folder is another benefit that could help train little tools like Yazi, Gitui and others.

TODOs

cc: @AndreCostaaa what do you think about these data structures and how this is going to be parsed by serde ?

Help

AndreCostaaa commented 1 month ago

Parsing should be ok We can easily convert test = { type = 'command', cmd = 'tree d e f', wd = 'train', swd = 'sol' } to test = { type = 'command', cmd = 'fd -e png | wc -l', expected = "1" }

By actually running the command and collecting the output on startup for instance

This could be a good way to simplify and avoid running multiple times the same command if there are multiple iterations of the exercise