Skip to content

Commit

Permalink
[TextEditor] v3.4.3 Remove camu
Browse files Browse the repository at this point in the history
  • Loading branch information
Kreusada committed Apr 15, 2024
1 parent 124e8b3 commit 8d43034
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 33 deletions.
8 changes: 2 additions & 6 deletions docs/cog_texteditor.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Through this guide, ``[p]`` will always represent your prefix. Replace

.. note::

This guide was last updated for version 3.4.1. Ensure
This guide was last updated for version 3.4.3. Ensure
that you are up to date by running ``[p]cog update texteditor``.

If there is something missing, or something that needs improving
Expand All @@ -30,18 +30,14 @@ Edit and manipulate with text.
Commands
--------

Here are all the commands included in this cog (26):
Here are all the commands included in this cog (25):

* ``[p]editor``
Base command for editing text.
* ``[p]editor alternating <text>``
Convert the text to alternating case.
* ``[p]editor bullet <bullet> [items...]``
Bullet point a selection of items.
* ``[p]editor camu <text>``
Jumble text in Cambridge University style.

https://www.mrc-cbu.cam.ac.uk/people/matt.davis/cmabridge/
* ``[p]editor charcount <text>``
Count the number of characters appearing in the text.
* ``[p]editor formatnumber <number>``
Expand Down
8 changes: 2 additions & 6 deletions texteditor/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Through this guide, ``[p]`` will always represent your prefix. Replace

.. note::

This guide was last updated for version 3.4.1. Ensure
This guide was last updated for version 3.4.3. Ensure
that you are up to date by running ``[p]cog update texteditor``.

If there is something missing, or something that needs improving
Expand All @@ -30,18 +30,14 @@ Edit and manipulate with text.
Commands
--------

Here are all the commands included in this cog (26):
Here are all the commands included in this cog (25):

* ``[p]editor``
Base command for editing text.
* ``[p]editor alternating <text>``
Convert the text to alternating case.
* ``[p]editor bullet <bullet> [items...]``
Bullet point a selection of items.
* ``[p]editor camu <text>``
Jumble text in Cambridge University style.

https://www.mrc-cbu.cam.ac.uk/people/matt.davis/cmabridge/
* ``[p]editor charcount <text>``
Count the number of characters appearing in the text.
* ``[p]editor formatnumber <number>``
Expand Down
22 changes: 1 addition & 21 deletions texteditor/texteditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class TextEditor(commands.Cog):
"""

__author__ = "Kreusada"
__version__ = "3.4.2"
__version__ = "3.4.3"

def __init__(self, bot):
self.bot = bot
Expand Down Expand Up @@ -137,26 +137,6 @@ async def editor_swapcase(self, ctx: commands.Context, *, text: str):
"""Swap the casing for text."""
await send_safe(ctx, text.swapcase())

@editor.command(name="camu")
async def editor_camu(self, ctx: commands.Context, *, text: str):
"""Jumble text in Cambridge University style.
https://www.mrc-cbu.cam.ac.uk/people/matt.davis/cmabridge/
"""
ret = []
for w in text.split():
tw = list(w)
if len(w) == 1:
ret.append(w)
elif len(w) == 2:
random.shuffle(tw)
ret.append(w)
else:
mid = tw[1:-1]
random.shuffle(mid)
ret.append(w[0] + "".join(mid) + w[-1])
await send_safe(ctx, " ".join(ret))

@editor.command(name="permutate", aliases=["permutations"])
async def editor_permutate(self, ctx: commands.Context, *, text: str):
"""Generate permutations for given combinations of words/digits."""
Expand Down

0 comments on commit 8d43034

Please sign in to comment.