def METHOD_NAME(dir, name=None):
	'''Initialize a new notebook in a directory'''
	from .notebook import NotebookConfig
	dir.touch()
	config = NotebookConfig(dir.file('notebook.zim'))
	config['Notebook']['name'] = name or dir.basename
	config.write()