operator873 / cabalbot Goto Github PK
View Code? Open in Web Editor NEWAn IRC bot for Wikimedia users which handles a wide range of functions and interactions
License: MIT License
An IRC bot for Wikimedia users which handles a wide range of functions and interactions
License: MIT License
Add process for adding to, removing from, and querying a new table called rc_feed_admin which contains columns "nick" "project" "channel". These are IRC accounts of individuals authorized to use commands like !hush !speak within an rc_feed channel
Bot873 will be assuming duties of CabalBot. This includes acting as a recent changes bot for newiki and should have the capability of expanding into other small projects.
The function should expect two inputs "bot" which contains the bot commands and "change" which is the json formatted event from EventStreams. The function should rely on a sqlite3 database table called "rc_feed" with columns "project" and "channel" for where to report the change.
Very basic structure follows:
`db = sqlite3.connect(DB)
c = db.cursor()
channel = c.execute('''SELECT channel FROM rc_feed WHERE project=?;''', (change['wiki'],)).fetchall()
db,close()
bot.say(theChange, channel)
`
Write a Python on shell script to process indicated project tables an add data to two tables called "people".
Example, the script should accept a CLI input like "metawiki enwiki ptwiki" and process those tables. The process action should be selecting nicks in the table, collapsing duplicates, and adding the selected nicks and the project to a row in the "people" table.
The globalsysops table associates Wikimedia accounts with IRC nicks where it should be associating Wikimedia accounts with IRC accounts for better security.
Write a function that accepts two inputs, "bot" which contains the bot commands and "change" which accepts the EventStream data. The function should select the channel for the abuse filter feed from the below sqlite database table and send the report to the channel via the bot class. Bonus points for pretty format and colors.
At present, I'm not sure of the format EventStreams sends AbuseLog hits. So I don't know how the report would be handled.
The function should rely on a sqlite database table called "af_feed" which has two columns: "project" and "channel"
Using the existing ORES feed, set a threshold for probability via IRC command. If threshold is crossed, revert the edit, add message to editor's talk page. Likely won't be as fancy as ChenzwBot but good as an emergency stand in.
Add process for adding to, removing from, and querying a new table called af_feed_admin which contains columns "nick" "project" "channel". These are IRC accounts of individuals authorized to use commands like !hush !speak within an af_feed channel
Break the various functions out of the massive current script to make local callable plugins to use as needed. The Watcher file has grown into a very cumbersome and long script. It needs to be broken down into more digestible components that can be included or excluded as the situation requires by lay-users.
Beginning recently, and possibly related to workload, bots have been dropping RC reports. Investigate converting the engine to async
Sopel module is deprecated. Replace @module
with @plugin
and from sopel import module
with from sopel import plugin
.
Optionally report revisions per project with a high likelihood of vandalism via mediawiki/revision/score/2.0.0
New tables 'people' and 'channels' are created for relational support. Add populating sql commands to add to and delete from these tables on !watch add and !watch del respectively. !globalwatch should also write to these tables, but in people table, project should be global
and no difference to the channels table.
Table: people
Columns
Table channels
Columns
With CabalBot being retired, there are several basic functions that will need to be reproduced. This might be better handled as a standalone plugin.
Handle link requests like !ca !contribs !guc etc
!addwiki
and !onirc
are broken.
!addwiki
seems to only add trigger.group(5) instead of the whole string
!onirc
needs a negative response if there are no pages in the CSD cat.
EventStream and ORES stream both abruptly stop without warning.
Review entire plugin for places to replace old methods for joining strings with f strings.
https://sopel.chat/docs/plugin/bot.html#colored-styles
Add coloring and text styles to bot reports for enhanced readability using sopel's built in formatting function.
Write a Python on shell script to process indicated project tables an add data to two tables called "channels".
Example, the script should accept a CLI input like "metawiki enwiki ptwiki" and process those tables. The process action should be selecting chan and nicks in the table, collapsing duplicates, and adding the selected chan and nicks to a row in the "channels" table.
We need functions for adding to the rc_feed table as well as removing entries.
The !contribs and !xtools commands will need to be rebuilt. The trigger.group() has no len attribute and can't be counted.
MrFishBot and CVNBots added via IRC command, but failed to make it to the ignore_nicks
table. Added manually but need to investigate for broken function/sql statement.
There are lots of changes happening. The README needs to be caught up.
Add a function that adds a single page watch function for feedadmins to stalk a single page in a channel. Possible route to this would be to use the existing function, but perform a feedadmin check, then use the channel as the account name.
Probably because it's processing so frequently, but rcfeed slowly builds a significant lag. This is likely due to lack of optimization within the rcfeed reporting process. ORESfeed currently does not experience the same trouble.
Monitor RC feed for a project and check editors for "autoconfirmed" status. If not autoconfirmed, report edit.
We need functions for adding to the af_feed table as well as removing entries.
Autolink (currently living in wikicmds) which takes [[links]] in chat and delivers a formatted hyperlink to chat needs to be able to know what project to link to based on trigger.sender. A new database table will be added called channel_lang
which will have columns channel
, project
, and url
. The table will have the url
column in order to allow shortened urls like enwp.org. Any function checking the table should be able to handle url
being null.
In addition, commands for bot admins to add, rewrite, and remove information from this table will need to be written. Likely a new sub-module will be needed. Perhaps called autolink
or something similar.
Autolink was written for [[bracket links]] and I forgot to do {{curly braces}} for template links. Should be an easy fix via another @plugin.find() regex match.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.