This function sets up a command-line option parser and then calls match_and_print
    to do all of the real work.

def main(argv):
    """This function sets up a command-line option parser and then calls match_and_print
    to do all of the real work.
    """
    import argparse
    import codecs
    # have to be ready to deal with utf-8 names
    out = codecs.getwriter('utf-8')(sys.stdout)

    description = 'Uses Open Tree of Life web services to find information for each OTT ID.'
    parser = argparse.ArgumentParser(prog='ot-taxon-info', description=description)
    parser.add_argument('ids', nargs='+', type=int, help='OTT IDs')
    parser.add_argument('--include-lineage', action='store_true', default=False, required=False,
                        help='list the IDs of the ancestors as well.')
    # uncomment when https://github.com/OpenTreeOfLife/taxomachine/issues/89 is fixed @TEMP
    # parser.add_argument('--list-tips', action='store_true', default=False, required=False,
    #                    help='list the tips in the subtree rooted by this taxon.')
    args = parser.parse_args(argv)
    id_list = args.ids
    list_tips = False  # args.list_tips once https://github.com/OpenTreeOfLife/taxomachine/issues/89 is fixed @TEMP
    fetch_and_write_taxon_info(id_list, args.include_lineage, list_tips, out)