{"id":21126844,"url":"https://github.com/conneroisu/seltabl","last_synced_at":"2025-07-20T08:05:44.622Z","repository":{"id":242455468,"uuid":"809436836","full_name":"conneroisu/seltabl","owner":"conneroisu","description":"golang library for parsing html tables into stucts leveraging goquery to be configurable with useful developer tooling including a language server.","archived":false,"fork":false,"pushed_at":"2024-11-25T19:50:29.000Z","size":195103,"stargazers_count":4,"open_issues_count":4,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-08T23:40:30.235Z","etag":null,"topics":["cli","code-generation","golang","golang-library","golang-package","golang-tools","goquery","html","jquery","scrap","scraper"],"latest_commit_sha":null,"homepage":"","language":"Go","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/conneroisu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-06-02T17:24:34.000Z","updated_at":"2024-11-06T12:31:57.000Z","dependencies_parsed_at":"2024-06-03T05:40:25.401Z","dependency_job_id":"38042f65-f5b9-40ab-b570-5c573c2d24ee","html_url":"https://github.com/conneroisu/seltabl","commit_stats":null,"previous_names":["conneroisu/seltabl"],"tags_count":67,"template":false,"template_full_name":null,"purl":"pkg:github/conneroisu/seltabl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conneroisu%2Fseltabl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conneroisu%2Fseltabl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conneroisu%2Fseltabl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conneroisu%2Fseltabl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/conneroisu","download_url":"https://codeload.github.com/conneroisu/seltabl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conneroisu%2Fseltabl/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266087790,"owners_count":23874519,"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":["cli","code-generation","golang","golang-library","golang-package","golang-tools","goquery","html","jquery","scrap","scraper"],"created_at":"2024-11-20T04:45:38.912Z","updated_at":"2025-07-20T08:05:44.599Z","avatar_url":"https://github.com/conneroisu.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# seltabl\n\n\u003c!-- \u003cimg src=\"/assets/avatar.png?raw=true\" alt=\"seltabl logo\" width=\"200\"/\u003e --\u003e\n![seltabl logo](/assets/avatar.png)\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://pkg.go.dev/github.com/conneroisu/seltabl?tab=doc\"\u003e\u003cimg src=\"https://img.shields.io/badge/go.dev-reference-007d9c?logo=go\u0026logoColor=white\" alt=\"go.dev\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/conneroisu/seltabl/actions/workflows/test.yaml\"\u003e\u003cimg src=\"https://github.com/conneroisu/seltabl/actions/workflows/test.yaml/badge.svg\" alt=\"Build Status\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://codecov.io/gh/conneroisu/seltabl\" \u003e \u003cimg src=\"https://codecov.io/gh/conneroisu/seltabl/graph/badge.svg?token=JAGYI2V82D\"/\u003e \u003c/a\u003e\n    \u003ca href=\"https://goreportcard.com/report/github.com/conneroisu/seltabl\"\u003e\u003cimg src=\"https://goreportcard.com/badge/github.com/conneroisu/seltabl\" alt=\"Go Report Card\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://www.phorm.ai/query?projectId=3e6f9d42-0098-4178-ab54-4a0b9c89353b\"\u003e\u003cimg src=\"https://img.shields.io/badge/Phorm-Ask_AI-%23F2777A.svg?\u0026logo=data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNSIgaGVpZ2h0PSI0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxwYXRoIGQ9Ik00LjQzIDEuODgyYTEuNDQgMS40NCAwIDAgMS0uMDk4LjQyNmMtLjA1LjEyMy0uMTE1LjIzLS4xOTIuMzIyLS4wNzUuMDktLjE2LjE2NS0uMjU1LjIyNmExLjM1MyAxLjM1MyAwIDAgMS0uNTk1LjIxMmMtLjA5OS4wMTItLjE5Mi4wMTQtLjI3OS4wMDZsLTEuNTkzLS4xNHYtLjQwNmgxLjY1OGMuMDkuMDAxLjE3LS4xNjkuMjQ2LS4xOTFhLjYwMy42MDMgMCAwIDAgLjItLjEwNi41MjkuNTI5IDAgMCAwIC4xMzgtLjE3LjY1NC42NTQgMCAwIDAgLjA2NS0uMjRsLjAyOC0uMzJhLjkzLjkzIDAgMCAwLS4wMzYtLjI0OS41NjcuNTY3IDAgMCAwLS4xMDMtLjIuNTAyLjUwMiAwIDAgMC0uMTY4LS4xMzguNjA4LjYwOCAwIDAgMC0uMjQtLjA2N0wyLjQzNy43MjkgMS42MjUuNjcxYS4zMjIuMzIyIDAgMCAwLS4yMzIuMDU4LjM3NS4zNzUgMCAwIDAtLjExNi4yMzJsLS4xMTYgMS40NS0uMDU4LjY5Ny0uMDU4Ljc1NEwuNzA1IDRsLS4zNTctLjA3OUwuNjAyLjkwNkMuNjE3LjcyNi42NjMuNTc0LjczOS40NTRhLjk1OC45NTggMCAwIDEgLjI3NC0uMjg1Ljk3MS45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gMCAxIC4wNzcuNTgzbC0uMDI4LjMyMloiIGZpbGw9IndoaXRlIi8+Cjwvc3ZnPgo=\"\u003e\u003c/img\u003e\n\u003c/p\u003e\n\nA golang library with accompanying cli and language server for configurably parsing html sequences into stucts originally built for html tables, but can be used for any html sequence.\n\nEnables data binding to structs and provides a simple, but dynamic way to define a table schema.\n\n## Installation\n\nInstall the package in a project with:\n\n```bash\ngo get github.com/conneroisu/seltabl\n```\n\nInstall the [cli](https://github.com/conneroisu/seltabl/tree/main/tools/seltabls) containing the language server operating over the [ lsp ](https://microsoft.github.io/language-server-protocol/) protocol and package command line utilities with:\n\n```bash\ngo install github.com/conneroisu/seltabl/tools/seltabls@latest\n```\n\n\u003cimg width=\"1440\" alt=\"Recording of Language Server\" src=\"/assets/out.gif\"\u003e\n\n## Usage\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/conneroisu/seltabl\"\n\t\"github.com/conneroisu/seltabl/testdata\"\n)\n\ntype TableStruct struct {\n\tA string `json:\"a\" hSel:\"tr:nth-child(1) td:nth-child(1)\" dSel:\"tr td:nth-child(1)\" ctl:\"text\"`\n\tB string `json:\"b\" hSel:\"tr:nth-child(1) td:nth-child(2)\" dSel:\"tr td:nth-child(2)\" ctl:\"text\"`\n}\n\nvar fixture = `\n\u003ctable\u003e\n\t\u003ctr\u003e\n\t\t\u003ctd\u003ea\u003c/td\u003e\n\t\t\u003ctd\u003eb\u003c/td\u003e\n\t\u003c/tr\u003e\n\t\u003ctr\u003e\n\t\t\u003ctd\u003e1\u003c/td\u003e\n\t\t\u003ctd\u003e2\u003c/td\u003e\n\t\u003c/tr\u003e\n\t\u003ctr\u003e\n\t\t\u003ctd\u003e3\u003c/td\u003e\n\t\t\u003ctd\u003e4\u003c/td\u003e\n\t\u003c/tr\u003e\n\t\u003ctr\u003e\n\t\t\u003ctd\u003e5\u003c/td\u003e\n\t\t\u003ctd\u003e6\u003c/td\u003e\n\t\u003c/tr\u003e\n\t\u003ctr\u003e\n\t\t\u003ctd\u003e7\u003c/td\u003e\n\t\t\u003ctd\u003e8\u003c/td\u003e\n\t\u003c/tr\u003e\n\u003c/table\u003e\n`\n\nfunc main() {\n\tfss, err := seltabl.NewFromString[TableStruct](fixture)\n\tif err != nil {\n\t\tpanic(fmt.Errorf(\"failed to parse html: %w\", err))\n\t}\n\tfor _, fs := range fss {\n\t\tfmt.Printf(\"%+v\\n\", fs)\n\t}\n}\n```\n\nOutput:\n\n```bash\n{A:1 B:2}\n{A:3 B:4}\n{A:5 B:6}\n{A:7 B:8}\n```\n\n\n## Development\n\nA makefile at the root of the project is provided to help with development.\n\n### Testing\n\nOne can run the tests with:\n```bash\nmake test\n```\n\n### Linting\n\nOne can run the linter with:\n```bash\nmake lint\n```\n\n### Formatting\n\nOne can run the formatter with:\n```bash\nmake fmt\n```\n\n### Generating documentation\n\nOne can run the documentation generator with:\n```bash\nmake doc\n```\n\n## License\n\nMIT\n\nTypes of ctl selectors:\n\n- text (default) (queries the text of the selected element)\n- spaces (queries the text of the selected element split by spaces)\n- query (queries the attributes of the selected elemente)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconneroisu%2Fseltabl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconneroisu%2Fseltabl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconneroisu%2Fseltabl/lists"}