Help updating a wikimedia-editing tool written in Rust

There's a tool written in Rust that I'm trying to activate on an additional site. It's basically doiung text manipulation and API calls.

My question is: somewhere in its github files, it's being configured to run only on a few different language wikipedias, wikicommons, wikispecies and wikisource. I want to also add Wikiversity to that list. However I don't speak enough Rust to work out what needs to be changed.

I realise this is a pretty nebulous request, but I don't speak enough Rust to formulate it better! Any assistance/ideas welcomed,

After a cursory look at a small portion of the code, based upon some searches, I am left with the impression that the relevant wiki URLs are loaded from the MySQL database.

I get this impression from the code in the update_bots method. In particular, this portion of the code which loads a list of strings from the database and calls it wikis, followed by this portion which filters the list into a new list called new_wikis, finally followed by this portion that calls get_or_create_wiki_api for each element of new_wikis. That last portion of the code proceeds to either store a bot created using the returned API struct, or print an error message.

1 Like

Thank you so much! That really helps. Any idea whether such a database would be stored locally or somewhere online?

The database used appears to be configurable. You can see a configuration template with a mysql section here and the code that reads that section of the config here. The ? on those code lines means "get the value, unless it is missing or an error, otherwise return from the function". You can read some official docs on ? here.

Given they are all present/valid, those configuration options eventually get passed to mysql_async::Pool::new, which is a function from a third party library called mysql_async. Here's the docs for that library.

The configuration options exposed include the hostname, meaning it would be possible to configure the code to use a local database, (with localhost etc.), or a remote one. So, unfortunately, I can't say from looking at the code how someone would have configured it.

Thank you! I don't suppose there are any clues in the code as to whether the database is something stored locally or online?

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.