Open chemputer opened 2 years ago
I'll look into doing this when I have a chance. Do you have any preferences for file types? It just supports txt right now so can have some specifics for the book. Maybe epub would be easier to work with, haven't looked into it yet. LOTR has books within the book. And has chapter names under the chapter number:
Chapter 1
Many Meetings
so I tailored for that but have made a new branch to be a little more generic. This will give me a good excuse to read The Expanse.
Definitely worth reading it! And especially now as the last novella has come out, so it's officially done.
Looking at the file types, I think epub might be the easiest to be generic with, since it has a structure that lists the chapter # and name, and more metadata. The Expanse uses names, so it'll go back and forth between various POVs, and it doesn't use numbers (at least I don't recall it using them), so it's just alternating between Holden and Miller for the first book, for example.
I've added a commit to https://github.com/robmcelhinney/MiddleEarthSearch/tree/generalise-json and just merged it into master so that it now works fine with a Fellowship of the Ring epub. I did a quick test with Leviathon Wakes epub and that seems fine too: https://imgur.com/a/6r6IaCW It will require changes to the Website UI & Search for specific books but that's relatively easy. If you've any questions let me know.
I'd personally like to make a site exactly like this for The Expanse series, and in doing so I'll need to edit the python file that creates the JSON file. If I do that, I'd like to try to generalize it so that someone could, with minimal changes, make a site for a different series.
This project is quite neat, I realize it's been a couple years since you've touched it, but if you have some spare time, I'd greatly appreciate some recommendations.