Skip to main content

Word Alchemist

Word Alchemist is a simple Python CLI tool designed to help you brainstorm the name of any creative project. It works by parsing JSON files into string arrays, optionally filtering that data based on properties like character length and syllable count, and generating and outputting all combinations.

This tool aims to spark creativity when it comes to naming important things.


Installation

Install using pip:

pip install word-alchemist

Usage

Let's use the following two JSON files as our example data.

words1.json

["serendipity", "quixotic", "ephemeral"]

words2.json

["ethereal", "solace", "labyrinth"]

Run the following command:

word-alchemist --files words1.json words2.json -o output.json

This generates all combinations of words from the two files and saves the output in output.json:

serendipity ethereal
serendipity solace
serendipity labyrinth
quixotic ethereal
quixotic solace
quixotic labyrinth
ephemeral ethereal
ephemeral solace
ephemeral labyrinth

If the -o or --output flag is not provided, the output will be logged directly to the console.


Filters

Filters can be applied using the --filters flag to filter out words without having to create new JSON files:

  • length: Filters based on the word length.
  • syllables: Filters based on the syllable count of the word.

Supported operators: ==, !=, <, <=, >, >=.

For example, running the following command:

word-alchemist --files words1.json words2.json --filters "syllables == 3"

Outputs:

quixotic ethereal
quixotic labyrinth

You can add multiple independent filters to apply them to specific JSON files. Filters are applied in the same order as JSON files. For example:

word-alchemist --files words1.json words2.json --filters "length > 4" "syllables == 3"

This will apply the length filter to words1.json and the syllable filter to words2.json.

Instead of providing a JSON file, you can use single words in specific slots by using the following flags:

  • --first-word or -fw
  • --second-word or -sw

This allows you to always fill a "slot" in the permutation without having to make a JSON file with a single word.


Formatters

You can modify the output using formatters without editing the input JSON files.

  • -c / --capitalize: Capitalizes the first letter of all words
  • -j / --join: Removes all whitespace and combines them into a single word
  • -a / --append: Appends a specific word to the end of all permutations

For example:

word-alchemist --files words1.json words2.json --capitalize --append "Labs"

Outputs:

Serendipity Ethereal Labs
Serendipity Solace Labs
Serendipity Labyrinth Labs
...

Contributing

This is my first time writing any Python so I'm sure I missed some things with respect to best practices both syntactically and distributing the package, any and all PRs are welcome! I also think there's a lot more interesting filters and formatters that could be added, included filtering based on parts of speech (nouns, adjectives, verbs).


License

This project is licensed under the MIT License.


Happy brainstorming! 🚀

Metadata

Release files for word-alchemist 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for word-alchemist 0.1.0
File Size Uploaded
word_alchemist-0.1.0.tar.gz 9.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for word-alchemist 0.1.0
File Interpreter ABI Platform
word_alchemist-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 28.0 kB

Release files / word_alchemist-0.1.0.tar.gz

Download URL word_alchemist-0.1.0.tar.gz
Size 9.4 kB
Tags Source
SHA-256 checksum
How to use checksums
89474cbe105917a474093749d36cc8755fb461a17089c5755ce5c4870a286fe1
BLAKE2b-256 checksum
How to use checksums
0c05645a8a25df48995781fea1c17eea5c7a59e7a1b9a89db63077009d866306
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.9.6

Release files / word_alchemist-0.1.0-py3-none-any.whl

Download URL word_alchemist-0.1.0-py3-none-any.whl
Size 18.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c87a9079bb641bca68852d7930740f183545eca114365c15bb319c22ffccb0bc
BLAKE2b-256 checksum
How to use checksums
f4c8dea5586eacbeeb9e4aabf800efebefe4acbcf554cf8f199c12208b6a11f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.9.6

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page