#! /usr/bin/env python3

import sys
import signal
import logging
import argparse

parser = argparse.ArgumentParser(description=sys.argv[0])
parser.add_argument('-n', '-l', '--names', '--list', action='store_true', help='List names')
parser.add_argument('-v', '--verbose', action='count', help='Enable debugging')
args = parser.parse_args()

logging.basicConfig(format='%(asctime)s %(levelname)s %(pathname)s:%(lineno)d %(msg)s')
log = logging.getLogger()
log.setLevel(logging.WARNING - (args.verbose or 0)*10)

signal.signal(signal.SIGPIPE, lambda signum, stack_frame: exit(0))

print(f'args: {args}')
