def convert_notebook(src_path): app = NbConvertApp() app.output_files_dir = './stage/img' app.writer = FilesWriter() app.exporter = MarkdownExporter() app.convert_single_notebook(src_path)
def convert_notebook(src_path, output_img_dir): app = NbConvertApp() app.output_files_dir = output_img_dir app.writer = FilesWriter() app.exporter = MarkdownExporter() app.convert_single_notebook(src_path)