{"id":22253035,"url":"https://github.com/picomet/htmst","last_synced_at":"2026-02-08T08:32:35.517Z","repository":{"id":264353438,"uuid":"892543213","full_name":"picomet/htmst","owner":"picomet","description":"HTML to AST with positions","archived":false,"fork":false,"pushed_at":"2024-12-29T16:58:36.000Z","size":68,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-30T10:46:28.175Z","etag":null,"topics":["ast","html","parser","python"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/htmst","language":"Python","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/picomet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"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,"zenodo":null}},"created_at":"2024-11-22T10:08:49.000Z","updated_at":"2024-12-29T16:58:33.000Z","dependencies_parsed_at":"2024-11-23T17:19:04.745Z","dependency_job_id":"ec670349-221a-49f6-869b-f33204d7bc99","html_url":"https://github.com/picomet/htmst","commit_stats":null,"previous_names":["picomet/htmst"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/picomet/htmst","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/picomet%2Fhtmst","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/picomet%2Fhtmst/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/picomet%2Fhtmst/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/picomet%2Fhtmst/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/picomet","download_url":"https://codeload.github.com/picomet/htmst/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/picomet%2Fhtmst/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29225477,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-08T06:05:31.539Z","status":"ssl_error","status_checked_at":"2026-02-08T05:58:33.853Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["ast","html","parser","python"],"created_at":"2024-12-03T07:15:56.088Z","updated_at":"2026-02-08T08:32:35.499Z","avatar_url":"https://github.com/picomet.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# htmst\n\n![PyPI - Python Versions](https://img.shields.io/pypi/pyversions/htmst)\n[![PyPI - Version](https://img.shields.io/pypi/v/htmst)](https://pypi.org/project/htmst)\n![GitHub](https://img.shields.io/github/license/picomet/htmst)\n\nhtmst is a python library for parsing html into AST with positions.\n\n## Installation\n\n```bash\nuv add htmst\n```\n\nor\n\n```bash\npip install htmst\n```\n\n## Usage\n\n```python\nfrom htmst import HtmlAst\n\nhtml = \"\"\"\u003cspan foo=\"bar\"\u003ehi\u003c/span\u003e\"\"\"\nast = HtmlAst(html)\n\nprint(ast.root.children[0].tag) # span\n\nprint(ast.root.children[0].start.row) # 0\nprint(ast.root.children[0].start.col) # 0\n\nprint(ast.root.children[0].end.row) # 0\nprint(ast.root.children[0].end.col) # 25\n\nprint(ast.root.children[0].attrs[0].name) # foo\nprint(ast.root.children[0].attrs[0].value) # bar\n\nprint(ast.root.children[0].attrs[0].start.row) # 0\nprint(ast.root.children[0].attrs[0].start.col) # 6\n\nprint(ast.root.children[0].attrs[0].end.row) # 0\nprint(ast.root.children[0].attrs[0].end.col) # 15\n```\n\n### Nodes\n\n-   `DoubleTagNode`: represents double tags\n-   `SingleTagNode`: represents single tags\n-   `AttrNode`: represents attributes\n-   `TextNode`: represents texts\n-   `CommentNode`: represents comments\n-   `DoctypeNode`: represents doctypes\n\nEach node has a `start` and `end` position.\n\n## Contributing\n\nContributions are welcome! Please read the [contributing guidelines](CONTRIBUTING.md) for more information.\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpicomet%2Fhtmst","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpicomet%2Fhtmst","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpicomet%2Fhtmst/lists"}