alexbowers / treegen
Convert a tabbed nested string into a formatted tree view
Installs: 12
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
pkg:composer/alexbowers/treegen
Requires
- php: >=5.4.0
Requires (Dev)
- fabpot/php-cs-fixer: 1.5.*
- phpunit/phpunit: 4.5.*
- satooshi/php-coveralls: dev-master
This package is not auto-updated.
Last update: 2025-10-25 23:32:09 UTC
README
A text based tree generator for use in documents.
Example Input
Level 0 Child 1
Level 0 Child 2
    Level 1 Child 1
        Level 1 Child 1 Grandchild 1
    Level 1 Child 2
        Level 1 Child 2 Grandchild 1
            Level 1 Child 2 Grandchild 1 Great-grandchild 1
            Level 1 Child 2 Grandchild 1 Great-grandchild 2
            Level 1 Child 2 Grandchild 1 Great-grandchild 3
        Level 1 Child 2 Grandchild 2
            Level 1 Child 2 Grandchild 2 Great-grandchild 1
Example Output
┌── Level 0 Child 1
├── Level 0 Child 2
|   ├── Level 1 Child 1
|   |   └── Level 1 Child 1 Grandchild 1
|   └── Level 1 Child 2
|   |   ├── Level 1 Child 2 Grandchild 1
|   |   |   ├── Level 1 Child 2 Grandchild 1 Great-grandchild 1
|   |   |   ├── Level 1 Child 2 Grandchild 1 Great-grandchild 2
|   |   |   └── Level 1 Child 2 Grandchild 1 Great-grandchild 3
|   |   └── Level 1 Child 2 Grandchild 2
|   |   |   └── Level 1 Child 2 Grandchild 2 Great-grandchild 1
└──