# Path: taxtastic/scripts/taxit.py
# def main(argv=None):
#     argv = argv or sys.argv[1:]
#     action, arguments = parse_arguments(argv)
# 
#     loglevel = {
#         0: logging.ERROR,
#         1: logging.WARNING,
#         2: logging.INFO,
#         3: logging.DEBUG,
#     }.get(arguments.verbosity, logging.DEBUG)
# 
#     if arguments.verbosity > 1:
#         logformat = '%(levelname)s %(module)s %(lineno)s %(message)s'
#     else:
#         logformat = '%(message)s'
# 
#     # set up logging
#     logging.basicConfig(stream=sys.stderr, format=logformat, level=loglevel)
# 
#     try:
#         return action(arguments)
#     finally:
#         subcommands.close_all_files(arguments)


import contextlib
import os
import sys
import logging
import re
import unittest
import shutil
import tempfile
import subprocess
from io import StringIO
from os import path
from taxtastic.scripts.taxit import main




log = logging


def funcname(idstr):
    return '.'.join(idstr.split('.')[1:])


# set verbosity of logging output
try:
    logflag = re.findall(r'-[vq]+\b', ' '.join(sys.argv[1:]))[0]
except IndexError:
    logflag = ''

logging.basicConfig(
    stream=sys.stdout,
    format='%(levelname)s %(module)s %(lineno)s %(message)s'
    if logflag.startswith('-v') else '%(message)s',
    level={'': logging.CRITICAL,
           '-q': logging.CRITICAL,
           '-v': logging.WARNING,
           '-vv': logging.INFO,
           '-vvv': logging.DEBUG}.get(logflag)
)

# module data
datadir = path.abspath(path.join(path.dirname(__file__), '..', 'testfiles'))

# Path: taxtastic/scripts/taxit.py
# def main(argv=None):
#     argv = argv or sys.argv[1:]
#     action, arguments = parse_arguments(argv)
# 
#     loglevel = {
#         0: logging.ERROR,
#         1: logging.WARNING,
#         2: logging.INFO,
#         3: logging.DEBUG,
#     }.get(arguments.verbosity, logging.DEBUG)
# 
#     if arguments.verbosity > 1:
#         logformat = '%(levelname)s %(module)s %(lineno)s %(message)s'
#     else:
#         logformat = '%(message)s'
# 
#     # set up logging
#     logging.basicConfig(stream=sys.stderr, format=logformat, level=loglevel)
# 
#     try:
#         return action(arguments)
#     finally:
#         subcommands.close_all_files(arguments)


# Path: tests/config.py
import contextlib
import os
import sys
import logging
import re
import unittest
import shutil
import tempfile
import subprocess
from io import StringIO
from os import path
from taxtastic.scripts.taxit import main





log = logging


def funcname(idstr):
    return '.'.join(idstr.split('.')[1:])


# set verbosity of logging output
try:
    logflag = re.findall(r'-[vq]+\b', ' '.join(sys.argv[1:]))[0]
except IndexError:
    logflag = ''

logging.basicConfig(
    stream=sys.stdout,
    format='%(levelname)s %(module)s %(lineno)s %(message)s'
    if logflag.startswith('-v') else '%(message)s',
    level={'': logging.CRITICAL,
           '-q': logging.CRITICAL,
           '-v': logging.WARNING,
           '-vv': logging.INFO,
           '-vvv': logging.DEBUG}.get(logflag)
)

# module data
datadir = path.abspath(path.join(path.dirname(__file__), '..', 'testfiles'))

outputdir = path.abspath(