Quick Reformatting of Terrible E-Books
I've been thinking, and as I don't actually know perl myself I'm unable to write the script for it, but a script that did the following would be amazingly useful in formatting eBooks for viewing on mobile devices.
Scan all files in a directory (and subdirectories, hey, why not) and replace all instances of <newline> not immediately followed by either <newline> or <tab> with a single space.
Reasoning behind this: I've seen entirely too many eBooks formatted such that they use manual line breaks instead of using the word wrap feature, and when transferred to a mobile device, you end up with fragmented lines:
"This is a bunch of text serving as example of
wrap due to stupid formatting of eBooks. I really
wish there was
some way to fix it, because it's almost impossible
to read this
terribly formatted text."
Can anyone think of any files they have that this command would damage? I wouldn't want to run it on poetry, but other than that, it seems that this script can be safely run on normally-formatted eBooks without changing anything.