mirror of https://github.com/JohnHammond/CTFd.git
17 lines
329 B
Python
17 lines
329 B
Python
"""
|
|
python import.py export.zip challenges,teams,both,metadata
|
|
"""
|
|
from CTFd import create_app
|
|
from CTFd.utils import import_ctf
|
|
|
|
import sys
|
|
|
|
app = create_app()
|
|
with app.app_context():
|
|
if sys.argv[2]:
|
|
segments = sys.argv[2].split(',')
|
|
else:
|
|
segments = None
|
|
|
|
import_ctf(sys.argv[1], segments=segments)
|