Ambrevar / demlo

[MOVED TO GITLAB] A dynamic and extensible music library organizer
https://gitlab.com/ambrevar/demlo
MIT License
11 stars 1 forks source link

Export an 'input()' and 'print()' functions to the Lua scripts #8

Open Ambrevar opened 6 years ago

Ambrevar commented 6 years ago

Mentioned in #4.

Sometimes it could be handy to make Demlo's process more interactive.

A script could ask the user to enter a value with func input(prompt string) string.

Example: when a disc number is found, ask the user if we should ignore it for the current album or not.

Some input functions could be recurring (booleans, number queries). Add input_bool and input_number?

fictionic commented 6 years ago

I do think input_bool and input_number would be good additions. Reduce code duplication around interpreting the various responses that mean "yes", like y, Y, yes, and possibly the empty string. Maybe allow input_bool to accept an argument for whether or not the empty string should count as a yes or a no?

Ambrevar commented 6 years ago

Mentioned in #7: Beside or instead of debug, export a printing primitive with color support.

fictionic commented 6 years ago

I'm in favor!