Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Ambrevar opened this issue Jan 19, 2018 · 3 comments
Open

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

Ambrevar opened this issue Jan 19, 2018 · 3 comments

Comments

@Ambrevar
Copy link
Owner

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
Copy link

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 Ambrevar changed the title Export an 'input()' function to the Lua scripts Export an 'input()' and 'print()' functions to the Lua scripts Mar 17, 2018
@Ambrevar
Copy link
Owner Author

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

@fictionic
Copy link

I'm in favor!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants