phppkg / cli-markdown
Render colored markdown contents on console terminal
Installs: 2 857
Dependents: 3
Suggesters: 0
Security: 0
Stars: 9
Watchers: 2
Forks: 1
Open Issues: 3
Requires
- php: >8.0.0
- ext-mbstring: *
- cebe/markdown: ^1.2
- toolkit/cli-utils: ~2.0
README
Render colored markdown contents on console terminal
Preview
run demo by
php example/demo.php
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;