{"id":14008106,"url":"https://github.com/ycd/toc","last_synced_at":"2025-03-16T19:32:20.280Z","repository":{"id":38369280,"uuid":"331098754","full_name":"ycd/toc","owner":"ycd","description":"🚩 Zero configuration table of content generator for Markdown files.","archived":false,"fork":false,"pushed_at":"2024-02-07T16:52:58.000Z","size":832,"stargazers_count":97,"open_issues_count":3,"forks_count":15,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-10T18:58:37.393Z","etag":null,"topics":["cli","developer-tools","golang","markdown","table-of-contents","toc-generator"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ycd.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":"2021-01-19T20:17:51.000Z","updated_at":"2025-03-08T03:36:59.000Z","dependencies_parsed_at":"2024-06-18T22:38:31.842Z","dependency_job_id":"f6670993-915f-4455-ae8d-6bbf0cb9100b","html_url":"https://github.com/ycd/toc","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ycd%2Ftoc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ycd%2Ftoc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ycd%2Ftoc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ycd%2Ftoc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ycd","download_url":"https://codeload.github.com/ycd/toc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243826797,"owners_count":20354221,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["cli","developer-tools","golang","markdown","table-of-contents","toc-generator"],"created_at":"2024-08-10T11:01:13.880Z","updated_at":"2025-03-16T19:32:19.991Z","avatar_url":"https://github.com/ycd.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\u003ch1\u003etoc\u003c/h1\u003e\n\n[toc](https://github.com/ycd/toc) TOC, table of content generator for Markdown files\n\n\n![toc gif](assets/toc.gif)\n\n\u003c/div\u003e\n\n\n# Table of Contents\n\n\u003c!--toc--\u003e\n- [Table of Contents](#table-of-contents)\n    * [Usage](#usage)\n    * [Installation](#installation)\n        * [Packages](#packages)\n            * [Arch Linux](#arch-linux)\n            * [Homebrew](#homebrew)\n            * [Docker](#docker)\n        * [Downloads](#downloads)\n        * [Installation from source](#installation-from-source)\n            * [Unix/Linux](#unixlinux)\n    * [Contributing](#contributing)\n    * [Licence](#licence)\n\n\u003c!-- tocstop --\u003e\n\n---\n\n## Usage\n\n\n\n```\nUsage: toc [options]\nOptions:\n\t-p, --path      \u003cpath\u003e   Path for the markdown file.                               [REQUIRED]\n\t-a, --append    \u003cbool\u003e   Append toc after \u003c!--toc--\u003e, or write to stdout.          [Default: true]\n\t-b, --bulleted  \u003cbool\u003e   Write as bulleted, or write as numbered list.             [Default: true] \n\t-s, --skip      \u003cint\u003e    Skip the first given number of headers.                   [Default: 0]\n\t-d, --depth     \u003cint\u003e    Set the number of maximum heading level to be included.   [Default: 6]\n\t-h, --help               Show this message and exit.\n```\n\nAdd `\u003c!--toc--\u003e`  to your markdown to the place where you want to add Table of Contents. That's it.\n\nGive the markdown file as an input with `-p`, `--path` flags.\n\n```\n$ toc -p path/to/markdown.md\n```\n\nCreate numbered list instead of bulleted list.\n\n```\n$ toc --bulleted=false\n```\n\nWrite result to standard output instead of appending.\n\n```\n$ toc --append=false\n```\n\nSkip the first `n` number of headers via `-s`, `--skip` flags.\n\n```\n$ toc --skip 2\n```\n\nSet the number of maximum heading level to be included with `-d`, `--depth` flags. \n\nSet maximum heading level to 3 (h3)\n\n```\n$ toc --depth 3\n```\n\n---\n\n\n## Installation\n\n\n### Packages\n\n#### Arch Linux\n\n* [ ] For Arch Linux, install the [``]() package.\n\n#### Homebrew\n\n* [ ] For Homebrew on macOS, install the [``]() formula.\n\n#### Docker \n\nIt is available via two tags.\n\nYou can either use `latest` or `$VERSION`.\n\n```sh\ndocker run --rm -it yagizcan/toc:latest toc\n```\n\n\n### Downloads\n\nBinary downloads of example are available from [the releases section on GitHub](https://github.com/ycd/toc/releases/) for 64-bit Windows, macOS, and Linux targets. They contain the compiled executable.\n\n| platform     |\n| ----------- | \n| [macOS 64 Bit](https://github.com/ycd/toc/releases/download/v0.2.5/toc_0.2.5_darwin_x86_64.tar.gz)   \n| [Linux 32-Bit](https://github.com/ycd/toc/releases/download/v0.2.5/toc_0.2.5_linux_i386.tar.gz) \n| [Linux ARM 64 Bit](https://github.com/ycd/toc/releases/download/v0.2.5/toc_0.2.5_linux_arm64.tar.gz)    \n| [Linux 64 Bit](https://github.com/ycd/toc/releases/download/v0.2.5/toc_0.2.5_linux_x86_64.tar.gz)    \n| [Windows 64 Bit](https://github.com/ycd/toc/releases/download/v0.2.5/toc_0.2.5_windows_x86_64.zip)       \n| [Windows 32 Bit](https://github.com/ycd/toc/releases/download/v0.2.5/toc_0.2.5_windows_i386.zip)       \n\n\n\n### Installation from source\n\n0. Verify that you have Go 1.13+ installed\n\n   ```\n   $ go version\n   ```\n\n   If `go` is not installed, follow instructions on [the Go website](https://golang.org/doc/install).\n\n1. Clone this repository\n\n   ```\n   $ git clone https://github.com/ycd/toc \n   $ cd ycd\n   ```\n\n2. Build and install\n\n   #### Unix/Linux\n   ```\n   # May require you to use sudo\n   $ go build .\n   $ cp toc /usr/local/toc\n   ```\n   \n3. Verify installation\n\n   ```\n   $ toc -h \n\n   Usage: toc [options]\n   Options:\n      -p, --path      \u003cpath\u003e   Path for the markdown file.                               [REQUIRED]\n      -a, --append    \u003cbool\u003e   Append toc after \u003c!--toc--\u003e, or write to stdout.          [Default: true]\n      -b, --bulleted  \u003cbool\u003e   Write as bulleted, or write as numbered list.             [Default: true] \n      -s, --skip      \u003cint\u003e    Skip the first given number of headers.                   [Default: 0]\n      -d, --depth     \u003cint\u003e    Set the number of maximum heading level to be included.   [Default: 6]\n      -h, --help               Show this message and exit.\n   ```\n---\n\n\n## Contributing\n\nAll kinds of Pull Requests and Feature Requests are welcomed!\n\n## Licence\n\ntoc's source code is licenced under the [Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0.txt).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fycd%2Ftoc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fycd%2Ftoc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fycd%2Ftoc/lists"}