Using Python to read a text file, and split into individual markdown files
I have a big honkin' file tmp.md
that contains the entire 1689 Second London Baptist Confession in Markdown. Each of the Chapters are marked by # Chapter (Numeral)
. Using that marker, I wanted to divide each of the chapters into individual markdown files named 1689-(Numeral)-0-index.md
.
I tried to do this in bash to no avail. Python seemed to be better suited to the task.