Code Monkey home page Code Monkey logo

go-ansi's Introduction

go-ansi

Version License: MIT

import "mpldr.codes/ansi"

Write pretty terminal output the easy way.

Want your text green? ansi.Green("I am Shrek")

Want it black on a red ground? ansi.RedBG(ansi.Black("You can just combine them"))

Moving around is as simple as Specifying a direction ansi.Up()

ANSI Support¹

  • movement
  • line operations (clearing lines)
  • fore- and background colour
  • formatting (bold, italic, strikethrough, …)
  • stripping ANSI-Codes
  • links (even to files)
  • notifications

¹) support depends on the terminal emulator used and configuration

User Choice

This library implements the (informal) NO_COLOR standard. This disables all colour-related ANSI-Codes but does not restrict any other function (like cursor movement or formatting). If this behavior is unwanted please stay on version 1.3.0 or below.

Bugs Reports & Feature Requests

Bug Reports and Feature Requests can be sent to the issue tracker or via email to ~poldi1405/[email protected] (possible without creating an account on Sourcehut).

Patches

Want to improve it yourself? Awesome! Please send your patches to ~poldi1405/[email protected] (see submitted patches here).

For an easy quickstart, just run these commands:

$ git config format.subjectPrefix "PATCH go-ansi"
$ git config sendemail.to "~poldi1405/[email protected]"

Please sign-off your Commits to confirm the DCO.

License

This library is licensed under the MIT License which can be found here.

go-ansi's People

Contributors

mpldr avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.