9

Github GitHub - pterm/pterm: ✨ #PTerm is a modern go module to beautify console...

 3 years ago
source link: https://github.com/pterm/pterm
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

computer PTerm | Pretty Terminal Printer

A golang module to print pretty text

Show Demo Code


PTerm.sh | Installation | Documentation | Quick Start | Examples | Q&A | Contributing


package Installation

To make PTerm available in your project, you can run the following command.
Make sure to run this command inside your project, when you're using go modules wink

go get github.com/pterm/pterm

goal_net Goal of PTerm

PTerm is designed to create a platform independent way to create beautiful terminal output. Most modules that want to improve the terminal output do not guarantee platform independence - PTerm does. PTerm follows the most common methods for displaying color in a terminal. With PTerm, it is possible to create beautiful output even in low-level environments.

yo_yo Easy to use

Our first priority is to keep PTerm as easy to use as possible. With many examples for each individual component, getting started with PTerm is extremely easy. All components are similar in design and implement interfaces to simplify mixing individual components together.

woman_juggling Cross-Platform

We take special precautions to ensure that PTerm works on as many operating systems and terminals as possible. Whether it's Windows CMD, macOS iTerm2 or in the backend (for example inside a GitHub Action or other CI systems), PTerm guarantees beautiful output!

PTerm is actively tested on Windows, Linux (Debian & Ubuntu) and macOS.

star Main Features

test_tube Well tested

PTerm has a 100% test coverage, which means that every line of code inside PTerm gets tested automatically

We test PTerm continuously. However, since a human cannot test everything all the time, we have our own test system with which we currently run 5455 automated tests to ensure that PTerm has no bugs.

sparkles Consistent Colors

PTerm uses the ANSI color scheme which is widely used by terminals to ensure consistent colors in different terminal themes. If that's not enough, PTerm can be used to access the full RGB color scheme (16 million colors) in terminals that support TrueColor.

books Component system

PTerm consists of many components, called Printers, which can be used individually or together to generate pretty console output.

hammer_and_wrench Configurable

PTerm can be used by without any configuration. However, you can easily configure each component with little code, so everyone has the freedom to design their own terminal output.

warning NOTICE

PTerm is currently under development. It is very likely that not all things will remain as they are at the moment. However, PTerm is still functional. The versioning of PTerm follows the SemVer guidelines. Breaking Changes are explicitly mentioned in the changelogs and the version will be increased accordingly. Everybody is welcome to improve PTerm, whether by making suggestions or pull requests. Thanks heart

If you want to wait for a stable release, make sure to star the project and follow it, to get notified when we release v1.0.0 (stable) rocket

pencil2 Documentation

To view the official documentation of the latest release, you can go to the automatically generated page of pkg.go.dev This documentation is very technical and includes every method that can be used in PTerm.

For an easy start we recommend that you take a look at the examples section. Here you can see pretty much every feature of PTerm with its source code. The animations of the examples are automatically updated as soon as something changes in PTerm.

Have fun exploring this project rocket

sparkling_heart Contributing

If you have found a bug or want to suggest a feature, you can do so here by opening a new issue.

If you want to contribute to the development of PTerm, you are very welcome to do so. Our contribution guidelines can be found here.

two_hearts Support

If you want to support me in further developing my open source projects, you can give me a little tip smile
Your financial support enables me to focus more on my projects. Thank you very much!

test_tube Examples

You can find all the examples, with their source code, here: ./_examples

barchart

SHOW SOURCE

bigtext

SHOW SOURCE

SHOW SOURCE

bulletlist

SHOW SOURCE

bulletlist-custom

SHOW SOURCE

center

SHOW SOURCE

SHOW SOURCE

disable-color

SHOW SOURCE

disable-output

SHOW SOURCE

header

SHOW SOURCE

header-custom

SHOW SOURCE

override-default-printers

SHOW SOURCE

panel

SHOW SOURCE

paragraph

SHOW SOURCE

paragraph-custom

SHOW SOURCE

prefix

SHOW SOURCE

print-basic-text

SHOW SOURCE

print-color-fade

SHOW SOURCE

print-color-fade-multiple

SHOW SOURCE

print-color-rgb

SHOW SOURCE

print-with-color

SHOW SOURCE

progressbar

SHOW SOURCE

section

SHOW SOURCE

spinner

SHOW SOURCE

style

SHOW SOURCE

table

SHOW SOURCE

theme

SHOW SOURCE

SHOW SOURCE

GitHub @pterm  ·  Author @MarvinJWendt | PTerm.sh


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK