aedocw / epub2tts-edge

epub2tts-edge uses Microsoft Edge cloud-based TTS to create a full featured audiobook m4b from an epub or text file
GNU General Public License v3.0
77 stars 13 forks source link

Crash if txt does not start with chapter line #22

Closed aedocw closed 4 months ago

aedocw commented 4 months ago

Normally when a text file is created by exporting from epub, a chapter line like # Part 1 is inserted a few lines after the Title and Author lines. In a recent test I discovered that the script will crash if that line is missing.

The script should handle that gracefully by detecting that and inserting a chapter called blank or something like that.