Download the PHP package weew/console-formatter without Composer

On this page you can find all versions of the php package weew/console-formatter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package console-formatter

Output Formatter for command line

Build Status Code Quality Test Coverage Version Licence

Table of contents

Installation

composer require weew/console-formatter

Introduction

This package allows you to format text for terminal, using very simple and html like syntax. You will be able to change text color, text background and text format.

This package has not been tested on windows and I do not intend to do so. Contributions for windows support are highly appreciated.

Adding styles

Before you'll be able to use styles, you must created them first.

Using styles

As soon as you've register a style, it will be applied to matching tags. If a style is unknown, the tag will be ignored. Example below will output properly formatted text.

Using inline styles

You can apply styling inline, without having to register a new style. To do that you must use the <style></style> tag.

You can also use inline styling on predefined styles.

Style isolation

Whenever you have nested styles, one style might inherit from the parent. This is disabled by default to prevent unwanted styles changes. You can enable it for each style separately.

Disabling ANSI

If you're working with a terminal that does not support ANSI, you can disable formatting. All known style tags will be removed from the string.

Examples

You can run the examples.php file to see if it works on your system.


All versions of console-formatter with dependencies

PHP Build Version
Package Version
Requires weew/helpers-array Version ^1.2
weew/helpers-string Version ^1.7
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package weew/console-formatter contains the following files

Loading the files please wait ....