sopel-spongemock


Namesopel-spongemock JSON
Version 1.2.0 PyPI version JSON
download
home_pageNone
SummarySopel plugin to generate "Spongemock" text (based on *that* SpongeBob meme)
upload_time2024-08-06 22:07:21
maintainerNone
docs_urlNone
authorNone
requires_python<4,>=3.8
licenseEFL-2.0
keywords sopel plugin bot irc
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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 <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
```

## Changelog

### 1.2.0

Changed:
* Modernized package metadata and automated releases (#12, #13)
* Require Python 3.8+ (#12)
* Require Sopel 8.0+ (#12)

Environments running Sopel 7.1 and/or older Python can continue to use
`sopel-spongemock` 1.1.3; there are no functional changes in this release.


### 1.1.3

Changed:
* Take advantage of Sopel 8 features if available (#10)
* Prune old nick's line after nick-change (#11)


### 1.1.2

Fixed:
* Output canonical nick instead of copying `.smock <nick>`'s input (#8 by @dgw)
* `.smock <nick>` didn't casemap correctly (#9 by @dgw)


### 1.1.1

Fixed:
* `TypeError` when attempting to `.smock` by nick (#7 by @SnoopJ)
* Documentation of optional support for `unicodedata2` library

Changed:
* Replaced deprecated `module` decorators with their `plugin` counterparts
  (future-proofing this plugin for Sopel 8, Sopel 9, and beyond)


### 1.1.0

Added:
* Support for using `spongemock` external library
* Support for `unicodedata2` when present
* Plugin configuration options (effective only when external library is in use)

Changed:
* Built-in mocking function is now smarter about only trying to change the
  case of characters when it's possible to do so
* Minimum supported Sopel version raised from 7.0 to 7.1


### 1.0.0

First official release, converted from single .py file to package.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "sopel-spongemock",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4,>=3.8",
    "maintainer_email": null,
    "keywords": "sopel, plugin, bot, irc",
    "author": null,
    "author_email": "dgw <dgw@technobabbl.es>",
    "download_url": "https://files.pythonhosted.org/packages/ed/87/cba347f9ead4c0b159dcce24cec733c4ccfbbba493e2e7f687b0eec38f0f/sopel_spongemock-1.2.0.tar.gz",
    "platform": "Linux x86, x86-64",
    "description": "# sopel-spongemock\nSopel plugin to generate \"Spongemock\" text (based on *that* SpongeBob meme)\n\n## Requirements\n\n**Basic usage:** Only [Sopel](https://github.com/sopel-irc/sopel) itself.\n\n**With configurable output:** Additionally requires the `spongemock` PyPI package.\n\n**More robust Unicode detection:** Additionally requires the `unicodedata2` PyPI package.\n\n## Installation\n\n**Basic**\n```sh\npip install sopel-spongemock\n```\n\n**Configurable**\n```sh\npip install sopel-spongemock[lib]\n```\n\n**Robust**\n```sh\npip install sopel-spongemock[ud2]\n```\n\n***Note:** It is possible to install both `lib` and `ud2` extras at once, but\ndoing so serves no purpose; the `spongemock` package does not make use of\n`unicodedata` or `unicodedata2`.*\n\n## Configuration\n\nIf installed with the `lib` extra, use the following template in Sopel's\nconfiguration file to set options for `spongemock`'s output:\n\n```ini\n[spongemock]\ndiversity_bias = 0.6\nalways_start_lower = False\n```\n\nThe `diversity_bias` option controls the chance of switching cases for each\nletter in the output. `0.0` represents a perfectly random, 50/50 chance.\nHigher values increase the likelihood of switching as more consecutive\nletters are output with the same case. At `1.0`, it's guaranteed that the\ncase will switch for every letter.\n\n**Values outside the range of [0.0, 1.0] will cause errors.**\n\nFeel free to experiment with intermediate values to find what \"looks right\"\nfor your own interpretation of the mocking-text meme.\n\nThe `always_start_lower` option will output `text.swapcase()` if the first\nletter of the output is capitalized. (While the built-in mocker always starts\nwith lowercase, the external library sets case of the first letter randomly.)\n\n***Note:** Options in this configuration section have no effect if the plugin\nis installed without the `lib` extra.*\n\n## Usage\n\n```\n.spongemock <nick>|<text>\n\nor\n\n.smock <nick>|<text>\n```\n\nIf a single word is passed, the command will first check if that nick has said\nanything in the channel recently, and will mock their last message if so.\n\nAny input that does not match a known user's nick will be mocked directly.\n\n### Examples\n\n```\n<dgw> .smock Free speech!\n<Sopel> fREe SpEEcH\n```\n\n```\n<dgw> I'm something of a Pythonista myself\n<ziro> .smock dgw\n<Sopel> i'M soMeThiNg oF a pYtHOnIsTA mySElf\n```\n\n## Changelog\n\n### 1.2.0\n\nChanged:\n* Modernized package metadata and automated releases (#12, #13)\n* Require Python 3.8+ (#12)\n* Require Sopel 8.0+ (#12)\n\nEnvironments running Sopel 7.1 and/or older Python can continue to use\n`sopel-spongemock` 1.1.3; there are no functional changes in this release.\n\n\n### 1.1.3\n\nChanged:\n* Take advantage of Sopel 8 features if available (#10)\n* Prune old nick's line after nick-change (#11)\n\n\n### 1.1.2\n\nFixed:\n* Output canonical nick instead of copying `.smock <nick>`'s input (#8 by @dgw)\n* `.smock <nick>` didn't casemap correctly (#9 by @dgw)\n\n\n### 1.1.1\n\nFixed:\n* `TypeError` when attempting to `.smock` by nick (#7 by @SnoopJ)\n* Documentation of optional support for `unicodedata2` library\n\nChanged:\n* Replaced deprecated `module` decorators with their `plugin` counterparts\n  (future-proofing this plugin for Sopel 8, Sopel 9, and beyond)\n\n\n### 1.1.0\n\nAdded:\n* Support for using `spongemock` external library\n* Support for `unicodedata2` when present\n* Plugin configuration options (effective only when external library is in use)\n\nChanged:\n* Built-in mocking function is now smarter about only trying to change the\n  case of characters when it's possible to do so\n* Minimum supported Sopel version raised from 7.0 to 7.1\n\n\n### 1.0.0\n\nFirst official release, converted from single .py file to package.\n",
    "bugtrack_url": null,
    "license": "EFL-2.0",
    "summary": "Sopel plugin to generate \"Spongemock\" text (based on *that* SpongeBob meme)",
    "version": "1.2.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/dgw/sopel-spongemock/issues",
        "Homepage": "https://github.com/dgw/sopel-spongemock"
    },
    "split_keywords": [
        "sopel",
        " plugin",
        " bot",
        " irc"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "996650e18dc7a4eb9325eab92ffdc4f1eee1d74a1af9f0c28df1c1e3e0a82541",
                "md5": "c2b9418c998730a3d4f0c166a28486aa",
                "sha256": "a7e88d4adcaebea74c3a50fd324055e1c22b49ec6f2c63ca5a01fe94882f1236"
            },
            "downloads": -1,
            "filename": "sopel_spongemock-1.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c2b9418c998730a3d4f0c166a28486aa",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4,>=3.8",
            "size": 6692,
            "upload_time": "2024-08-06T22:07:19",
            "upload_time_iso_8601": "2024-08-06T22:07:19.490979Z",
            "url": "https://files.pythonhosted.org/packages/99/66/50e18dc7a4eb9325eab92ffdc4f1eee1d74a1af9f0c28df1c1e3e0a82541/sopel_spongemock-1.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ed87cba347f9ead4c0b159dcce24cec733c4ccfbbba493e2e7f687b0eec38f0f",
                "md5": "99d3cbd95e7806049dca0dbf901d537a",
                "sha256": "ae28b53061aa54ed83aa203060dfea1b7c8c0799b79f8a82f48d896706d363ed"
            },
            "downloads": -1,
            "filename": "sopel_spongemock-1.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "99d3cbd95e7806049dca0dbf901d537a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4,>=3.8",
            "size": 6249,
            "upload_time": "2024-08-06T22:07:21",
            "upload_time_iso_8601": "2024-08-06T22:07:21.070846Z",
            "url": "https://files.pythonhosted.org/packages/ed/87/cba347f9ead4c0b159dcce24cec733c4ccfbbba493e2e7f687b0eec38f0f/sopel_spongemock-1.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-06 22:07:21",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "dgw",
    "github_project": "sopel-spongemock",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "sopel-spongemock"
}
        
Elapsed time: 1.78596s