sharkdp / bat

A cat(1) clone with wings.
Apache License 2.0
49.43k stars 1.25k forks source link

How to use as a module ? #3109

Open Aviksaikat opened 2 weeks ago

Aviksaikat commented 2 weeks ago

How can we use bat as a module and use it for colourful logging and terminal outputs from rust programs?

keith-hall commented 1 week ago

https://github.com/sharkdp/bat?tab=readme-ov-file#development

If you want to build an application that uses bats pretty-printing features as a library, check out the the API documentation. Note that you have to use either regex-onig or regex-fancy as a feature when you depend on bat as a library.

Aviksaikat commented 1 week ago

Do we have to create a new instance of PrettyPrinter every time we want to print out something?