Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rd4com/mojo-console-style-print
🎨 Style the output of the console
https://github.com/rd4com/mojo-console-style-print
mojo
Last synced: about 2 months ago
JSON representation
🎨 Style the output of the console
- Host: GitHub
- URL: https://github.com/rd4com/mojo-console-style-print
- Owner: rd4com
- License: mit
- Created: 2023-09-09T17:44:28.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-28T07:48:02.000Z (over 1 year ago)
- Last Synced: 2024-02-11T18:46:11.556Z (11 months ago)
- Topics: mojo
- Homepage:
- Size: 6.84 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-mojo - mojo-console-style-print - Style the output of the console. (🗂️ Libraries / Advent of Code 2023)
README
> :heart: part of the effort for the community
> https://github.com/Lynet101/Mojo_community-lib> ⚠️ Has not been tested, not to use as-is
# some console styling
```python
fn main():
var t=pp_()
t["clr"] #clear screen
t["fgblack"]
t["bgwhite"]
t | "mojo"
t["fgwhite"]
t["bgblack"]
t | "rocks"
t["reset"]
t["fgred"]
t["bold_on"]
t["slow_blink"]
t | "!!!"
t["reset"]
t() #newline
t | "normal"
```
# doc
> bg is background and fg is foreground
> t | String(123) for numbers> t() for new line
- reset *reset to default style*
- clr *clear the screen*
- bold_on
- bold_off
- italic_on
- italic_off
- underline_on
- underline_off
- slow_blink
- fast_blink
- blink_off
- invert
- fgblack
- fgred
- fgreen
- fgyellow
- fgblue
- fgpurple
- fgcyan
- fgwhite
- bgblack
- bgred
- bgreen
- bgyellow
- bgblue
- bgpurple
- bgcyan
- bgwhite