#!/usr/bin/env python
import os
import sys
from convertAndPrint import convertAndPrint

files = []
if not len(sys.argv[1:]):
    files.append('-')
else:
    files = sys.argv[1:]

for f in files:
    if os.path.isfile(f):
        convertAndPrint(open(f))
    elif f == '-':
        convertAndPrint(sys.stdin)
    else:
        print 'error opening file' + f

