I took the liberty of modifying the script because it didn't work for me. It's trivial to write for most people, but I remind all those who are beginners like me: on Text Generation WebUI you must activate the API extensions. In my interface I put "check" in two different rows with "api" written. Below you will find the script that I modified and which seems to work. I don't use Github much, I'm not a programmer, I don't know any programming languages. I just poked my head around the code until I figured it out. I apologize for any confusion or errors. I did my best. I don't know how to upload the .py and right now I don't have time to figure it out. Therefore the python script is in txt format.
BookParseModified.txt
I took the liberty of modifying the script because it didn't work for me. It's trivial to write for most people, but I remind all those who are beginners like me: on Text Generation WebUI you must activate the API extensions. In my interface I put "check" in two different rows with "api" written. Below you will find the script that I modified and which seems to work. I don't use Github much, I'm not a programmer, I don't know any programming languages. I just poked my head around the code until I figured it out. I apologize for any confusion or errors. I did my best. I don't know how to upload the .py and right now I don't have time to figure it out. Therefore the python script is in txt format.
BookParseModified.txt