Git Product home page Git Product logo

sopel-spongemock's Introduction

sopel-spongemock

Sopel plugin to generate "Spongemock" text (based on that SpongeBob meme)

Requirements

Basic usage: Only Sopel itself.

With configurable output: Additionally requires the spongemock PyPI package.

More robust Unicode detection: Additionally requires the unicodedata2 PyPI package.

Installation

Basic

pip install sopel-spongemock

Configurable

pip install sopel-spongemock[lib]

Robust

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:

[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 <nick>|<text>

or

.smock <nick>|<text>

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

<dgw> .smock Free speech!
<Sopel> fREe SpEEcH
<dgw> I'm something of a Pythonista myself
<ziro> .smock dgw
<Sopel> i'M soMeThiNg oF a pYtHOnIsTA mySElf

sopel-spongemock's People

Contributors

dgw avatar snoopj avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

snoopj

sopel-spongemock's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.