Closed IntermittentlyRupert closed 5 years ago
That could be a very big job, or else an error-prone one if done using an automatic search and replace.
Agreed, and I'd also want to do #11 first, or adding future chapters will be a pain.
My thinking is that the bulk of the work can probably be scripted a bit more intelligently than a naive search-and-replace, but I need to do some experimentation to see how consistent the usage is.
The way I'd do it, at least for a first pass, would be:
This should be fairly easy to bash out a prototype and see how many cases need manual review.
Single quotes are definitely used in pairs sometimes, to highlight 'questionable' words.
Rather than building an intelligent replacement, I'd probably just start assembling patterns to pick the low hanging fruit, then see what's left and make new patterns based on that.
For example, comma-space-quote and dot-space-quote should become opening quotes, while the versions without spaces should become closing quotes. Also, a quote at the start of a line should be an opening quote. After replacing those, you might find that you still have, say, hyphen-quote, which is likely a closing quote, and quote-hyphen, which will be opening. Etc.
Turns out? Calibre has a built-in feature to do this. I'll see how it goes.
Branch is ready, just need to merge https://github.com/IntermittentlyRupert/hpnofp-ebook/pull/13 first.
Use
‘ ’ “ ”
(curly quotes) for quotes and apostrophes instead of' "
(straight quotes) like we do now.