sopel-irc / sopel

:robot::speech_balloon: An easy-to-use and highly extensible IRC Bot framework. Formerly Willie.
https://sopel.chat
Other
951 stars 405 forks source link

pronouns: fetching list should also use custom backend #2599

Open dgw opened 3 months ago

dgw commented 3 months ago

Despite making the link_base_url customizable, the plugin is still hardcoded to fetch the actual list of pronoun sets from our repo:

https://github.com/sopel-irc/sopel/blob/973a489355540d68b95db01a49e983ac7a740bcc/sopel/builtins/pronouns.py#L77-L78

This should be changed to use the custom backend instead, in case people want to customize the pronoun sets available through their own self-hosted instance.

Note: This might require some not-insignificant amount of work, as the site doesn't appear to expose the pronoun data in a way that's anywhere near as simple to read as the .tab file in the Git repo. The most efficient approach might be to let the user specify two values, one for the URL base and a second pointing at the plaintext pronoun list.

dgw commented 3 months ago

In the spirit of taking what should be a simple issue and making it complicated, I looked around a bit and found https://pronouns.within.lgbt/ / https://github.com/Xe/pronouns. The advantage vs. our current backend is that it actually has an API, which is relevant to this issue because there is an /api/all route that would replace fetching the .tab file from GH.

It's obviously harder for us to spin up a project-owned instance, though. Our current Svelte app pretty much Just Works if you toss the code up on Netlify or something (the static-site hosts are all pretty good at figuring out how to handle JS webapps). This alternative would require a Docker container host if we want to migrate pronouns.sopel.chat onto it.

dgw commented 3 months ago

Quick follow-up: I figured out how to get a free instance of Xe/pronouns running on Render in about 30 minutes. Next step would be examining the license (Edit: It's using the JSON License.) and getting permission (if needed) to maintain a fork with our own domain in the examples and our project's contact info in the error pages etc. where it appears.

Could also see if upstream is interested in making those values configurable; it all depends on their attitude toward others self-hosting their own instances (whether lower traffic to the main instance is seen as "taking away" or "load balancing", basically).

dgw commented 3 months ago

Upstream is totally interested in configurability. 🥳 Above issue mention is me writing out the detailed ideas, after getting preliminary buy-in via a Mastodon conversation (linked there).