tomkyle/tabulate
最新稳定版本:1.1.1
Composer 安装命令:
composer require tomkyle/tabulate
包简介
Format 2D arrays as CLI console table, Markdown, CSV, YAML, JSON.
README 文档
README
Format 2D arrays as CLI tables, Markdown, CSV, YAML, and JSON.
Requirements
- PHP 8.3 or higher
- Symfony Console component for
SymfonyStyleTable - Symfony Yaml component for
YamlTable
Installation
Install via Composer:
composer require tomkyle/tabulate
Quick Start
composer require tomkyle/tabulate
use tomkyle\Tabulate\TableFactory; $data = [ ['Name' => 'Alice', 'Age' => 30], ['Name' => 'Bob', 'Age' => 25], ]; $factory = new TableFactory(); $factory->fromString('markdown')($data);
Features
- Multiple formats: CLI, Markdown, CSV, YAML, JSON
- Column alignment: Auto-detection and manual override
- Stream output: Direct file writing, memory-efficient processing
- Factory pattern: Dynamic formatter creation for your CLI script with
--formatoption support
Documentation
License
MIT License - see LICENSE file.
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-06-10