Bot to add tweets and other microblog posts using an extended wikilink syntax to the wiki!
Find a file
2023-11-29 11:57:57 +00:00
clients/twitter.py service 2022-10-31 18:39:15 -07:00
docs v0.1.4 - overwrite correctly 2023-10-16 16:24:30 -07:00
tests wikilink with semantic syntax :) 2022-11-13 11:37:23 -08:00
wiki_postbot more type checking imports 2023-10-16 16:41:23 -07:00
.gitignore initial checkin mid-refactoring of the threadodo bot. 2022-10-03 18:46:42 -07:00
LICENSE initial checkin mid-refactoring of the threadodo bot. 2022-10-03 18:46:42 -07:00
poetry.lock wikilink with semantic syntax :) 2023-05-26 01:18:54 -07:00
pyproject.toml v0.1.4 - overwrite correctly 2023-10-16 16:24:30 -07:00
README.md at least a little docs 2023-11-29 11:57:57 +00:00

wiki-postbot

Bot to crosspost from chat clients and microblogs using an extended wikilink syntax to the (media)wiki.

eg. say Hey what up i'm [[wikilinkin]] in slack, and embed that message with a backling on the wikilinkin page.

Sorry for the extremely crappy docs and code structure y'all, this was supposed to be an internal tool for like 5 different projects, so i have done nothing yet to make it readable or reusable. the best way to understand this package for now would probably be to work backwards from the script entrypoints (see https://git.jon-e.net/jonny/wiki-postbot/src/branch/main/pyproject.toml#L11 ).

this is not a model directed project, since it hasn't been intended to outlive the immediate circumstances each time, but it ends up doing so anyway.

discord entrypoint is this: https://git.jon-e.net/jonny/wiki-postbot/src/branch/main/wiki_postbot/clients/discord.py

main thing it does is transcribe messages onto wiki pages, this is the parser for those: https://git.jon-e.net/jonny/wiki-postbot/src/branch/main/wiki_postbot/patterns/wikilink.py

it was designed to have a little microsyntax for selecting n-back post ranges and handling semantic wikilinks contextually but i haven't been able to implement that on the client side yet.

wiki interface is here: https://git.jon-e.net/jonny/wiki-postbot/src/branch/main/wiki_postbot/interfaces/mediawiki.py

specifically incoming from discord here:

def handle_discord(self, msg:'Message') -> Result:

so ideally that would, yno, have a data model that it juices things into, so i'm going to work those scraps into an n-to-m bridger that i was experimenting with a lil service version of here: https://git.jon-e.net/jonny/chatbridge

Mediawiki

https://www.mediawiki.org/wiki/Manual:Creating_a_bot

  • Go to Special:BotPasswords
  • Permissions
    • Edit existing pages
    • Create, edit, and move pages
  • save to mediawiki_creds.json like
{
	"user": "Jonny@wikibot",
	"password": "<THE BOT PASSWORD>"
}

Slack

Using the python-slack-sdk https://slack.dev/python-slack-sdk/

Make App

https://slack.dev/python-slack-sdk/socket-mode/index.html