def list_notebooks(self):
names = glob.glob(os.path.join(self.notebook_dir,<EOL>'<STR_LIT:*>' + self.filename_ext))<EOL>names = [os.path.splitext(os.path.basename(name))[<NUM_LIT:0>]<EOL>for name in names]<EOL>data = []<EOL>for name in names:<EOL><INDENT>if name not in self.rev_mapping:<EOL><INDENT>notebook_id = self.new_notebook_id(name)<EOL><DEDENT>else:<EOL><INDENT>notebook_id = self.rev_mapping[name]<EOL><DEDENT>data.append(dict(notebook_id=notebook_id,name=name))<EOL><DEDENT>data = sorted(data, key=lambda item: item['<STR_LIT:name>'])<EOL>return data<EOL>
List all notebooks in the notebook dir.

        This returns a list of dicts of the form::

            dict(notebook_id=notebook,name=name)