Skip to main content

Colour your terminal output by emotional tone

Project description

textmood

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.3.tar.gz (3.7 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.3-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: textmood-0.1.3.tar.gz
  • Upload date:
  • Size: 3.7 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.3.tar.gz
Algorithm Hash digest
SHA256 935a34b9600a4cd531e93fa861d0d480657ce8c25ab644e27193ae745ad32d58
MD5 8ff983039ed5d4794acc84b0b148bb32
BLAKE2b-256 a87771a6799d2723aba62c7a653d6e49784311723da5fa71742e257ef595d850

See more details on using hashes here.

File details

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

File metadata

  • Download URL: textmood-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 44a413c7a95a39925bb3ae0271a8bcd1e0d2bdc42e4fb522db70907cdf200ed1
MD5 99e03bcce29b3de02694f64bc5aa02b2
BLAKE2b-256 ea2d092eea4cd908be3c99d9dc30d88777a1956aa433ccbdbc450498c13df263

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