I was reviewing the source code recently to figure out test cases for issue #29 and I realized something. At the end of each function, a new file is opened and then writes the results to the new file. This operation appears multiple times throughout the functions. So, it makes sense to refactor this so that instead of having this duplicate code, it be put some where that's easily accessible for anyone to use. Maybe in its own file and function? Also, this operation should happen in main.py so that each function is only responsible for conversion and not writing to a file. We could also use this for easy try-catch handling too.
I was reviewing the source code recently to figure out test cases for issue #29 and I realized something. At the end of each function, a new file is opened and then writes the results to the new file. This operation appears multiple times throughout the functions. So, it makes sense to refactor this so that instead of having this duplicate code, it be put some where that's easily accessible for anyone to use. Maybe in its own file and function? Also, this operation should happen in
main.pyso that each function is only responsible for conversion and not writing to a file. We could also use this for easytry-catchhandling too.