Skip to main content

Colour your terminal output by emotional tone

Project description

textmood

PyPI License

Colour your terminal output by emotional tone.

textmood analyses the mood of any text and prints it in a matching colour — happy text in yellow, angry in red, sad in blue, calm in cyan, fearful in magenta.

Install

pip install textmood

Quick start

As a command

textmood "I can't believe how amazing today was!"
textmood "This is absolutely frustrating and broken."
textmood "The weather is mild. Nothing special."

# Show mood scores
textmood "I love this wonderful day!" --scores

In your Python code

from textmood import print_mood, score_text

# Print text in its mood colour
print_mood("I love this amazing day!")

# Just get the mood without printing
mood, scores = score_text("This is terrible and broken.")
print(mood)     # "angry"
print(scores)   # {"happy": 0, "angry": 2, "sad": 0, ...}

Moods and colours

Mood Colour Example words
Happy Yellow amazing, love, wonderful, excited
Angry Red hate, terrible, furious, broken
Sad Blue sad, lonely, heartbroken, grief
Calm Cyan fine, okay, normal, mild
Fearful Magenta scared, anxious, panic, dread

Contributing

  1. Fork this repo
  2. Create a branch: git checkout -b my-feature
  3. Make your changes and add tests
  4. Run tests: pytest tests/ -v
  5. Open a pull request

Bug reports and feature ideas are welcome — open an issue anytime.

License

MIT © 2025 Jose Dalanon

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

textmood-0.1.5.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

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

textmood-0.1.5-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file textmood-0.1.5.tar.gz.

File metadata

  • Download URL: textmood-0.1.5.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for textmood-0.1.5.tar.gz
Algorithm Hash digest
SHA256 8df41486ac65d78d15fcd4680d195c7ead689d7fe881dc6ef7f58ee4847fbede
MD5 e5d626e1395b5c7d399324a0a4f4610c
BLAKE2b-256 f783fb672a5bc52bd6708055c5f8856b58616388e606d58ecc05678819f32193

See more details on using hashes here.

File details

Details for the file textmood-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: textmood-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for textmood-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 4a5c6bbd1ff11e366c1c9b7c09ed59214e7c3d4fcc94a696ceeda71b5944211d
MD5 912e290d4653b0c4724e2ab67e9b8198
BLAKE2b-256 3f5999c53a31f036e8705518f273a16f1a6da13850fc36af956a799a9427a03e

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