{"id":23181155,"url":"https://github.com/joeshaw/doc-extract","last_synced_at":"2026-03-10T14:30:58.941Z","repository":{"id":57488402,"uuid":"108310721","full_name":"joeshaw/doc-extract","owner":"joeshaw","description":"Go tool for extracting text from specially tagged Go comments","archived":false,"fork":false,"pushed_at":"2021-04-07T14:04:58.000Z","size":14,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-18T13:44:14.732Z","etag":null,"topics":["api-blueprint","comments","extract","go","golang","sphinx"],"latest_commit_sha":null,"homepage":null,"language":"HTML","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/joeshaw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-25T18:39:25.000Z","updated_at":"2024-09-17T05:00:49.000Z","dependencies_parsed_at":"2022-08-29T13:31:53.169Z","dependency_job_id":null,"html_url":"https://github.com/joeshaw/doc-extract","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/joeshaw/doc-extract","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeshaw%2Fdoc-extract","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeshaw%2Fdoc-extract/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeshaw%2Fdoc-extract/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeshaw%2Fdoc-extract/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joeshaw","download_url":"https://codeload.github.com/joeshaw/doc-extract/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeshaw%2Fdoc-extract/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30337171,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T12:41:07.687Z","status":"ssl_error","status_checked_at":"2026-03-10T12:41:06.728Z","response_time":106,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["api-blueprint","comments","extract","go","golang","sphinx"],"created_at":"2024-12-18T08:14:43.711Z","updated_at":"2026-03-10T14:30:58.916Z","avatar_url":"https://github.com/joeshaw.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# doc-extract\n\ndoc-extract is a tool for extracting specially tagged comments in Go\nsource code.  Tagged comments start with a blank line containing\n`+extract`.  Both grouped line comments (`//`) and block comments (`/*\n*/`) are supported.\n\n## Installation\n\nGo 1.16 and later:\n\n    go install github.com/joeshaw/doc-extract@latest\n\nGo 1.15 and earlier:\n\n    go get -u github.com/joeshaw/doc-extract\n\n## Usage\n\nSimply tag comments in your Go source code with `+extract` as the first\nline of your comment.  For example,\n\n```go\npackage main\n\n// +extract\n// API Documentation\n// =================\n//\n// (TODO: add documentation)\n```\n\nThen run the `doc-extract` command, providing it with a directory of\nGo source files and an output file:\n\n    doc-extract ./example example.txt\n\nSource files are processed in lexicographic order, _except_ that a file\nnamed `doc.go` gets highest priority.  Comments within a file are\nprocessed in the order they appear.\n\nThis predictable ordering allows you to add, for instance, a header to\nthe output file by adding it to `doc.go`.\n\n## Example\n\nThe `example` directory contains an [example using API\nBlueprint](example/README.md).\n\n## Motivation\n\nThis tool is especially useful for extracting documentation from\ncomments when GoDoc isn't appropriate.  For example, documentation for\nHTTP APIs.  This could be used to extract [API\nBlueprint](https://apiblueprint.org/) for processing by\n[Snowboard](https://github.com/bukalapak/snowboard).  Or it could be\nused to pull ReStructured Text (RST) for processing by\n[Sphinx](http://sphinx-doc.org/) and the\n[httpdomain](https://sphinxcontrib-httpdomain.readthedocs.io/en/stable/)\nextension.\n\nThis replaces my now-deprecated\n[rst-extract](https://github.com/joeshaw/rst-extract) tool.\n\n## Contributing\n\nIssues and pull requests are welcome.  When filing a PR, please make\nsure the code has been run through `gofmt` and that the tests pass.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeshaw%2Fdoc-extract","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoeshaw%2Fdoc-extract","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeshaw%2Fdoc-extract/lists"}