jmilldotdev / obsidian-wikipedia

Grabs information from Wikipedia for a topic and brings it into Obsidian notes
MIT License
102 stars 16 forks source link

Make searching for the Wikipedia title case-insensitive #12

Open evanharmon1 opened 1 year ago

evanharmon1 commented 1 year ago

E.g.: if I invoke the plugin from an Obsidian page named Synoptic Philosophy, the plugin says there is no Wikipedia page found. But if I change my Obsidian page to Synoptic philosophy the plugin successfully finds Synoptic philosophy - Wikipedia.

The default should be case-insensitive in my opinion, but there should at least be an option to allow for case-insensitivity.

evanharmon1 commented 1 year ago

Actually, this appears to partially be an issue with the Wikipedia API. I think the failures I am seeing are when there is not a specific redirect in Wikipedia for a given case-mismatch. E.g. Woozle effect - Wikipedia worked from an Obsidian page named either Woozle Effect or Woozle effect I think due to the existence of this extant Wikipedia redirect - https://en.wikipedia.org/w/index.php?title=Woozle_Effect&redirect=no.

However, it would be super useful to have this plugin try a permutation of cases in order to successfully find the somewhat numerous Wikipedia pages that don't have redirects for normal case mismatches.