catleeball / tmnt_wikipedia_bot

Find Wikipedia titles that can be sung to the Teenage Mutant Ninja Turtles themesong.
MIT License
143 stars 23 forks source link

Updated paren handling #5

Open metasj opened 5 years ago

metasj commented 5 years ago

Phrases ending in a two-word phrase in parens: the whole phrase should be the subtitle.

metasj commented 5 years ago

Phrases ending in a single-word phrase in parens: just the last word in parens should be the subtitle.

catleeball commented 5 years ago

This would be cool. We'll need to pay close attention to logo generation; long 'turtles' text will wrap when it exceeds the size of the headless chrome window. Some of the image logic may need to be tweaked to accommodate longer 'turtles' text.

sydneyfalk commented 5 years ago

Oftentimes Wikipedia's formats for title handling isn't how the target form would (i.e., a TV show title screen). Maybe replace parenthetical stuff with comma'd phrases.

So (let's say) the title "Morton Downey Jr. (show host)" shouldn't really have parentheses at all at that point. For a title screen it'd probably be "Morton Downey Jr., Show Host" if grammatically necessary but with "morton downey jr." in the top, really, the bottom would just need to drop parentheses to be visually distinct.

I also wanted to mention that locales might benefit from special handling in some cases, since Wikipedia treats US states and Japanese districts/prefectures/etc. in ways (using parentheses as well!) that also wouldn't fit the target media's style. Detecting a list of such things inside parentheses might just shift it so it's "comma style", like "Wexler County, Texas Schools" instead of "Wexler County Schools (Texas)". (And to clarify, I do think the original 'title text' above should remain the same, this is only for the image text. It'd really just add a little more to the end result than anything else.)

Just thoughts for the future. ^_^ If I manage to figure out how the code works at some point, I may attempt to submit a PR or two.