Skip to main content

Colour your terminal output by emotional tone

Project description

textmood

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.4.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.4-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: textmood-0.1.4.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.4.tar.gz
Algorithm Hash digest
SHA256 7e6f64743490515608cc27a89f9078f8d5f1dcde4602e665a357abc7cc7b2fd4
MD5 b8d78b559fbf3b655e587fc95d4b6d58
BLAKE2b-256 ac597608b71a9d8f8bbcaca581b8441b92e2179db253529f3a76648545f51acb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: textmood-0.1.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 742be38847dc4217d9caca5cb8a5091fe71b7b08fda5ffce1cca142fd6e20c7d
MD5 fcfaf1742804f70f2325fdd4c863af35
BLAKE2b-256 7e94d91a4b1c91bd717aa5a3772f84320dc4dc661008f811a6e6840d5bb8dea1

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