{"id":13508283,"url":"https://github.com/f34nk/tidy_ex","last_synced_at":"2026-02-28T10:05:43.447Z","repository":{"id":62430435,"uuid":"131156212","full_name":"f34nk/tidy_ex","owner":"f34nk","description":"Elixir binding to the granddaddy of HTML tools","archived":false,"fork":false,"pushed_at":"2024-02-14T11:10:16.000Z","size":889,"stargazers_count":9,"open_issues_count":3,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-17T17:49:56.053Z","etag":null,"topics":["elixir","html-par","html-ren","html-repair","html5"],"latest_commit_sha":null,"homepage":"http://www.html-tidy.org/","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/f34nk.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":"2018-04-26T12:59:53.000Z","updated_at":"2024-02-14T11:10:20.000Z","dependencies_parsed_at":"2024-05-01T16:19:54.092Z","dependency_job_id":"b9c56803-cc70-4f82-8d26-1243afea8849","html_url":"https://github.com/f34nk/tidy_ex","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f34nk%2Ftidy_ex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f34nk%2Ftidy_ex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f34nk%2Ftidy_ex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f34nk%2Ftidy_ex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/f34nk","download_url":"https://codeload.github.com/f34nk/tidy_ex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230167804,"owners_count":18183845,"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":["elixir","html-par","html-ren","html-repair","html5"],"created_at":"2024-08-01T02:00:50.828Z","updated_at":"2025-10-23T19:45:51.218Z","avatar_url":"https://github.com/f34nk.png","language":"C","funding_links":[],"categories":["HTML"],"sub_categories":[],"readme":"# This project is not maintained anymore.\n\n[![Build status](https://travis-ci.org/f34nk/tidy_ex.svg?branch=master)](https://travis-ci.org/f34nk/tidy_ex)\n[![ModestEx version](https://img.shields.io/hexpm/v/tidy_ex.svg)](https://hex.pm/packages/tidy_ex)\n[![Hex.pm](https://img.shields.io/hexpm/dt/tidy_ex.svg)](https://hex.pm/packages/tidy_ex)\n\n![Broom by faisalovers from the Noun Project](https://github.com/f34nk/tidy_ex/blob/master/tidy_ex_icon.png)\n\n# TidyEx\n\nTidyEx corrects and cleans up HTML content by fixing markup errors.\n\nElixir/Erlang bindings for htacg's **tidy-html5**\n\n\u003eThe granddaddy of HTML tools, with support for modern standards [http://www.html-tidy.org](http://www.html-tidy.org)\n\n- [tidy-html5](https://github.com/htacg/tidy-html5)\n\nThe binding is implemented as a **C-Node** following the excellent example in Overbryd's package **nodex**. If you want to learn how to set up bindings to C/C++, you should definitely check it out.\n\n- [nodex](https://github.com/Overbryd/nodex)\n  - distributed Elixir\n  - save binding with C-Nodes\n\n\u003eC-Nodes are external os-processes that communicate with the Erlang VM through erlang messaging. That way you can implement native code and call into it from Elixir in a safe predictable way. The Erlang VM stays unaffected by crashes of the external process.\n\n## Example\nFor more examples please checkout [tests](https://github.com/f34nk/tidy_ex/tree/master/test).\n```elixir\ntest \"can parse broken html\" do\n  result = TidyEx.parse(\"\u003cdiv\u003eHello\u003cspan\u003eWorld\")\n  assert result == \"\u003cdiv\u003eHello\u003cspan\u003eWorld\u003c/span\u003e\u003c/div\u003e\"\nend\n\ntest \"can clean and repair broken html\" do\n  result = TidyEx.clean_and_repair(\"\u003cdiv\u003eHello\u003cspan\u003eWorld\")\n  assert result == \"\u003cdiv\u003eHello\u003cspan\u003eWorld\u003c/span\u003e\u003c/div\u003e\"\nend\n\ntest \"can run diagnostics on invalid html\" do\n  result = TidyEx.run_diagnostics(\"\u003cpp\u003eHello World\u003c/p\u003e\")\n  assert result == \"line 1 column 1 - Error: \u003cpp\u003e is not recognized!\\nThis document has errors that must be fixed before\\nusing HTML Tidy to generate a tidied up version.\"\nend\n```\n\n## Installation\n\nAvailable on [hex](https://hex.pm/packages/tidy_ex).\n\n```elixir\ndef deps do\n  [\n    {:tidy_ex, \"~\u003e 0.1.0-dev\"}\n  ]\nend\n```\n\n## Target dependencies\n```\ncmake 3.x\nerlang-dev\nerlang-xmerl\nerlang-parsetools\n```\n## Compile and test\n```\nmix deps.get\nmix compile\nmix test\n```\n## Cloning\n```\ngit clone git@github.com:f34nk/tidy_ex.git\ncd tidy_ex\n```\nAll binding targets are added as submodules in the `target/` folder.\n```\ngit submodule update --init --recursive --remote\nmix deps.get\nmix compile\nmix test\nmix test.target\n```\nCleanup\n```\nmix clean\n```\n## Roadmap\n\nSee [CHANGELOG](https://github.com/f34nk/tidy_ex/blob/master/CHANGELOG.md).\n\n- [ ] Bindings\n  - [x] Call as C-Node\n  - [ ] Call as dirty-nif\n- [ ] Tests\n  - [ ] Call as C-Node\n  - [ ] Call as dirty-nif\n  - [x] Target tests\n  - [x] Feature tests\n  - [x] Package test\n- [ ] Features\n  - [x] Set tidy-html5 options\n  - [x] Serialize any string with valid or broken html\n  - [x] Clean and repair\n  - [x] Run diagnostics\n- [ ] Documentation\n- [x] Publish as hex package\n\n## Icon Credit\n\nBroom by faisalovers from the Noun Project\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ff34nk%2Ftidy_ex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ff34nk%2Ftidy_ex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ff34nk%2Ftidy_ex/lists"}