Skip to main content

Simple Python CLI to help you brainstorm the name of your next product, studio, brand etc

Project description

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! 🚀

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

word_alchemist-0.1.0.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

word_alchemist-0.1.0-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

Details for the file word_alchemist-0.1.0.tar.gz.

File metadata

  • Download URL: word_alchemist-0.1.0.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.6

File hashes

Hashes for word_alchemist-0.1.0.tar.gz
Algorithm Hash digest
SHA256 89474cbe105917a474093749d36cc8755fb461a17089c5755ce5c4870a286fe1
MD5 0fbe764b22eaa963466d4ad868beaf08
BLAKE2b-256 0c05645a8a25df48995781fea1c17eea5c7a59e7a1b9a89db63077009d866306

See more details on using hashes here.

File details

Details for the file word_alchemist-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: word_alchemist-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 18.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.6

File hashes

Hashes for word_alchemist-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c87a9079bb641bca68852d7930740f183545eca114365c15bb319c22ffccb0bc
MD5 e6d102a62a6f99800c8d4c40a53dfd5d
BLAKE2b-256 f4c8dea5586eacbeeb9e4aabf800efebefe4acbcf554cf8f199c12208b6a11f2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page