This is a quick and dirty script I used to avoid doing a by-hand conversion for the mips processor.
Use at own risk :).
Takes in an input.txt and output.txt (see ./input.txt and ./output.txt respectively). It will read in the commands from input.txt and dump the converted binary and hex version to output.txt.
Note: If you would like to see a Py 3 version of this, let me know and I will upload it within a few hours.