A fun way to customize your terminal with colors, styles etc...
Project description
Bored of your terminal? Try some :mage_man: Magic
Updates
(v0.0.4 Aug/25/2021)
Changes
None
Fixes
- Fixed major issue causing the whole library to malfunction.
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!
Installation
Windows
py -m pip install magic-terminal
Import
from magic import *
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.
from magic import Print
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.
from magic import Print
Print.type(420)
Output: 420
class Get
-
styled_text - This returns a string of text with the specified style.
from magic import Get
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.
from magic import Get
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
Previous updates
v0.0.3
Changes
- Updated
README.md
Fixes
None
v0.0.2
Changes
- Changes
setup.py
tosetup.cfg
- Updated
README.md
Fixes
- Remastered the setup system.
v0.0.1
:tada: Launched the library :tada:
Changes
- Added
LICENSE.txt
- Added
README.md
- Added
- Added
Get
Fixes
None
v0.0.0-Alpha
Changes
- Added
MANIFEST.in
- Added
myproject.toml
- Added
setup.py
- Added
Style
- Added
Color
- Added
Highlight
Fixes
None
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.4.tar.gz
(4.1 kB
view hashes)
Built Distribution
Close
Hashes for magic_terminal-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63b99858562d275db55009e0b34225e7d2102e322f7cb539b84f3d3257a6838a |
|
MD5 | e150cb3d405a8abef59a0f08cff0eb9d |
|
BLAKE2b-256 | 018d2ad0956e9ff91b357a8e7b8745089013d2a87d1fecbe903a13dec691aac6 |