/MediaWiki-QQ-bot-in-Lua

Building a MediaWiki/QQ bot in Lua

Primary LanguageLuaGNU General Public License v3.0GPL-3.0

mwtest

Building a MediaWiki bot in Lua

My environment

  • Windows 7 x64
  • ZeroBrane + LuaDist
  • Lua 5.1.5

As there's no os specific calls or libraries used, I think it could also run well on Linux or Mac. Higher versions of Lua is not tested.

dykupdate

  • Set your clock with an internet server (UTC+8)
  • Set up your Lua environment and install the dependencies.
  • The DYK update code has to run by an admin account (as T:Dyk is cascade protected)

linky

This is a Lua version of linky for QQ using CoolQ Socket API. CoolQ and your client communicates using UDP sockets. Timerwheel is used for sending ClientHello every 5 minutes. Lua-iconv is used for encoding and decoding between GB18030 and UTF-8.

  • linky.lua (base QQ bot)
  • feed_service.lua (interacts with linky, send feed contents)
  • science_data.lua (science articles, no interactions, just write to file)