@@ -90,56 +90,56 @@ def qrcode(text):
9090
9191# basic text tools
9292
93- @hook .command ("capitalise " , "capitalize " )
93+ @hook .command ("capitalize " , "capitalise " )
9494def capitalize (text ):
95- """capitalize <string> -- Capitalizes <string>.
95+ """<string> -- Capitalizes <string>.
9696 :type text: str
9797 """
9898 return ". " .join ([sentence .capitalize () for sentence in text .split (". " )])
9999
100100
101101@hook .command
102102def upper (text ):
103- """upper <string> -- Convert string to uppercase."""
103+ """<string> -- Convert string to uppercase."""
104104 return text .upper ()
105105
106106
107107@hook .command
108108def lower (text ):
109- """lower <string> -- Convert string to lowercase."""
109+ """<string> -- Convert string to lowercase."""
110110 return text .lower ()
111111
112112
113113@hook .command
114114def titlecase (text ):
115- """title <string> -- Convert string to title case."""
115+ """<string> -- Convert string to title case."""
116116 return text .title ()
117117
118118
119119@hook .command
120120def swapcase (text ):
121- """swapcase <string> -- Swaps the capitalization of <string>."""
121+ """<string> -- Swaps the capitalization of <string>."""
122122 return text .swapcase ()
123123
124124
125125# encoding
126126
127127@hook .command ("rot13" )
128128def rot13_encode (text ):
129- """rot13 <string> -- Encode <string> with rot13."""
129+ """<string> -- Encode <string> with rot13."""
130130 encoder = codecs .getencoder ("rot-13" )
131131 return encoder (text )[0 ]
132132
133133
134134@hook .command ("base64" )
135135def base64_encode (text ):
136- """base64 <string> -- Encode <string> with base64."""
136+ """<string> -- Encode <string> with base64."""
137137 return base64 .b64encode (text .encode ()).decode ()
138138
139139
140140@hook .command ("debase64" , "unbase64" )
141141def base64_decode (text , notice ):
142- """unbase64 <string> -- Decode <string> with base64."""
142+ """<string> -- Decode <string> with base64."""
143143 try :
144144 return base64 .b64decode (text .encode ()).decode ()
145145 except binascii .Error :
@@ -148,7 +148,7 @@ def base64_decode(text, notice):
148148
149149@hook .command ("isbase64" , "checkbase64" )
150150def base64_check (text ):
151- """isbase64 <string> -- Checks if <string> is a valid base64 encoded string"""
151+ """<string> -- Checks if <string> is a valid base64 encoded string"""
152152 try :
153153 base64 .b64decode (text .encode ())
154154 except binascii .Error :
@@ -159,14 +159,14 @@ def base64_check(text):
159159
160160@hook .command
161161def unescape (text ):
162- """unescape <string> -- Unicode unescapes <string>."""
162+ """<string> -- Unicode unescapes <string>."""
163163 decoder = codecs .getdecoder ("unicode_escape" )
164164 return decoder (text )[0 ]
165165
166166
167167@hook .command
168168def escape (text ):
169- """escape <string> -- Unicode escapes <string>."""
169+ """<string> -- Unicode escapes <string>."""
170170 encoder = codecs .getencoder ("unicode_escape" )
171171 return encoder (text )[0 ].decode ()
172172
@@ -176,7 +176,7 @@ def escape(text):
176176
177177@hook .command
178178def length (text ):
179- """length <string> -- Gets the length of <string>"""
179+ """<string> -- Gets the length of <string>"""
180180 return "The length of that string is {} characters." .format (len (text ))
181181
182182
@@ -185,7 +185,7 @@ def length(text):
185185
186186@hook .command
187187def reverse (text ):
188- """reverse <string> -- Reverses <string>."""
188+ """<string> -- Reverses <string>."""
189189 return text [::- 1 ]
190190
191191
@@ -194,7 +194,7 @@ def reverse(text):
194194
195195@hook .command ("hash" )
196196def hash_command (text ):
197- """hash <string> -- Returns hashes of <string>."""
197+ """<string> -- Returns hashes of <string>."""
198198 return ', ' .join (x + ": " + getattr (hashlib , x )(text .encode ("utf-8" )).hexdigest ()
199199 for x in ['md5' , 'sha1' , 'sha256' ])
200200
@@ -218,7 +218,7 @@ def leet(text):
218218# Based on plugin by FurCode - <https://github.com/FurCode/RoboCop2>
219219@hook .command
220220def derpify (text ):
221- """derpify <text> - returns some amusing responses from your input."""
221+ """<text> - returns some amusing responses from your input."""
222222 string = text .upper ()
223223 pick_the = random .choice (["TEH" , "DA" ])
224224 pick_e = random .choice (["E" , "3" , "A" ])
0 commit comments