{"id":13714301,"url":"https://github.com/dave/rebecca","last_synced_at":"2025-05-07T13:04:09.269Z","repository":{"id":17897295,"uuid":"82486698","full_name":"dave/rebecca","owner":"dave","description":"Rebecca is a readme generator for Go","archived":false,"fork":false,"pushed_at":"2022-05-22T16:19:56.000Z","size":16,"stargazers_count":113,"open_issues_count":2,"forks_count":8,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-07T13:04:03.292Z","etag":null,"topics":["go","golang","readme","template"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/dave.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-02-19T20:17:08.000Z","updated_at":"2025-04-13T14:41:50.000Z","dependencies_parsed_at":"2022-09-26T17:41:22.139Z","dependency_job_id":null,"html_url":"https://github.com/dave/rebecca","commit_stats":null,"previous_names":["davelondon/rebecca"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dave%2Frebecca","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dave%2Frebecca/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dave%2Frebecca/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dave%2Frebecca/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dave","download_url":"https://codeload.github.com/dave/rebecca/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252883227,"owners_count":21819158,"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":["go","golang","readme","template"],"created_at":"2024-08-02T23:01:56.598Z","updated_at":"2025-05-07T13:04:09.251Z","avatar_url":"https://github.com/dave.png","language":"Go","funding_links":[],"categories":["Repositories"],"sub_categories":[],"readme":"# Rebecca\n\nRebecca is a readme generator. \n\nManaging the GitHub readme for your Go project can be a drag. When creating \n[jennifer](https://github.com/dave/jennifer) I found examples copied into \nthe markdown would get out of date, and documentation was duplicated. I created \nrebecca to solve this: see \n[README.md.tpl](https://github.com/dave/jennifer/blob/master/README.md.tpl) \nin the [jennifer](https://github.com/dave/jennifer) repo for a real world \nexample.\n\n# Install\n\n```\ngo install github.com/dave/rebecca/cmd/becca@latest\n```\n\n# Usage\n\n```\nbecca [-package={your-package}]\n```\n\nRebecca will read `README.md.tpl` and overwrite `README.md` with the rendered \ntemplate. The package specified on the command line is parsed (if no package is \nspecified, it is detected from the current working directory). \n\nThe package is scanned for examples and documentation. Rebecca uses the Go \ntemplate library, and adds some custom template functions:  \n\n# Example\n\n```\n{{ \"ExampleFoo\" | example }}\n```\n\nThis prints the code and expected output for the `ExampleFoo` example.\n  \n# Doc\n\n```\n{{ \"Foo\" | doc }}\n```\n\nThis prints the documentation for `Foo`. All package level declarations are \nsupported (`func`, `var`, `const` etc.)\n\n```\n{{ \"Foo.Bar\" | doc }}\n```\n\nThis prints the documentation for the `Bar` member of the `Foo` type. Methods \nand struct fields are supported.\n\nYou can also specify which sentances to print, using Go slice notation:\n\n```\n{{ \"Foo[i]\" | doc }}\n{{ \"Foo[i:j]\" | doc }}\n{{ \"Foo[i:]\" | doc }}\n{{ \"Foo[:i]\" | doc }}\n```\n\nSee [here](https://github.com/dave/jennifer/blob/5f1e5084f7fff920e11d5b9098e5ae8089136a1a/README.md.tpl#L51-L58) and [here](https://github.com/dave/jennifer/blob/5f1e5084f7fff920e11d5b9098e5ae8089136a1a/README.md.tpl#L286-L299) for real-world examples of this.\n\n# Code, Output\n\n```\n{{ \"ExampleFoo\" | code }}\n```\n\nThis prints just the code for the `ExampleFoo` example.\n\n```\n{{ \"ExampleFoo\" | output }}\n```\n\nThis prints just the expected output for the `ExampleFoo` example.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdave%2Frebecca","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdave%2Frebecca","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdave%2Frebecca/lists"}