Initial conversion of docvert to Python3