question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Import challenges from Markdown

See original GitHub issue

We are in the process of making a lot of challenges, and would be hosting the same CTF in different locations. One option is to add all the challenges to an instance, and then clone/backup the database before use.

However, it would be cool to be able to import challenges from Markdown files. In my opinion it makes more sense to keep the challenges in a challenges directory as markdown files (so we can use Git to manage them).

YAML frontmatter would be a good option, as you could write the challenge text in markdown, and then have a YAML section on top with title, slug, value, flags/flagRegex and such. The only problem would be to add files… But I guess having a “Import from markdown” button on the New Challenge page would work to prefill things from the markdown file, and then add the files you want yourself. [1]

[1] https://github.com/eyeseast/python-frontmatter

Does that sound like a good idea?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
nategrafcommented, Oct 8, 2017

Sorry for the late response!

It’s been moved to here! https://github.com/tamuctf/ctfd-portable-challenges-plugin

Let me know if it’s not immediately obvious how to use them. The aim is to have them be usable by anyone, so if you can’t figure it out I want to fix them!

Also I made it for v1.0.0, and it may not work with the newest formats. I don’t know because I’ve been temporarily away from this project since may while I’ve been transitioning in living situations.

1reaction
nategrafcommented, Feb 21, 2017

I actually recently fished a couple scripts to do just this. It currently supports YAML import and export. They are a part of my teams WIP fork of CTFd, TAMUctf.

To use these script go ahead and download, import-chal.py and export-chal.py and put them in the base of your CTFd repo. (They work elsewhere, but are preconfigured to work there without passing in any args)

Call ./export-chal.py to take all the challeneges and files from your DB and put it into a YAML file and directory. Call ./import-chal.py to put all those challeneges back. The YAML file follows the this spec.

I’d appreciate any feedback or issues you find with the script, and I’m on the CTFd.io slack channel if your ever want to chat!

Read more comments on GitHub >

github_iconTop Results From Across the Web

CSV import - markdown description fail
Migrating Clubhouse.io stories via CSV to JIRA seems to go quite smooth. However, the description field formatting does not import correctly.
Read more >
Import Markdown files into a project
Select the desired folder in which you want to import the Markdown (.md) file. Then, select File > Import > Markdown File.
Read more >
An in-depth look at MadCap Flare 2021's New Markdown ...
MadCap Flare's first major new release of 2021 includes, among other new features, the ability to import Markdown files.
Read more >
Product Update : Import Markdown Archives ⬆️
🎉 You can import Markdown archives to Scrintal​​ The cards will have the #imported tag, and will be placed in a board. It's...
Read more >
Thoughts On Markdown
In this article, Knut shares his advice against Markdown by ... stuck with markdown to solve problems that are way beyond its design...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found