Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dgw/sopel-spongemock
Sopel plugin to generate "Spongemock" text (based on *that* SpongeBob meme)
https://github.com/dgw/sopel-spongemock
hacktoberfest irc irc-bot ironic-case sopel sopel-plugin spongebob spongebob-meme
Last synced: about 1 month ago
JSON representation
Sopel plugin to generate "Spongemock" text (based on *that* SpongeBob meme)
- Host: GitHub
- URL: https://github.com/dgw/sopel-spongemock
- Owner: dgw
- License: other
- Created: 2019-10-25T02:50:02.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-01-15T08:40:36.000Z (10 months ago)
- Last Synced: 2024-05-01T18:52:39.450Z (7 months ago)
- Topics: hacktoberfest, irc, irc-bot, ironic-case, sopel, sopel-plugin, spongebob, spongebob-meme
- Language: Python
- Homepage:
- Size: 37.1 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: NEWS
- License: COPYING
Awesome Lists containing this project
README
# sopel-spongemock
Sopel plugin to generate "Spongemock" text (based on *that* SpongeBob meme)## Requirements
**Basic usage:** Only [Sopel](https://github.com/sopel-irc/sopel) itself.
**With configurable output:** Additionally requires the `spongemock` PyPI package.
**More robust Unicode detection:** Additionally requires the `unicodedata2` PyPI package.
## Installation
**Basic**
```sh
pip install sopel-spongemock
```**Configurable**
```sh
pip install sopel-spongemock[lib]
```**Robust**
```sh
pip install sopel-spongemock[ud2]
```***Note:** It is possible to install both `lib` and `ud2` extras at once, but
doing so serves no purpose; the `spongemock` package does not make use of
`unicodedata` or `unicodedata2`.*## Configuration
If installed with the `lib` extra, use the following template in Sopel's
configuration file to set options for `spongemock`'s output:```ini
[spongemock]
diversity_bias = 0.6
always_start_lower = False
```The `diversity_bias` option controls the chance of switching cases for each
letter in the output. `0.0` represents a perfectly random, 50/50 chance.
Higher values increase the likelihood of switching as more consecutive
letters are output with the same case. At `1.0`, it's guaranteed that the
case will switch for every letter.**Values outside the range of [0.0, 1.0] will cause errors.**
Feel free to experiment with intermediate values to find what "looks right"
for your own interpretation of the mocking-text meme.The `always_start_lower` option will output `text.swapcase()` if the first
letter of the output is capitalized. (While the built-in mocker always starts
with lowercase, the external library sets case of the first letter randomly.)***Note:** Options in this configuration section have no effect if the plugin
is installed without the `lib` extra.*## Usage
```
.spongemock |or
.smock |
```If a single word is passed, the command will first check if that nick has said
anything in the channel recently, and will mock their last message if so.Any input that does not match a known user's nick will be mocked directly.
### Examples
```
.smock Free speech!
fREe SpEEcH
``````
I'm something of a Pythonista myself
.smock dgw
i'M soMeThiNg oF a pYtHOnIsTA mySElf
```