T0ha / ezodf

ezodf is a Python package to create new or open existing OpenDocument (ODF) files to extract, add, modify or delete document data, forked from dead project https://bitbucket.org/mozman/ezodf
Other
61 stars 23 forks source link

newdoc without doctype #27

Open buhtz opened 7 years ago

buhtz commented 7 years ago

See this from your docu

# create a new text document
doc = ezodf.newdoc(doctype='odt', filename='text.odt')
# or open an existing text document
doc = ezodf.opendoc('text.odt')

opendoc doesn't need a doctype because it recoginize it from the filename or the filecontent. newdoc shouldn't need doctype, too. Because it can recoginize the needed type from the filename suffix.

doctype should be optional (per default None)