Popularity
4.0
Declining
Activity
0.0
Stable
8
1
2
Monthly Downloads: 64
Programming language: Haskell
License: BSD 3-clause "New" or "Revised" License
pretty-terminal alternatives and similar packages
Based on the "terminal" category.
Alternatively, view pretty-terminal alternatives based on common mentions on social networks and blogs.
-
terminal
Haskell library for terminal interaction (without terminfo dependency but with Windows support)
Access the most powerful time series database as a service
Ingest, store, & analyze all types of time series data in a fully-managed, purpose-built database. Keep data forever with low-cost storage and superior data compression.
Promo
www.influxdata.com
Do you think we are missing an alternative of pretty-terminal or a related project?
README
pretty-terminal
Example
{-# LANGUAGE OverloadedStrings #-}
module Main where
import qualified Data.Text.IO as T
import System.Console.Pretty (Color (..), Style (..), bgColor, color,
style, supportsPretty)
main :: IO ()
main = do
inColor <- supportsPretty
if inColor then example
else putStrLn "Sorry, this terminal doesn't support pretty ANSI codes"
example :: IO ()
example = do
-- simple style
putStrLn ( style Underline "hello there!" )
-- simple color
putStrLn ( color Yellow "this lib was designed to be easy" )
-- simple background
putStrLn ( bgColor Blue "and the functions layer together easily" )
-- combining
putStrLn ( bgColor White . color Red . style Bold $ "like so!" )
-- custom style & color
let primary = bgColor Magenta . color Green . style Italic
putStrLn ( primary "easily create your own helpers & styles" )
-- with both unicode string types
putStrLn ( color Cyan "String...")
T.putStrLn (color Red "and Text")
-- set styling to none
putStrLn ( primary $ style Normal "or if you need to remove any styling..." )