{"id":21521095,"url":"https://github.com/weisjohn/htmlrefs","last_synced_at":"2025-03-17T17:16:40.585Z","repository":{"id":27219202,"uuid":"30690308","full_name":"weisjohn/htmlrefs","owner":"weisjohn","description":"Package htmlrefs returns a slice of `Reference{URI, Token string}`s from an `io.Reader`.","archived":false,"fork":false,"pushed_at":"2015-02-17T17:13:30.000Z","size":144,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-24T04:44:39.642Z","etag":null,"topics":[],"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/weisjohn.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":null,"support":null}},"created_at":"2015-02-12T07:07:53.000Z","updated_at":"2024-06-22T02:57:47.000Z","dependencies_parsed_at":"2022-08-17T16:31:11.858Z","dependency_job_id":null,"html_url":"https://github.com/weisjohn/htmlrefs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weisjohn%2Fhtmlrefs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weisjohn%2Fhtmlrefs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weisjohn%2Fhtmlrefs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weisjohn%2Fhtmlrefs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weisjohn","download_url":"https://codeload.github.com/weisjohn/htmlrefs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244075649,"owners_count":20393980,"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":[],"created_at":"2024-11-24T01:05:45.435Z","updated_at":"2025-03-17T17:16:40.553Z","avatar_url":"https://github.com/weisjohn.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# htmlrefs\n\nPackage htmlrefs returns a slice of `Reference{URI, Token string}`s from an `io.Reader`.\n\n### usage\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \"net/http\"\n\n    \"github.com/weisjohn/htmlrefs\"\n)\n\nfunc main() {\n    resp, _ := http.Get(\"http://johnweis.com\")\n    refs := htmlrefs.All(resp.Body)\n\n    for _, ref := range refs {\n        fmt.Println(ref.Token, \":\", ref.URI)\n    }\n}\n```\n\n### output\n\n```bash\n$ go run example-htmlrefs.go\nlink : /favicon.ico\nlink : /css/main.css\na : /\na : /talks\na : /projects\na : http://www.clevertech.biz/\na : /talks\na : /projects\nscript : /components/jquery/dist/jquery.min.js\nscript : /components/bootstrap/dist/js/bootstrap.min.js\n```\n\n### struct\n\n`htmlrefs` returns a slice of `Reference`s\n\n```go\ntype Reference struct {\n    URI, Token string\n}\n```\n\n### credits\n\nInspired by https://github.com/JackDanger/collectlinks","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweisjohn%2Fhtmlrefs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweisjohn%2Fhtmlrefs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweisjohn%2Fhtmlrefs/lists"}