Pun generator
Project description
spookify
Spooky Halloween name generator
Also supports a limited festive dictionary
Installation
This project is available on PyPI; install using
pip install spookify
Or clone this repo and build it yourself, if you prefer.
Non-standard dependencies:
Usage
Once installed through pip, run using
python3 -m spookify [name]
If no name is provided on the command line, the script will run in interactive mode, allowing many names to be generated in a single session. This also allows the selection of alternative dictionaries (see "Available dictionaries", below).
If you don't wish to install the package through pip, spookify can be run
directly by cloning this repo and running spookify/__main__.py
.
Spookify can also be imported for use in other Python scripts, in the typical fashion:
import spookify [as ...]
from spookify import [...]
This exposes the following functions:
spookify.spookify(name[, list_type][, shuffle])
Returns a punned-upon version of the stringname
.
Possible values oflist_type
are listed under "Available dictionaries" below.spookify.best_substitution(word, possible_subs[, shuffle])
Performs the best substitution of a member of the listpossible_subs
intoword
.spookify.score_substitution(word_part, possible_sub)
Scores the desirability of replacing the stringword_part
withpossible_sub
(lower is better).
Functions with pseudo-random elements all support a shuffle
argument.
By setting this to False
, this can be disabled, resulting in a consistent
return value.
See the function docstrings for more details.
Available dictionaries
spooky
(default)festive
Examples
- George Watson ⇒ Ge-ogre Bats-on
- Dave Jones ⇒ Grave Bones
- Richard Stallman ⇒ Witch-ard Skull-man
- Donald Trump ⇒ Demon-ald Grim-p
- Theresa May ⇒ T-hearse Mummy
- Albus Dumbledore ⇒ Al-bats Dum-bleed-ore
- Engineering and Physical Sciences Research Council ⇒ Engin-eerie-g And Phy-spectral Scare-nces Re-fear-ch Wound-il
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for spookify-0.2.5.post1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | af52d5173a3b11816949e261a42c9fff3ec7475b02195623fbeeecff16b957a0 |
|
MD5 | 84b8421a6d5b5f1659be71a225e8c9ab |
|
BLAKE2b-256 | 88e4cc5a18fa33a5b69791991db2bd028c88c510d1514a6ad106024f3fd25763 |