How to obtain name of practice exercise programatically?

Hi exercists!
Is there a way to obtain name of practice exercise programatically - via configlet? On Pharo track: the name of exercise is generated from slug name, which not always fits to the desired name (replacing dashes with spaces and capitalizing words). Pharo track config.json specific auto-generation causes overwrite of manually modified name entries in config.json (which is unwanted).
I found that problem specifications includes name in exercises/slug-name/metadata.toml on first line, e.g.: title = "OCR Numbers".
I just don’t want to necessarily have dependency on Pharo track on problem-specifications repo, configlet binary should be enough for generating specific metadata files I hope.
Thanks!

Taking my question back. Exercise generator already depends on problem-specifications (constructor expects directory). So I will use metadata.toml title information.

3 Likes

FWIW, this is what most tracks do that need that information :slight_smile:

Right! Fixed title in config.json PR here (I kept existing fallback, for exercises that aren’t regenerated yet): Added title generation from exercise problem specification metadata .… · Bajger/pharo-smalltalk@f698fe2 · GitHub

3 Likes