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

Consider using KDL instead of TOML #8

Open
sudoBash418 opened this issue Feb 20, 2023 · 0 comments
Open

Consider using KDL instead of TOML #8

sudoBash418 opened this issue Feb 20, 2023 · 0 comments

Comments

@sudoBash418
Copy link
Member

sudoBash418 commented Feb 20, 2023

KDL is a document language (think XML) which may be a better alternative to the challenge.toml files we use right now.
Challenges are essentially documents, and a couple of examples

Splitting the description into a standalone Markdown file might also help a lot (whether we switch to KDL or stick with TOML).


Example challenge definition in TOML:

[meta]
id = "my-challenge"
name = "My Challenge"
author = "sudoBash418"
description = """
This is a simple demo challenge.  
Challenge descriptions support *Markdown*.

Here's a [link](https://example.com).
"""
flag = "flag{d3m0_fl4g}"
difficulty = "easy"
tags = ["Example", "Demonstration", "Not A Real Challenge"]

[[hints]]
# Short, single-line hint
content = "Here's the first hint."

[[hints]]
# Multi-line hint
content = """
Here's another hint.
This one has multiple lines.
"""

[files]
include = [
    "source/example.bin",
]
rm_prefixes = ["source/"]
make_archive = false

Example challenge definition in KDL:

// note: this example uses "flattened" metadata, but using a "meta" node would work as well
id "my-challenge"
name "My Challenge"
author "sudoBash418"
description = r#"
This is a simple demo challenge.  
Challenge descriptions support *Markdown*.

Here's a [link](https://example.com).
"#
flag "flag{d3m0_fl4g}"
difficulty "easy"
tag "Example"
tag "Demonstration"
tag "Not A Real Challenge"

// Short, single-line hint
hint "Here's the first hint."
// Multi-line hint
hint r#"
Here's another hint.
This one has multiple lines.
"#

files archive=False {
    include "source/example.bin" rm_prefix=1  // note: this example uses per-include prefix stripping, not global prefix stripping
}
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