{"id":13636596,"url":"https://github.com/craigbarnes/lua-gumbo","last_synced_at":"2025-07-27T06:12:19.713Z","repository":{"id":10108509,"uuid":"12173574","full_name":"craigbarnes/lua-gumbo","owner":"craigbarnes","description":"Moved to https://gitlab.com/craigbarnes/lua-gumbo","archived":false,"fork":false,"pushed_at":"2024-05-22T21:27:02.000Z","size":2637,"stargazers_count":130,"open_issues_count":0,"forks_count":15,"subscribers_count":17,"default_branch":"master","last_synced_at":"2024-05-22T22:34:06.916Z","etag":null,"topics":["dom","html","html-parser","html5","lua","parser","sanitize-html"],"latest_commit_sha":null,"homepage":"https://gitlab.com/craigbarnes/lua-gumbo","language":"C","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/craigbarnes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/contributing.md","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":"2013-08-17T04:50:04.000Z","updated_at":"2024-07-10T15:06:13.208Z","dependencies_parsed_at":"2024-07-10T15:06:04.734Z","dependency_job_id":"72b1dffc-e66c-4a32-a74b-c455b3e47a2f","html_url":"https://github.com/craigbarnes/lua-gumbo","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craigbarnes%2Flua-gumbo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craigbarnes%2Flua-gumbo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craigbarnes%2Flua-gumbo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craigbarnes%2Flua-gumbo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/craigbarnes","download_url":"https://codeload.github.com/craigbarnes/lua-gumbo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225878144,"owners_count":17538405,"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":["dom","html","html-parser","html5","lua","parser","sanitize-html"],"created_at":"2024-08-02T00:01:03.122Z","updated_at":"2024-11-22T10:18:12.932Z","avatar_url":"https://github.com/craigbarnes.png","language":"C","funding_links":[],"categories":["Libraries"],"sub_categories":[],"readme":"Synopsis\n--------\n\n`lua-gumbo` is a [HTML5] parser and [DOM] library for [Lua]. It\noriginally started out as a set of Lua bindings for the Gumbo C\nlibrary, but has now absorbed an improved [fork] of it.\n\nRequirements\n------------\n\n* C99 compiler\n* [Lua] 5.1+ **or** [LuaJIT] 2.0+\n\nInstallation\n------------\n\nTo install the latest release via [LuaRocks] use the command:\n\n    luarocks install gumbo\n\nUsage\n-----\n\nThe `gumbo` module provides a [`parse`] function and a [`parseFile`]\nfunction, which both return a [`Document`] node containing a tree of\n[descendant] nodes. The structure and API of this tree mostly follows\nthe [DOM] Level 4 Core specification.\n\nFor full API documentation, see: \u003chttps://craigbarnes.gitlab.io/lua-gumbo/\u003e.\n\n### Example\n\nThe following is a simple demonstration of how to find an element by ID\nand print the contents of it's first child text node.\n\n```lua\nlocal gumbo = require \"gumbo\"\nlocal document = gumbo.parse('\u003cdiv id=\"foo\"\u003eHello World\u003c/div\u003e')\nlocal foo = document:getElementById(\"foo\")\nlocal text = foo.childNodes[1].data\nprint(text) --\u003e Hello World\n```\n\n**Note:** this example omits error handling for the sake of simplicity.\nProduction code should wrap each step with [`assert()`] or some other,\napplication-specific error handling.\n\nSee also: \u003chttps://craigbarnes.gitlab.io/lua-gumbo/#examples\u003e.\n\n\n[Lua]: https://www.lua.org/\n[LuaJIT]: http://luajit.org/\n[C API]: https://www.lua.org/manual/5.2/manual.html#4\n[HTML5]: https://html.spec.whatwg.org/multipage/introduction.html#is-this-html5?\n[DOM]: https://dom.spec.whatwg.org/\n[descendant]: https://dom.spec.whatwg.org/#concept-tree-descendant\n[`parse`]: https://craigbarnes.gitlab.io/lua-gumbo/#parse\n[`parseFile`]: https://craigbarnes.gitlab.io/lua-gumbo/#parsefile\n[`Document`]: https://craigbarnes.gitlab.io/lua-gumbo/#document\n[fork]: https://gitlab.com/craigbarnes/lua-gumbo/tree/master/lib\n[LuaRocks]: https://luarocks.org/modules/craigb/gumbo\n[luacov]: https://keplerproject.github.io/luacov/\n[`assert()`]: https://www.lua.org/manual/5.3/manual.html#pdf-assert\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcraigbarnes%2Flua-gumbo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcraigbarnes%2Flua-gumbo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcraigbarnes%2Flua-gumbo/lists"}