Skip to main content

A fun way to customize your terminal with colors, styles etc...

Project description

Bored of your terminal? Try some :mage_man: Magic

What is Magic ?

Magic is a tool that styles your terminal.

How does it work?

Basically it wraps your text with specific codes that tells the terminal to style this text.

Why would I use it?

Well just think how many times you've changed your terminal theme in the past. And how sick of it you're that you're searching for such thing in the first place. :laughing:

Alright enough of the FAQs lets talk code!

class Style

  • default

  • bright

  • underlined

  • blinking

  • fixed_color

class Color

  • black

  • red

  • green

  • yellow

  • blue

  • magenta

  • cyan

  • white

  • reset

class Highlight

  • black

  • red

  • green

  • yellow

  • blue

  • magenta

  • cyan

  • white


class Print

  • text - This allows you to print styled text with some extra values.

 Print.text(
   text = "This is an example for Print.text",
   style = Style.bold,
   color = Color.green,
   end_with_new_line = True)

Output: This is an example for Print.text

  • type - This prints the text with a style based on their value type.

Print.type(420)

Output: 420

class Get

  • styled_text - This returns a string of text with the specified style.

styled_text = Get.styled_text(
    text = "This is a test for styled_text",
    style = Style.bright,
    color = Color.magenta
)

print(styled_text)

Output: This is a test for styled_text

  • layout - This returns the style code of a style.

layout = Get.layout(
    style = Style.underlined,
    color = Color.red,
    highlight = Highlight.green
)

print(layout + "This is a test for layout" + Color.reset)

Output: This is a test for layout

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

magic-terminal-0.0.1.tar.gz (3.7 kB view hashes)

Uploaded Source

Built Distribution

magic_terminal-0.0.1-py3-none-any.whl (3.0 kB view hashes)

Uploaded Python 3

Supported by

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