mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-17 05:54:19 +01:00
Choose segments with import.py
This commit is contained in:
11
import.py
11
import.py
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user