Convert to python package and a django management commmand.  Needs testing.