View Single Post
Old 09-22-2018, 05:43 PM   #2935
rishidiams
Member
rishidiams began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Jan 2016
Device: Kindle paperwhite
capitalization

Quote:
Originally Posted by JimmXinu View Post
Not in the existing code. Nor do I see a way to add such code that is both reasonably correct and only reasonably difficult.

Well, I suppose there is a way, but it is also a bit less than 'reasonably correct', only works for English and similar languages and is ugly to boot:

Code:
add_to_replace_metadata:
 title,author=>((^| )+)a=>\1A
 title,author=>((^| )+)b=>\1B
 title,author=>((^| )+)c=>\1C
 title,author=>((^| )+)d=>\1D
 title,author=>((^| )+)e=>\1E
 title,author=>((^| )+)f=>\1F
 title,author=>((^| )+)g=>\1G
 title,author=>((^| )+)h=>\1H
 title,author=>((^| )+)i=>\1I
 title,author=>((^| )+)j=>\1J
 title,author=>((^| )+)k=>\1K
 title,author=>((^| )+)l=>\1L
 title,author=>((^| )+)m=>\1M
 title,author=>((^| )+)n=>\1N
 title,author=>((^| )+)o=>\1O
 title,author=>((^| )+)p=>\1P
 title,author=>((^| )+)q=>\1Q
 title,author=>((^| )+)r=>\1R
 title,author=>((^| )+)s=>\1S
 title,author=>((^| )+)t=>\1T
 title,author=>((^| )+)u=>\1U
 title,author=>((^| )+)v=>\1V
 title,author=>((^| )+)w=>\1W
 title,author=>((^| )+)x=>\1X
 title,author=>((^| )+)y=>\1Y
 title,author=>((^| )+)z=>\1Z
Note that articles and other short words ('of', 'a', 'an', etc) that technically shouldn't be capitalized still are using this. And only the first 'E' of 'e.e.' would be capitalized, etc, etc.

Some of those issues could be addressed with even more or more complex patterns. Those are left as an exercise for the reader.

Or fix them individually when you find one that offends you. That's what I do; example:

Code:
[https://archiveofourown.org/works/999999]
add_to_replace_metadata:
 title=>.*=>Title as I think it Should Be

I worried it would be something like that. Thanks!
rishidiams is offline   Reply With Quote