phppkg/cli-markdown

Render colored markdown contents on console terminal

v2.0.2 2023-11-10 02:56 UTC

This package is auto-updated.

Last update: 2024-12-12 04:53:46 UTC


README

License Php Version GitHub tag (latest SemVer) Actions Status

Render colored markdown contents on console terminal

Preview

run demo by php example/demo.php

demo

Features

  • support auto render color on terminal
  • support custom set cli color tags

Install

composer

composer require phppkg/cli-markdown

Usage

quick usage:

<?php

use PhpPkg\CliMarkdown\CliMarkdown;

require dirname(__DIR__) . '/vendor/autoload.php';

$contents = file_get_contents(dirname(__DIR__) . '/README.md');
$praser = new CliMarkdown;

$rendered = $praser->render($contents);

echo $rendered;

Base on

License

MIT