IntermittentlyRupert / hpnofp-ebook

An eBook version of Harry Potter and the Nightmares of Futures Past by Matthew Schocke.
27 stars 10 forks source link

Move to curly quotes #10

Closed IntermittentlyRupert closed 5 years ago

IntermittentlyRupert commented 5 years ago

Use ‘ ’ “ ” (curly quotes) for quotes and apostrophes instead of ' " (straight quotes) like we do now.

ThrawnCA commented 5 years ago

That could be a very big job, or else an error-prone one if done using an automatic search and replace.

IntermittentlyRupert commented 5 years ago

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.

ThrawnCA commented 5 years ago

Single quotes are definitely used in pairs sometimes, to highlight 'questionable' words.

ThrawnCA commented 5 years ago

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.

ThrawnCA commented 5 years ago

Turns out? Calibre has a built-in feature to do this. I'll see how it goes.

ThrawnCA commented 5 years ago

Branch is ready, just need to merge https://github.com/IntermittentlyRupert/hpnofp-ebook/pull/13 first.