Skip to content

Commit

Permalink
Choose segments with import.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ColdHeat committed Dec 22, 2017
1 parent 6381a86 commit f11b598
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions import.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
"""
python import.py export.zip challenges,teams,both,metadata
"""
from CTFd import create_app
from CTFd.utils import import_ctf

import zipfile
import sys

app = create_app()
with app.app_context():
import_ctf(sys.argv[1])
if sys.argv[2]:
segments = sys.argv[2].split(',')
else:
segments = None

import_ctf(sys.argv[1], segments=segments)

0 comments on commit f11b598

Please sign in to comment.