Page MenuHomePhabricator

Server admin log bot
Closed, ResolvedPublic

Description

I could easily write a bot to automatically update the Server admin log using IRC commands. If we want to do this, all I need to know is what timezone we will be using (probably UTC) and what format the entries should have. From the current setup, I can predict that we will want something like:

== yyyy-mm-dd ==
* hh:mm user: comment

Where yyyy is the current year, mm is month, dd is day, hh is hour, mm is minute, user is IRC nick, and comment is passed to bot via command. The bot would only create a new section header if there is no existing header matching the current date.
The only other thing I want to know is if all log entries should be added above the previous ones (which I believe they should).

Event Timeline

Void created this task.May 31 2017, 9:01 PM
Void created this object in space S1 Public.

It should be UTC. :)

Mbrt added a subscriber: Mbrt.May 31 2017, 10:51 PM

sound good :) UTC :)

Void raised the priority of this task from 0 to Low.Jun 1 2017, 1:22 AM

I'll get to work on it tomorrow. Should be up and running by the weekend.

Void added a comment.Jun 3 2017, 6:42 PM

I've encountered an unexpected error while attempting to test. I might have the fix done soon, but I can no longer give a good estimate on how long it will take to finish.

@Void Whats the status on this?

Void added a comment.Jul 19 2017, 4:47 PM

I'm having trouble getting the script to accept the site's cert. It keeps throwing unable to find valid certification path to requested target

@Void What is the status of the switch to pywikibot

Void added a comment.Sep 26 2017, 7:19 PM

I've got free time today to do testing. I needed to figure a way to get the python scripts to interact with the java framework, and I believe I have a solution.

Void added a comment.Oct 22 2017, 12:48 AM

I've gotten far enough that I can do this using a custom pywikibot script. I now just need to make the java bot call the pwb script, modify a text file, and then call another pwb script. Shouldn't take too long now.

Void added a comment.Oct 28 2017, 2:25 AM

All I have to do is work the script into the bot and then deploy it. This will take a bit of fiddling, since the file structure where I host the bot is significantly different from where I've been testing it. (And I also need to make sure I can install Pywikibot there properly).

Void added a comment.Oct 29 2017, 12:17 AM

Ugh, I was just in the process of launching Void-bot with the added functionality when this issue came up again. I'll have to bypass the need for login, or something.

Void closed this task as Resolved.Oct 29 2017, 12:54 AM

Functionality now added, you can use either of $log comments or $sal comments, and whatever comments is will be added to the page. (This will take a minute even after the bot responds in the IRC channel.)

Joepayne moved this task from Backlog to Done on the MediaWiki board.Nov 16 2017, 11:00 PM