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

Support extensible answer format in config model #31

Open
ogallagher opened this issue Jan 9, 2022 · 0 comments
Open

Support extensible answer format in config model #31

ogallagher opened this issue Jan 9, 2022 · 0 comments

Comments

@ogallagher
Copy link
Owner

ogallagher commented Jan 9, 2022

The wordsearch config file defines each word[-clue] answer as a colon-separated string, but if it's optionally represented with a JSON object {}, then it is more extensible. Some ideas for answer options:

  • word: string The answer word/phrase.
  • clue: string The shown clue.
  • is_template: bool Whether the answer is a template string with {arg1}, {arg2} placeholders.
  • template_values: object Values to insert into the template string.

Example:

{
    "word": "I am {number} years old",
    "clue": "I am ___ years old",
    "is_template": true,
    "template_values": {
        "number": ["one","two","three","four","five","six","seven","eight","nine","ten"]
    }
}
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

1 participant