{"id":24977697,"url":"https://github.com/adzz/livebook_helpers","last_synced_at":"2025-04-11T14:22:18.393Z","repository":{"id":41460397,"uuid":"449829197","full_name":"Adzz/livebook_helpers","owner":"Adzz","description":"Generates livebooks from module docs","archived":false,"fork":false,"pushed_at":"2022-06-16T15:28:59.000Z","size":275,"stargazers_count":17,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-09T18:48:18.118Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Adzz.png","metadata":{"files":{"readme":"README.md","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":"2022-01-19T19:32:54.000Z","updated_at":"2025-01-10T23:02:00.000Z","dependencies_parsed_at":"2022-09-05T00:32:14.891Z","dependency_job_id":null,"html_url":"https://github.com/Adzz/livebook_helpers","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/Adzz%2Flivebook_helpers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adzz%2Flivebook_helpers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adzz%2Flivebook_helpers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adzz%2Flivebook_helpers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Adzz","download_url":"https://codeload.github.com/Adzz/livebook_helpers/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248418204,"owners_count":21100191,"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":"2025-02-03T23:08:44.613Z","updated_at":"2025-04-11T14:22:18.374Z","avatar_url":"https://github.com/Adzz.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LivebookHelpers\n\nSome useful helpers that you can use to interact with livebook.\n\nSee [this blog post](https://blog.appsignal.com/2022/05/24/livebook-for-elixir-just-what-the-docs-ordered.html) for more\n\n## Generating Livebooks From Module Functions.\n\nThe easiest way to use this is to include `LivebookHelpers` as a dev dependency:\n\n```elixir\n{:livebook_helpers, \"~\u003e 0.0.6\", only: :dev}\n```\n\nNow you can run the mix task as follows:\n\n```sh\nmix CreateLivebookFromModule YourModule \"path_to_destination_livebook\"\n```\n\nYou can try it out with like this:\n\n```sh\nmix CreateLivebookFromModule LivebookHelpers \"livebook_helpers_livebook\"\n```\n\n### Protocol Implementations\n\nWhen you implement a protocol a new module is created:\n\n```elixir\ndefmodule Thing do\n  defimpl Enum do\n    ...\n  end\nend\n```\n\nThis would create a module called `Enum.Thing`. If I were documenting all the functions in `Thing`, it would be great if it included any protocols that were implemented there also, but because a new module is created it's not trivial to do. We would have to find all protocols, then see if our module implemented any of them, then construct the module name and generate the docs for that module. I plan on trying this at some point.\n\nThat means currently you will have to generate a livebook for each protocol implementation. You can find the name of the created module by doing this:\n\n```elixir\ndefmodule Thing do\n  defimpl Enum do\n    __MODULE__ |\u003e IO.inspect(limit: :infinity, label: \"protocol module name\")\n    ...\n  end\nend\n```\n\n## Installation\n\nIf [available in Hex](https://hex.pm/docs/publish), the package can be installed\nby adding `livebook_helpers` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:livebook_helpers, \"~\u003e 0.0.8\", only: :dev}\n  ]\nend\n```\n\n### Contributing\n\n**NB** Set the `MIX_ENV` to `:docs` when publishing the package. This will ensure that modules inside `test/support` won't get their documentation published with the library (as they are included in the :dev env).\n\n```sh\nMIX_ENV=docs mix hex.publish\n```\n\nYou will also have to set that env if you want to run `mix docs`\n\n```sh\nMIX_ENV=docs mix docs\n```\n\n\nDocumentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)\nand published on [HexDocs](https://hexdocs.pm). Once published, the docs can\nbe found at \u003chttps://hexdocs.pm/livebook_helpers\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadzz%2Flivebook_helpers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadzz%2Flivebook_helpers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadzz%2Flivebook_helpers/lists"}