Add support for Elantris annotations #32
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It adds two scripts:
elantris-annotations
, which will create an eBook consisting only of the annotations, andannotate-elantris
, which will take a provided Elantris EPUB and add the annotations to the end, as well as adding a link to the annotations for each chapter at the start and end of each chapter (and links back to the chapter in the annotation).Few things:
One, code's probably messy. Never been great at coding, haven't touched coding in months, and have never used Ruby. So uh, if something's terrible, please point it out to me lol.
Two, it requires you to put the EPUB in a folder within the program's files, which I don't think works with Docker. Not sure how to get it to take a filename as input or anything. So for now, you have to download the repo and run the Ruby file directly.
Three, no idea how generalizable it is or isn't for other books, or even other editions of Elantris. It definitely will require tweaking for other books, and possibly even for other versions of Elantris, but not super sure how much effort it takes. Might look into that over the next few days.
Also, not super sure on if a license thing needs to be put somewhere for rubyzip or the rubyzip sample.