def main():
    if (len(sys.argv) < 2):
        usage()
        sys.exit(1)
    if (not os.path.isdir(sys.argv[1])):
        print('Directory not found or not a directory:', sys.argv[1])
        print()
        usage()
        sys.exit(1)
    os.chdir(os.path.dirname(__file__))
    feeds = [line.strip() for line in open(FEEDS_FILE).readlines()]
    log((datetime.now().isoformat(' ') + ' Starting feedputter with {0} feeds'.format(len(feeds))))
    for feed in feeds:
        getter = feedputter(feed)
        getter.get_to(sys.argv[1], getter.putio)
    log((datetime.now().isoformat(' ') + ' Finished feedputter'))
def main():
    if (len(sys.argv) < 2):
        usage()
        sys.exit(1)
    if (not os.path.isdir(sys.argv[1])):
        print('Directory not found or not a directory:', sys.argv[1])
        print()
        usage()
        sys.exit(1)
    os.chdir(os.path.dirname(__file__))
    feeds = [line.strip() for line in open(FEEDS_FILE).readlines()]
    log((datetime.now().isoformat(' ') + ' Starting feedputter with {0} feeds'.format(len(feeds))))
    for feed in feeds:
        getter = feedputter(feed)
        getter.get_to(sys.argv[1], getter.putio)
    log((datetime.now().isoformat(' ') + ' Finished feedputter'))