Add comments to the start of modules

This commit is contained in:
Nexus 2024-09-12 20:18:57 +01:00
parent 4764d8cd2a
commit ee3338df7a
7 changed files with 28 additions and 0 deletions

View file

@ -1,3 +1,8 @@
"""
This module is an old mockup of an AI chatbot system using ollama and a set of servers.
It is not actively used or maintained anymore.
"""
import asyncio import asyncio
import json import json
import logging import logging

0
app/modules/eco.py Normal file
View file

View file

@ -1,5 +1,8 @@
""" """
This module takes fediverse links (e.g.) and provides a preview in a reply. This module takes fediverse links (e.g.) and provides a preview in a reply.
By default, this will only work with fedi.transgender.ing, but if you set `[fediverse_preview.urls]` in your config,
you can add more. This module will use the Mastodon protocol, however it is designed to be used with misskey.
""" """
import logging import logging
import niobot import niobot

View file

@ -1,3 +1,8 @@
"""
This module simply returns the latency between a message being sent and the bot receiving it.
It also supports a rudimentary federation latency check, by sending a request to the target homeserver.
"""
import urllib.parse import urllib.parse
import niobot import niobot

View file

@ -1,3 +1,12 @@
"""
This module actively listens for messages in a specific room from specific users, and checks if they contain
a video which uses an unsupported video codec. If it does, it will be transcoded and re-uploaded to the room.
This is used because we mirror Truth Social into a matrix room and sometimes the videos are in H265, which a lot of
clients cannot play.
This can easily be adapted to other rooms and users, or even to other types of media, by changing the USER_IDS list.
"""
import logging import logging
import shlex import shlex
import shutil import shutil

View file

@ -1,3 +1,6 @@
"""
Displays versions for the bot and its dependencies
"""
import niobot import niobot
import asyncio import asyncio
import tomllib import tomllib

View file

@ -1,3 +1,6 @@
"""
What it says on the tin - a command wrapper around yt-dlp.
"""
import datetime import datetime
import functools import functools
import math import math