def save_as_ezeml_package_export(archive_file):
    current_document = current_user.get_filename()
    if (not current_document):
        raise FileNotFoundError
    user_folder = user_data.get_user_folder_name()
    timestamp = ((datetime.now().date().strftime('%Y_%m_%d') + '_') + datetime.now().time().strftime('%H_%M_%S'))
    export_folder = os.path.join(user_folder, 'exports', current_document, timestamp)
    os.makedirs(export_folder, exist_ok=True)
    (_, archive_basename) = os.path.split(archive_file)
    src = archive_file
    dest = f'{export_folder}/{archive_basename}'
    copyfile(src, dest)
    parsed_url = urlparse(request.base_url)
    download_url = f'{parsed_url.scheme}://{parsed_url.netloc}/{dest}'
    return (archive_basename, download_url)
def save_as_ezeml_package_export(archive_file):
    current_document = current_user.get_filename()
    if (not current_document):
        raise FileNotFoundError
    user_folder = user_data.get_user_folder_name()
    timestamp = ((datetime.now().date().strftime('%Y_%m_%d') + '_') + datetime.now().time().strftime('%H_%M_%S'))
    export_folder = os.path.join(user_folder, 'exports', current_document, timestamp)
    os.makedirs(export_folder, exist_ok=True)
    (_, archive_basename) = os.path.split(archive_file)
    src = archive_file
    dest = f'{export_folder}/{archive_basename}'
    copyfile(src, dest)
    parsed_url = urlparse(request.base_url)
    download_url = f'{parsed_url.scheme}://{parsed_url.netloc}/{dest}'
    return (archive_basename, download_url)