{"id":20433954,"url":"https://github.com/cable8mm/toc","last_synced_at":"2026-04-19T02:33:39.185Z","repository":{"id":236290746,"uuid":"792324674","full_name":"cable8mm/toc","owner":"cable8mm","description":"The TOC is an opinionated table of contents generator","archived":false,"fork":false,"pushed_at":"2025-07-21T09:07:19.000Z","size":132,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-21T11:18:27.480Z","etag":null,"topics":["document2"],"latest_commit_sha":null,"homepage":"http://www.palgle.com/toc/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cable8mm.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-26T12:42:46.000Z","updated_at":"2025-07-21T09:07:23.000Z","dependencies_parsed_at":"2024-05-01T11:44:27.807Z","dependency_job_id":"71086cfc-4c47-4ddc-90a2-49dbce47f07e","html_url":"https://github.com/cable8mm/toc","commit_stats":null,"previous_names":["cable8mm/toc"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/cable8mm/toc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cable8mm%2Ftoc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cable8mm%2Ftoc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cable8mm%2Ftoc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cable8mm%2Ftoc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cable8mm","download_url":"https://codeload.github.com/cable8mm/toc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cable8mm%2Ftoc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31992012,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["document2"],"created_at":"2024-11-15T08:22:54.928Z","updated_at":"2026-04-19T02:33:39.165Z","avatar_url":"https://github.com/cable8mm.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TOC - TOC library for document2\n\n[![code-style](https://github.com/cable8mm/toc/actions/workflows/code-style.yml/badge.svg)](https://github.com/cable8mm/toc/actions/workflows/code-style.yml)\n[![run-tests](https://github.com/cable8mm/toc/actions/workflows/run-tests.yml/badge.svg)](https://github.com/cable8mm/toc/actions/workflows/run-tests.yml)\n[![Packagist Version](https://img.shields.io/packagist/v/cable8mm/toc)](https://packagist.org/packages/cable8mm/toc)\n[![Packagist Downloads](https://img.shields.io/packagist/dt/cable8mm/toc)](https://packagist.org/packages/cable8mm/toc/stats)\n[![Packagist Dependency Version](https://img.shields.io/packagist/dependency-v/cable8mm/toc/php)](https://packagist.org/packages/cable8mm/toc)\n[![Packagist Stars](https://img.shields.io/packagist/stars/cable8mm/toc)](https://github.com/cable8mm/toc/stargazers)\n[![Packagist License](https://img.shields.io/packagist/l/cable8mm/toc)](https://github.com/cable8mm/toc/blob/main/LICENSE.md)\n\nThe TOC is a library for the project [document2](https://github.com/cable8mm/document2).\n\n## Features\n\n- [x] Laravel toc\n- [x] Samsung Tizen toc\n- [x] Naver clova ai toc\n- [x] Rhymix toc\n\n## Installation\n\n```shell\ncomposer require cable8mm/toc\n```\n\n## Usage\n\n```php\nnamespace Cable8mm\\Toc;\n\n$markdown = '\n- ## Prologue\n    - [Release Notes](/docs/{{version}}/releases)\n    - [Upgrade Guide](/docs/{{version}}/upgrade)\n    - [Contribution Guide](/docs/{{version}}/contributions)\n- ## Getting Started\n    - [Installation](/docs/{{version}}/installation)\n    - [Configuration](/docs/{{version}}/configuration)\n';\n\n$lines = Toc::of($markdown)-\u003egetLines();\n\nforeach ($lines as $line) {\n    // example \"- ## Prologue\"\n    // example \"    - [Release Notes](/docs/{{version}}/releases)\"\n    print $line-\u003egetTitle().PHP_EOL;\n    //=\u003e \"Prologue\"\n    //=\u003e \"Release Notes\"\n    print $line-\u003egetLink().PHP_EOL;\n    //=\u003e null\n    //=\u003e \"/docs/{{version}}/releases\"\n    print $line-\u003egetType().PHP_EOL;\n    //=\u003e ItemEnum::section\n    //=\u003e ItemEnum::page\n    print $line-\u003egetDepth().PHP_EOL;\n    //=\u003e 1\n    //=\u003e 2\n}\n```\n\n## Testing\n\n```shell\ncomposer test\n```\n\n## Formatting\n\n```shell\ncomposer lint\n# Modify all files to comply with the PSR-12.\n\ncomposer inspect\n# Inspect all files to ensure compliance with PSR-12.\n```\n\n## License\n\nThe Document2 project is open-sourced software licensed under the [MIT license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcable8mm%2Ftoc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcable8mm%2Ftoc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcable8mm%2Ftoc/lists"}