made it a function

can now tell it which file to convert from the command line. I am sure
this isn’t the most pythonic way of doing this. But it works.