#!/home/hunting/projects/trunity_importer/.env/bin/python

import argparse

from trunity_importer.utils import check_and_get_creds
from trunity_importer.qti import Importer


arg_parser = argparse.ArgumentParser()

subparsers = arg_parser.add_subparsers(help='Available importers')

qti_parser = subparsers.add_parser('qti', help='Imports QTI zip file')
qti_parser.add_argument('zip_file')

CREDS = check_and_get_creds()

args = arg_parser.parse_args()


book_id = input('Site id you want to import to: ')

Importer(
    username=CREDS.username,
    password=CREDS.password,
    book_id=int(book_id),
    path_to_zip=args.zip_file,
).perform_import()



