User:David Tornheim/YapperBotRelated

recent discussion

 * On NV's talk page:
 * Other

github

 * github.com/DavidTornheim/yapperbot-frs
 * github.com/DavidTornheim/ybtools

Post to Phabricator (to be revised)

 * While you all are deciding what to do with the adoption process, could you please unprotect the code files in yapperbot?**

In order to maintain the code--either at its original location or at the new location of feedback-request-service-bot--I need to be able to see the most current version of the code. I have tried running the version from github (on my home computer and here on Toolforge), and I keep getting errors. Novem_Linguae and I both agree that it is better not to continue to waste time working with a version which may not be correct. There is no way to be sure that the version on Toolforge is identical to the one published on github.

As for the errors: I have requested assistance on the errors at a few different forums (below). It is related to Go's sophisticated method of maintaining modules--which is new to me. (See: https://go.dev/ref/mod). Other Go users have had similar problems (https://github.com/google/gnostic/issues/262). I have tried their suggestions without much luck so far. It would be easier to just download all of the code that is currently being used on Toolforge and then correct the definitions (in the copied version) that are causing the compile problems.

These are the locations where I requested assistance: https://discordapp.com/channels/221049808784326656/1225262073814974494
 * https://en.wikipedia.org/wiki/Wikipedia:Village_pump_(technical)/Archive_211#Question_for_Go_(language)_programmers
 * Discord / Wikimedia Community / technical / Does anyone regularly program in Go (language)? I have a question about using modules
 * https://stackoverflow.com/questions/78272100/github-module-does-not-download-correctly

Teahouse question
closed discussion 

Questions

 * can post at WP:VPT

Pick a framework
[copied from User:Novem_Linguae/Essays/Toolforge_bot_tutorial]
 * Whatever language you're writing your bot in, you'll probably want to pick a framework (external library) specifically designed for logging into Wikipedia and using its API.
 * For PHP, I use the ancient framework botclasses.php. It's not modern, but it fits nicely in one file.
 * One file means I can simply copy/paste the code into my repo, then do, and now I can log in to Wikipedia and execute API commands with a lot less code. Example botclasses.php code:

Consider
Here's some stuff that is installed and can be accessed in shell


 * composer
 * git
 * npm

Working on right now
SSH on Toolforge
 * User_talk:Feedback_Request_Service_bot
 * 1) Question just filed at User_talk:GreenC.  Anyone who is watching please feel free to answer there. --David Tornheim (talk) 11:32, 16 March 2024 (UTC)
 * 2) was able to follow User:Novem_Linguae/Essays/Toolforge_bot_tutorial through
 * makebot ~/botname.
 * I see that the bots are stored at /data/project
 * 3. I looked at the Yapperbot folder. Some of the files were unprotected, e.g. jobs.yml, DISABLED (explains the migration), pruner/config-pruner.yml.  It looks like some of the files are binary/executables, e.g. pruner/pruner.  That explains what he meant by "compiled".
 * 4. Next up: try either or both of the tutorial do a script or bot type call with Wiki API, or even try to run a line or two from Yapperbot using go.  --David Tornheim (talk) 12:15, 16 March 2024 (UTC)

New Next

 * User:Novem Linguae/Essays/Toolforge bot tutorial
 * User:GreenC/BotWikiAwk

Old Next/Discussions

 * Update
 * Responses:
 * Aaron Liu #1, Aaron Liu #2
 * Novem Linguae #1
 * Create SSH
 * WP:Village_pump_(technical) (permalink)


 * Secure Shell

Relevant Pages

 * User_talk:Yapperbot
 * User_talk:Yapperbot
 * User_talk:Yapperbot
 * User_talk:Yapperbot


 * User:Naypta
 * User_talk:Naypta
 * User_talk:Naypta


 * Create bot WP:CREATEBOT

Questions
For extra technical help in the future, onwiki you can post at WP:VPT. Or if you prefer live chat, you can post on Discord in General Technical Discussion. –NL, 02:24, 19 February 2024 (UTC)  [source: User_talk:Novem_Linguae,

Login

 * Wikimedia Developer Single Sign-On
 * tools admin -- Is this ToolForge?

Phabricator

 * Phabricator
 * Phabricator Info

Start

 * https://wikitech.wikimedia.org/wiki/Help:Toolforge/Quickstart#If_you_already_have_a_Wikimedia_account_but_no_developer_account

Copy entire conversation before reducing down.

You had asked me to create a Toolforge account. I went to the link you provided. Is this the correct place to apply? They mention "member", "maintainer", "admin" and "developer".


 * I think you'll probably want to create an LDAP account, then request Toolforge membership. –NL 01:34, 21 February 2024 (UTC)
 * After that, let's do the abandoned tool procedure by filing this ticket on Phab. I'd suggest that you file it and put both our usernames so we both get access. – Novem Linguae (talk) 01:48, 21 February 2024 (UTC)
 * As you can see in the next section below, that Yapperbot is running again. It started with this activity at 6:00, 21 February 2024. Is that your doing? --David Tornheim (talk) 08:30, 21 February 2024 (UTC)
 * ✅ LDAP account created. --David Tornheim (talk) 17:20, 21 February 2024 (UTC)
 * ✅ Toolforge membership request submitted. --David Tornheim (talk) 23:23, 21 February 2024 (UTC)

Other relevant discussion
From: User_talk:Yapperbot
 * You definitely seem to have more than enough background :) I've never run a Wikipedia bot, but here's my interpretation:
 * The bot's entry point seems to be main.go. Bot calls aren't from Wikipedia; the bot operator runs the bot's code on their machine to monitor changes on Wikipedia.
 * See . Basically do a dry run of your bot.
 * Aaron Liu (talk) 22:26, 18 February 2024 (UTC)
 * It was actually run from Toolforge, presumably via a crontab that ran "jsub main.go", although I don't have access to Toolforge so can't be 100% sure. * Pppery * it has begun... 22:53, 18 February 2024 (UTC)
 * Since the bot inactivity coincided with the grid engine shutdown, that does seem likely. Aaron Liu  (talk) 02:16, 19 February 2024 (UTC)
 * Pinging who might have advice.  𝗐♥, – SJ +  01:43, 19 February 2024 (UTC)
 * If I were you, I would apply for a ToolForge account. ToolForge is where Wikipedia bots are often hosted and set up to automatically run.
 * Once approved, use an FTP client to take a peek at the Yapperbot files. Toolforge files are usually public to other Toolforge users, unless set to Linux chmod 0600 or similar. The Yapperbot files are probably located at the path "/data/project/yapperbot" or similar. These may be more up-to-date than what is in GitHub repos, and may also include some configuration files that tell you how the cronjob worked (time interval, bash code to start the bot, etc.)
 * To set up your own bot or your fork of Yapperbot to use Toolforge cron jobs, you'll want to SSH in to your Toolforge account and then set up a "job". This is the new way to do Toolforge cron jobs. The help file is at wikitech:Help:Toolforge/Jobs framework. One of the old ways to do Toolforge cron jobs is the "grid engine", and this also happens to be why Yapperbot was shut down. The Toolforge sysadmins want to force upgrading to the jobs framework, so they are shutting down all bots still running on the grid engine, including Yapperbot.
 * How can a bot be tested without changing Wikipedia pages? Use https://test.wikipedia.org/ as a big sandbox, if needed. Those edits will go live on test.wikipedia.org, but won't hurt anything. Or see if the bot has a "dry run" option of some sort by reading its program code. – Novem Linguae (talk) 02:41, 19 February 2024 (UTC)