]> kaliko git repositories - sid.git/commitdiff
Reformat docstrings to have nice help message
authorkaliko <kaliko@azylum.org>
Tue, 19 May 2020 08:09:30 +0000 (10:09 +0200)
committerkaliko <kaliko@azylum.org>
Tue, 19 May 2020 08:09:30 +0000 (10:09 +0200)
sid/archive.py
sid/bts.py
sid/echo.py
sid/feeds.py
sid/log.py
sid/ping.py

index 808e364a3f1d53b533bf788102bf727f6afc86f6..68c841e21d0f13f34b2d1dfefd1d4d97a5e993fc 100644 (file)
@@ -34,9 +34,9 @@ class Archive(Plugin):
 
     @botcmd
     def archive(self, rcv, args):
 
     @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:
         if not args:
             return
         if len(args) > 1:
index 82b31d41ef5398bb8f5ab1478ceed14a115fd6f3..2835efff9127701d4d8b4724ad992717bde0f348 100644 (file)
@@ -72,8 +72,9 @@ class Bugs(Plugin):
 
     @botcmd
     def bugs(self, rcv, args):
 
     @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
         """
         if not args:
             return
index 5bb90c06768e7e5daaf9e99b6721ef8d3a352784..96ea393d93c90180128f971c097d5fbea22bbbb0 100644 (file)
@@ -49,11 +49,10 @@ class Echo(Plugin):
 
     @botcmd
     def tell(self, message, args):
 
     @botcmd
     def tell(self, message, args):
-        """
-        **commands**:
+        """Drops a message to be sent when someone gets online.
 
 
-        * ``!tell queue``        : messages in queue
-        * ``!tell <nick> <msg>`` : append <msg> to <nick> in queue"""
+        * ``!tell queue``       : messages in queue
+        * ``!tell <nick> <msg>``: append <msg> to <nick> in queue"""
         if not len(args):
             msg = 'Missing arguments:\n{}'.format(self.tell.__doc__)
             self.reply(message, msg)
         if not len(args):
             msg = 'Missing arguments:\n{}'.format(self.tell.__doc__)
             self.reply(message, msg)
index 7fba4e25151b390d6c46370b26d28f05efbf8e24..5494a95e6daf0f7e386b354abfcb36df4dd85e7d 100644 (file)
@@ -165,9 +165,7 @@ class Feeds(Plugin):
     def feeds(self, rcv, args):
         """feeds monitors debian project related feeds.
 
     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)
         * ``!feeds last`` : last check time"""
         if 'last' in args:
             self.reply(rcv, 'Last feeds check: %s' % self.th_mon.last_check)
index e97e738f4734bd32d4e96fdf06fba6b937c579ee..278be3d505ebbe63d7dbdfcbe108eec57b1dbf66 100644 (file)
@@ -23,7 +23,7 @@ from .plugin import Plugin, botcmd
 
 
 class Log(Plugin):
 
 
 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).
 
     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):
 
     @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')
         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):
 
     @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())
 
 
         self.reply(message, self._format_log())
 
 
index 3476e7a333b7f91c9a244cd9a030cff8e94a083c..a641c83108206543c1631546a10b78e2bfe3cb61 100644 (file)
@@ -26,6 +26,7 @@ class Ping(Plugin):
     @botcmd
     def ping(self, rcv, args):
         """ping's answering a pong showing the bot is alive.
     @botcmd
     def ping(self, rcv, args):
         """ping's answering a pong showing the bot is alive.
+
         !ping : You'll get back "pong"!
         """
         msg = {'mhtml': '!<a href="{0.PongURL}">pong</a>'.format(self),
         !ping : You'll get back "pong"!
         """
         msg = {'mhtml': '!<a href="{0.PongURL}">pong</a>'.format(self),