Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add {{nobots}} helper function #45

Open
legoktm opened this issue Feb 17, 2021 · 2 comments
Open

Add {{nobots}} helper function #45

legoktm opened this issue Feb 17, 2021 · 2 comments

Comments

@legoktm
Copy link
Contributor

legoktm commented Feb 17, 2021

The specification is documented at https://en.wikipedia.org/wiki/Template:Bots

I'd expect a function signature of

fn bot_may_edit(wikitext: &str, bot: &str) -> bool { ... }

This probably warrants going in its own module, maybe behind a feature since it'll probably add a dependency on regex.

@magnusmanske
Copy link
Owner

Also, this would tie the crate to Wikipedia/Wikimedia, where until here it's mostly agnostic...

@legoktm
Copy link
Contributor Author

legoktm commented Nov 16, 2021

I've seen it used on other wikis, it's more of a template specification than anything else. In any case, https://gitlab.com/mwbot-rs/mwbot/-/blob/master/mwbot/src/utils.rs is what I implemented using Parsoid HTML.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants