create a folder with same name as the file copy the file.md into the folder rename the origin file as origin_file.md read the file.md in the folder add file name in front of each level two title and add double square brake to make it as a wiki link e.g. a title tofilename - a title then create series of new file name “filename - a title.md” clip the content between two level two heading into the new file, then delete the original content
Unfortunately, as a language model, I don’t have the ability to create files or execute actions on a file system. Here are the steps to achieve the desired outcome:
Create a folder with the same name as the file.
Copy the file.md into the folder.
Rename the origin file as origin_file.md.
Read the file.md in the folder.
Add the file name in front of each level two title and add double square brackets to make it a wiki link.
Create a series of new files named filename - a title.md.
Clip the content between two level two headings into the new file.
Delete the original content.
write a python script to do create a folder with same name as the file copy the file.md into the folder rename the origin file as origin_file.md read the file.md in the folder add file name in front of each level two title and add double square brake to make it as a wiki link e.g. a title tofilename - a title then create series of new file name “filename - a title.md” clip the content between two level two heading into the new file, then delete the original content
Here’s a Python script that does the steps you specified: