mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-26 20:59:27 +01:00
Added utils.wrapLines and wrapped the lines of each plugin's example.
This commit is contained in:
parent
8d669471ba
commit
b572562cb3
@ -64,7 +64,7 @@ import ircmsgs
|
||||
import privmsgs
|
||||
import callbacks
|
||||
|
||||
example = """
|
||||
example = utils.wrapLines("""
|
||||
<jemfinch> @list FunCommands
|
||||
<supybot> base, binary, calc, chr, coin, cpustats, decode, dice, dns, encode, hexlify, kernel, last, lastfrom, leet, levenshtein, lithp, md5, mimetype, netstats, objects, ord, pydoc, rot13, rpn, sha, soundex, unhexlify, uptime, urlquote, urlunquote, xor
|
||||
<jemfinch> @netstats
|
||||
@ -144,7 +144,7 @@ example = """
|
||||
<jemfinch> @dns kernel.org
|
||||
<supybot> 204.152.189.116
|
||||
<jemfinch> @kernel
|
||||
"""
|
||||
""")
|
||||
|
||||
class FunCommands(callbacks.Privmsg):
|
||||
def __init__(self):
|
||||
|
@ -50,7 +50,7 @@ import privmsgs
|
||||
import callbacks
|
||||
import structures
|
||||
|
||||
example = """
|
||||
example = utils.wrapLines("""
|
||||
<jemfinch> @list Http
|
||||
<supybot> acronym, babelize, deepthought, foldoc, freshmeat, geekquote, netcraft, randomlanguage, stockquote, title, translate, weather
|
||||
<jemfinch> @acronym ASAP
|
||||
@ -82,7 +82,7 @@ example = """
|
||||
<supybot> Portuguese
|
||||
<jemfinch> @babelize en [randomlanguage] [deepthought]
|
||||
<supybot> # 355: When he was a small boy, had always wanted to be one acrobat. It looked at as thus much amusement, turning through air, to launch itself, fulling it it it he himself with the land in the shoulders of the person. Little knew that when finally one was changedded acrobat, would seem irritating thus. Years later, later this that stopped finally, joined did not work to it for it is as one acrobat after everything. Weirdo of the stre
|
||||
"""
|
||||
""")
|
||||
|
||||
class FreshmeatException(Exception):
|
||||
pass
|
||||
|
@ -50,7 +50,7 @@ import ircutils
|
||||
import privmsgs
|
||||
import callbacks
|
||||
|
||||
example = """
|
||||
example = utils.wrapLines("""
|
||||
<jemfinch> @load Relay
|
||||
<supybot> jemfinch: The operation succeeded.
|
||||
<jemfinch> @startrelay freenode
|
||||
@ -76,7 +76,7 @@ example = """
|
||||
<supybot> jemfinch: relaycolor <0,1,2>
|
||||
<jemfinch> @relaywhois GnuVince
|
||||
<supybot> jemfinch: Vincent Foley (~vince@modemcable216.89-202-24.mtl.mc.videotron.ca) has been online since 08:37 PM, August 24, 2003 (idle for 1 day, 10 hours, 21 minutes, and 3 seconds) and is on #sourcereview and @#hackcanada
|
||||
"""
|
||||
""")
|
||||
|
||||
def configure(onStart, afterConnect, advanced):
|
||||
import socket
|
||||
|
@ -44,10 +44,11 @@ import urlparse
|
||||
|
||||
import sqlite
|
||||
|
||||
import utils
|
||||
import privmsgs
|
||||
import callbacks
|
||||
|
||||
example = """
|
||||
example = utils.wrapLines("""
|
||||
<supybot> lasturl, numurls, randomurl
|
||||
<jemfinch> @numurls
|
||||
<supybot> Error: Command must be sent in a channel or include a channel in its arguments.
|
||||
@ -66,7 +67,7 @@ example = """
|
||||
<supybot> <http://slashdot.org/comments.pl?sid=75020&cid=6720123>, added by jemfinch at 03:16 PM, August 25, 2003.
|
||||
<jemfinch> @lasturl #sourcereview --at coderforums.com
|
||||
<supybot> <http://coderforums.com/showthread.php?s=&postid=15798#post15798>, added by Strike|work at 02:41 PM, August 25, 2003.
|
||||
"""
|
||||
""")
|
||||
|
||||
def configure(onStart, afterConnect, advanced):
|
||||
# This will be called by setup.py to configure this module. onStart and
|
||||
|
@ -41,6 +41,7 @@ import os
|
||||
import re
|
||||
import string
|
||||
import sgmllib
|
||||
import textwrap
|
||||
import htmlentitydefs
|
||||
|
||||
class HtmlToText(sgmllib.SGMLParser):
|
||||
@ -279,4 +280,10 @@ def unCommaThe(s):
|
||||
else:
|
||||
return s
|
||||
|
||||
def wrapLines(s):
|
||||
L = []
|
||||
for line in s.splitlines():
|
||||
L.append(textwrap.fill(line))
|
||||
return '\n'.join(L)
|
||||
|
||||
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:
|
||||
|
Loading…
Reference in New Issue
Block a user