From: kaliko Date: Tue, 19 May 2020 08:09:30 +0000 (+0200) Subject: Reformat docstrings to have nice help message X-Git-Tag: 0.1.1~1 X-Git-Url: http://git.kaliko.me/?p=sid.git;a=commitdiff_plain;h=4a7f23317ab2236a85c3a17a00a52ac034c9bad7 Reformat docstrings to have nice help message --- diff --git a/sid/archive.py b/sid/archive.py index 808e364..68c841e 100644 --- a/sid/archive.py +++ b/sid/archive.py @@ -34,9 +34,9 @@ class Archive(Plugin): @botcmd def archive(self, rcv, args): - """ - **command** ``!archive pkg-name`` : Returns package versions - (by suite)""" + """Fetches package info from the archive + + ``!archive pkg-name`` : Returns package versions (by suite)""" if not args: return if len(args) > 1: diff --git a/sid/bts.py b/sid/bts.py index 82b31d4..2835eff 100644 --- a/sid/bts.py +++ b/sid/bts.py @@ -72,8 +72,9 @@ class Bugs(Plugin): @botcmd def bugs(self, rcv, args): - """ - **command** ``!bugs pkg-name`` : Returns latest bug reports if any + """Gets bugs info from the BTS + + ``!bugs pkg-name`` : Returns latest bug reports if any """ if not args: return diff --git a/sid/echo.py b/sid/echo.py index 5bb90c0..96ea393 100644 --- a/sid/echo.py +++ b/sid/echo.py @@ -49,11 +49,10 @@ class Echo(Plugin): @botcmd def tell(self, message, args): - """ - **commands**: + """Drops a message to be sent when someone gets online. - * ``!tell queue`` : messages in queue - * ``!tell `` : append to in queue""" + * ``!tell queue`` : messages in queue + * ``!tell ``: append to in queue""" if not len(args): msg = 'Missing arguments:\n{}'.format(self.tell.__doc__) self.reply(message, msg) diff --git a/sid/feeds.py b/sid/feeds.py index 7fba4e2..5494a95 100644 --- a/sid/feeds.py +++ b/sid/feeds.py @@ -165,9 +165,7 @@ class Feeds(Plugin): def feeds(self, rcv, args): """feeds monitors debian project related feeds. - **commands**: - - * ``!feeds`` : registred feeds list + * ``!feeds`` : registred feeds list * ``!feeds last`` : last check time""" if 'last' in args: self.reply(rcv, 'Last feeds check: %s' % self.th_mon.last_check) diff --git a/sid/log.py b/sid/log.py index e97e738..278be3d 100644 --- a/sid/log.py +++ b/sid/log.py @@ -23,7 +23,7 @@ from .plugin import Plugin, botcmd class Log(Plugin): - """Logs presence. + """Logs group chat participant presence. The account running the bot need at least room moderation right to log participants JIDs (fallback to nickname). @@ -70,8 +70,9 @@ class Log(Plugin): @botcmd(hidden=True) def write(self, message, args): - """ - **command** (hidden) ``!write`` : Writes log to file (use mktemp and return file location as MUC message)""" + """Dump/save room presences log + + ``!write`` : Writes log to file (use mktemp and return file location as MUC message)""" delay = int(time()) - Log.throttle_ts if delay < 30: self.log.debug('throttling file creation') @@ -89,7 +90,7 @@ class Log(Plugin): @botcmd(hidden=True) def dump(self, message, args): - """**command** (hidden) ``!dump`` : Dumps log as MUC message""" + """``!dump`` : Dumps log as MUC message""" self.reply(message, self._format_log()) diff --git a/sid/ping.py b/sid/ping.py index 3476e7a..a641c83 100644 --- a/sid/ping.py +++ b/sid/ping.py @@ -26,6 +26,7 @@ class Ping(Plugin): @botcmd def ping(self, rcv, args): """ping's answering a pong showing the bot is alive. + !ping : You'll get back "pong"! """ msg = {'mhtml': '!pong'.format(self),