https://github.com/zanderlewis/terminalite
Colorized text for Fortran
https://github.com/zanderlewis/terminalite
Last synced: 3 months ago
JSON representation
Colorized text for Fortran
- Host: GitHub
- URL: https://github.com/zanderlewis/terminalite
- Owner: zanderlewis
- License: mit
- Created: 2024-08-19T23:05:26.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-18T14:22:26.000Z (over 1 year ago)
- Last Synced: 2025-02-02T08:42:21.810Z (over 1 year ago)
- Language: Fortran
- Size: 11.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Terminalite
A library for colorizing terminal text in Fortran.
## Usage
1. Include the `terminalite.f90` file in your project.
```toml
[dependencies]
terminalite = { git = "https://github.com/zanderlewis/terminalite" }
```
2. Use the `terminalite` module in your Fortran program.
```fortran
program terminalite_program
use utils
implicit none
call colorize('Hello, World!', 'FF0000', 'FFFFFF', 1) ! Red text with white background and bold style
! Or, you can use template strings
call template('[BOLD][FG:FF0000][BG:FFFFFF]Hello, World![RESET]')
end program terminalite_program
```
3. Compile the program
```bash
fpm build
```
4. Run the program
```bash
fpm run
```