File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -58,12 +58,12 @@ def notebook_to_mdx_command(args):
5858 src_path = Path (args .notebook_src ).resolve ()
5959 src_dir = src_path .parent if src_path .is_file () else src_path
6060 notebook_paths = [src_path ] if src_path .is_file () else [* src_dir .glob ("**/*.ipynb" )]
61- output_dir = src_dir if args .output_dir is None else Path (args .output_dir ).resolve ()
6261
6362 for notebook_path in tqdm (notebook_paths , desc = "Converting .ipynb files to .md files" ):
6463 notebook = nbformat .read (notebook_path , as_version = 4 )
6564 mdx_content = notebook_to_mdx (notebook , args .max_len )
6665 mdx_file_name = notebook_path .name [: - len (".ipynb" )] + ".md"
66+ output_dir = notebook_path .parent if args .output_dir is None else Path (args .output_dir ).resolve ()
6767 dest_file_path = output_dir / mdx_file_name
6868 with open (dest_file_path , "w" , encoding = "utf-8" ) as f :
6969 f .write (mdx_content )
You can’t perform that action at this time.
0 commit comments