{"id":13564519,"url":"https://github.com/robertkrimen/godocdown","last_synced_at":"2025-04-13T04:16:46.151Z","repository":{"id":4977536,"uuid":"6135435","full_name":"robertkrimen/godocdown","owner":"robertkrimen","description":"Format package documentation (godoc) as GitHub friendly Markdown","archived":false,"fork":false,"pushed_at":"2021-06-22T20:42:23.000Z","size":252,"stargazers_count":528,"open_issues_count":17,"forks_count":54,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-13T04:16:33.041Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"munin-monitoring/contrib","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robertkrimen.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-10-09T04:42:13.000Z","updated_at":"2025-03-07T19:11:24.000Z","dependencies_parsed_at":"2022-08-02T10:35:36.949Z","dependency_job_id":null,"html_url":"https://github.com/robertkrimen/godocdown","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertkrimen%2Fgodocdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertkrimen%2Fgodocdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertkrimen%2Fgodocdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertkrimen%2Fgodocdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robertkrimen","download_url":"https://codeload.github.com/robertkrimen/godocdown/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248661715,"owners_count":21141451,"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":[],"created_at":"2024-08-01T13:01:32.484Z","updated_at":"2025-04-13T04:16:46.100Z","avatar_url":"https://github.com/robertkrimen.png","language":"Go","funding_links":[],"categories":["Misc","Go"],"sub_categories":[],"readme":"# godocdown\n--\nCommand godocdown generates Go documentation in a GitHub-friendly Markdown\nformat.\n\n    $ go get github.com/robertkrimen/godocdown/godocdown\n\n    $ godocdown /path/to/package \u003e README.markdown\n\n    # Generate documentation for the package/command in the current directory\n    $ godocdown \u003e README.markdown\n\n    # Generate standard Markdown\n    $ godocdown -plain .\n\nThis program is targeted at providing nice-looking documentation for GitHub.\nWith this in mind, it generates GitHub Flavored Markdown\n(http://github.github.com/github-flavored-markdown/) by default. This can be\nchanged with the use of the \"plain\" flag to generate standard Markdown.\n\n### Install\n\n    go get github.com/robertkrimen/godocdown/godocdown\n\n\n### Example\n\nhttp://github.com/robertkrimen/godocdown/blob/master/example.markdown\n\n### Usage\n\n    -output=\"\"\n        Write output to a file instead of stdout\n        Write to stdout with -\n\n    -template=\"\"\n        The template file to use\n\n    -no-template=false\n        Disable template processing\n\n    -plain=false\n        Emit standard Markdown, rather than Github Flavored Markdown\n\n    -heading=\"TitleCase1Word\"\n        Heading detection method: 1Word, TitleCase, Title, TitleCase1Word, \"\"\n        For each line of the package declaration, godocdown attempts to detect if\n        a heading is present via a pattern match. If a heading is detected,\n        it prefixes the line with a Markdown heading indicator (typically \"###\").\n\n        1Word: Only a single word on the entire line\n            [A-Za-z0-9_-]+\n\n        TitleCase: A line where each word has the first letter capitalized\n            ([A-Z][A-Za-z0-9_-]\\s*)+\n\n        Title: A line without punctuation (e.g. a period at the end)\n            ([A-Za-z0-9_-]\\s*)+\n\n        TitleCase1Word: The line matches either the TitleCase or 1Word pattern\n\n\n### Templating\n\nIn addition to Markdown rendering, godocdown provides templating via\ntext/template (http://golang.org/pkg/text/template/) for further customization.\nBy putting a file named \".godocdown.template\" (or one from the list below) in\nthe same directory as your package/command, godocdown will know to use the file\nas a template.\n\n    # text/template\n    .godocdown.markdown\n    .godocdown.md\n    .godocdown.template\n    .godocdown.tmpl\n\nA template file can also be specified with the \"-template\" parameter\n\nAlong with the standard template functionality, the starting data argument has\nthe following interface:\n\n    {{ .Emit }}\n    // Emit the standard documentation (what godocdown would emit without a template)\n\n    {{ .EmitHeader }}\n    // Emit the package name and an import line (if one is present/needed)\n\n    {{ .EmitSynopsis }}\n    // Emit the package declaration\n\n    {{ .EmitUsage }}\n    // Emit package usage, which includes a constants section, a variables section,\n    // a functions section, and a types section. In addition, each type may have its own constant,\n    // variable, and/or function/method listing.\n\n    {{ if .IsCommand  }} ... {{ end }}\n    // A boolean indicating whether the given package is a command or a plain package\n\n    {{ .Name }}\n    // The name of the package/command (string)\n\n    {{ .ImportPath }}\n    // The import path for the package (string)\n    // (This field will be the empty string if godocdown is unable to guess it)\n\n--\n**godocdown** http://github.com/robertkrimen/godocdown\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertkrimen%2Fgodocdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobertkrimen%2Fgodocdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertkrimen%2Fgodocdown/lists"}