Skip to content
/ pretty Public
forked from clj-commons/pretty

Library for helping print things prettily, in Clojure - ANSI fonts, formatted exceptions

License

Notifications You must be signed in to change notification settings

nha/pretty

 
 

Repository files navigation

Clojars CI cljdoc badge

Sometimes, neatness counts

If you are trying to puzzle out a stack trace, pick a critical line of text out of a long stream of console output, or compare two streams of binary data, a little bit of formatting can go a long way.

That's what org.clj-commons/pretty is for. It adds support for pretty output where it counts:

  • Readable output for exceptions
  • General ANSI font and background color support
  • Readable output for binary sequences

Example

Pretty can print out a sequence of bytes; it includes color-coding inspired by hexyl:

Binary Output

Pretty can also print out a delta of two byte sequences, using background color to indicate where the two sequences differ.

Binary Delta

Pretty is compatible with Clojure 1.10 and above.

Parts of Pretty can be used with Babashka, such as the clj-commons.ansi namespace; however, Babashka runs in an interpreter and its approach to exceptions is incompatible with JVM exceptions.

About

Library for helping print things prettily, in Clojure - ANSI fonts, formatted exceptions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Clojure 100.0%