{"id":18774149,"url":"https://github.com/bunopnu/e2h","last_synced_at":"2025-04-13T09:21:13.816Z","repository":{"id":196555991,"uuid":"696487303","full_name":"bunopnu/e2h","owner":"bunopnu","description":"HTML generator for Erlang","archived":false,"fork":false,"pushed_at":"2024-04-23T10:15:42.000Z","size":50,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-27T00:54:56.116Z","etag":null,"topics":["erlang","html","html-generator","html5","rebar3"],"latest_commit_sha":null,"homepage":"https://hex.pm/packages/e2h","language":"Erlang","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/bunopnu.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":"2023-09-25T20:58:24.000Z","updated_at":"2025-02-22T05:24:53.000Z","dependencies_parsed_at":"2023-09-26T05:13:16.560Z","dependency_job_id":"8a37034c-0227-4ad2-9c98-c175b907105c","html_url":"https://github.com/bunopnu/e2h","commit_stats":null,"previous_names":["bunopnu/e2h"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bunopnu%2Fe2h","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bunopnu%2Fe2h/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bunopnu%2Fe2h/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bunopnu%2Fe2h/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bunopnu","download_url":"https://codeload.github.com/bunopnu/e2h/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248688576,"owners_count":21145766,"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":["erlang","html","html-generator","html5","rebar3"],"created_at":"2024-11-07T19:37:32.693Z","updated_at":"2025-04-13T09:21:13.793Z","avatar_url":"https://github.com/bunopnu.png","language":"Erlang","funding_links":[],"categories":[],"sub_categories":[],"readme":"# e2h\n\n`e2h` (Erlang to HTML) is an Erlang module designed to generate HTML content within the Erlang.\nIt provides functions for encoding HTML elements and attributes, as well as escaping dangerous characters within HTML content.\n\nThis module is suitable for developers who need to programmatically generate HTML documents or elements in their Erlang applications.\n\n[![Test Status](https://github.com/bunopnu/e2h/actions/workflows/test.yml/badge.svg)](https://github.com/bunopnu/e2h/actions/workflows/test.yml)\n[![Coverage Status](https://coveralls.io/repos/github/bunopnu/e2h/badge.svg?branch=main)](https://coveralls.io/github/bunopnu/e2h)\n[![Hex Version](https://img.shields.io/hexpm/v/e2h.svg)](https://hex.pm/packages/e2h)\n\n## Installation\n\nPackage can be installed by adding `e2h` to your list of dependencies:\n\n```erlang\n{deps, [{e2h, \"0.4.2\"}]}.\n```\n\n## Usage Example\n\nHere's a simple example of how to use `e2h` to generate an HTML document in Erlang:\n\n```erlang\nUserStatus = \u003c\u003c\"busy\"\u003e\u003e,\nUserProfileImage = \u003c\u003c\"https://example.com/image.jpeg\"\u003e\u003e,\nUserName = \u003c\u003c\"bob\"\u003e\u003e,\nUserJob = \u003c\u003c\"data scientist\"\u003e\u003e,\n\nDocument = [\n  {\u003c\u003c\"div\"\u003e\u003e, [{\u003c\u003c\"class\"\u003e\u003e, \u003c\u003c\"user\"\u003e\u003e}, {\u003c\u003c\"status\"\u003e\u003e, UserStatus}], [\n    {\u003c\u003c\"img\"\u003e\u003e, [{\u003c\u003c\"href\"\u003e\u003e, UserProfileImage}]},\n    {\u003c\u003c\"div\"\u003e\u003e, [], [\n      {\u003c\u003c\"h1\"\u003e\u003e, [], [UserName]},\n      {\u003c\u003c\"p\"\u003e\u003e, [], [UserJob]}\n    ]}\n  ]}\n],\n\ne2h:render_fragment(Document).\n% (output is manually formatted for readme)\n%\n% \u003cdiv class=\"user\" status=\"busy\"\u003e\n%   \u003cimg href=\"https://example.com/image.jpeg\" /\u003e\n%   \u003cdiv\u003e\n%     \u003ch1\u003ebob\u003c/h1\u003e\n%     \u003cp\u003edata scientist\u003c/p\u003e\n%   \u003c/div\u003e\n% \u003c/div\u003e\n```\n\n## Documentation\n\nFor documentation, please refer to the official [HexDocs](https://hexdocs.pm/e2h) page.\n\n## License\n\n`e2h` is licensed under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbunopnu%2Fe2h","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbunopnu%2Fe2h","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbunopnu%2Fe2h/lists"}