Takes a (DRM-free) Harry Potter epub file and replaces every instance of the word 'wand' with 'penis'. Inspired by this Buzzfeed listicle.
You'll need Node.js, so get that, then install the dependencies:
npm install
Then simply run the script, passing in a Harry Potter epub file as an argument. Assuming your epub files are in the same directory as the script:
node penisify.js "Chamber of Secrets.epub"
A new file named something like Chamber of Secrets.penisified.epub
will be created and the original file will remain unaltered.
Shout-out to anyone selling DRM free ebooks and allowing nonsense like this to exist.
Error handling is basically non-existent, so don't be an idiot.
I'm using a mix of sync and async zip libraries because one of the libraries is broken and not going to be fixed. Don't judge me.