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)
Built Distribution
Close
Hashes for magic_terminal-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b41d12d5741da18c54e78401aa9df98b991347a22b58106b3ae4ad667af8b47 |
|
MD5 | 5ac3624ba20cb72510c6e3844400f947 |
|
BLAKE2b-256 | 460bfa630575a196fc7eb863f427ca9048b821f6ad237be4bd3a3e181e0206ae |