{"id":19273598,"url":"https://github.com/zikwall/gom3u-content-parser","last_synced_at":"2025-02-23T20:44:02.006Z","repository":{"id":57511461,"uuid":"236969103","full_name":"zikwall/gom3u-content-parser","owner":"zikwall","description":"m3u content parser written in golang","archived":false,"fork":false,"pushed_at":"2020-01-30T07:57:17.000Z","size":9,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-05T14:24:26.934Z","etag":null,"topics":["go","golang","m3u","m3u-files","m3u-parser","m3u-playlist","m3u8","m3u8-parser","parser"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zikwall.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-29T11:41:49.000Z","updated_at":"2022-08-10T11:21:10.000Z","dependencies_parsed_at":"2022-08-29T04:42:22.298Z","dependency_job_id":null,"html_url":"https://github.com/zikwall/gom3u-content-parser","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/zikwall%2Fgom3u-content-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zikwall%2Fgom3u-content-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zikwall%2Fgom3u-content-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zikwall%2Fgom3u-content-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zikwall","download_url":"https://codeload.github.com/zikwall/gom3u-content-parser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240378869,"owners_count":19792039,"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":["go","golang","m3u","m3u-files","m3u-parser","m3u-playlist","m3u8","m3u8-parser","parser"],"created_at":"2024-11-09T20:43:35.728Z","updated_at":"2025-02-23T20:44:01.970Z","avatar_url":"https://github.com/zikwall.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003ch1\u003eGolang m3u Content Parser\u003c/h1\u003e\n    \u003ch5\u003eMinimalistic, functional and easy to use playlist parser\u003c/h5\u003e\n\u003c/div\u003e\n\n### Example usage\n\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\tgom3uparser \"github.com/zikwall/gom3u-content-parser\"\n)\n\nfunc main() {\n\tparser := gom3uparser.NewM3UContentParser().\n\t\tLoadSource(\"https://iptv-org.github.io/iptv/countries/ru.m3u\", false).\n\t\tParse()\n\n\tjsonOutput, _ := json.Marshal(parser.Offset(2).Limit(3).All())\n\n\tfmt.Println(string(jsonOutput))\n}\n```\n\n### More example\n\n```go\n\nfunc main() {\n\tparser := gom3uparser.NewM3UContentParser().\n\t\tLoadSource(\"https://iptv-org.github.io/iptv/countries/ru.m3u\", false).\n\t\tParse()\n\n\tfor _, item := range parser.Limit(10).All() {\n\t\tfmt.Println(fmt.Sprintf(\"Language is: %s, Group is: %s\", item.TvgLanguage, item.GroupTitle))\n\t}\n}\n\n```\n\n### Get tvg url\n\n```go\nfmt.Println(parser.GetTvgUrl())\n```\n\n### Installation\n\n```go\ngo get github.com/zikwall/gom3u-content-parser\n```\n\n### Available m3u item attributes, every all string type\n\n#### Formats\nOrigin `tvg-id`, `tvg-logo` transform to `TvgId` and `TvgLogo` objects\n\n- [x] `Id`\n- [x] `TvgId`\n- [x] `TvgName`\n- [x] `TvgUrl`\n- [x] `TvgLogo`\n- [x] `TvgCountry`\n- [x] `TvgLanguage`\n- [x] `TvgShift`\n- [x] `AudioTrack`\n- [x] `AudioTrackNum`\n- [x] `Censored`\n- [x] `GroupId`\n- [x] `GroupTitle`\n- [x] `ExtGrp`\n- [x] `ExtraAttributes` (all original attributes in m3u item after parsing)\n\n### Available methods \u0026 props in parser\n\n- [x] `GetTvgUrl()` : string\n- [x] `GetM3UContent()` : string\n- [x] `GetDirtyItems()` : []string - Return m3u item lines before parsing\n- [x] `GetItems()` : []M3UItem - Return all items after parsing\n- [x] `Offset(int offset)` : M3UContentParser - Set offset for returned results\n- [x] `Limit(int limit)` : M3UContentParser - Set limits for returned results\n- [x] `Cache`\n- [x] `Refresh`\n- [x] `CountItems`\n- [x] `TvgUrl`\n\n#### Questions?\n\nFor all questions and suggestions - welcome to Issues\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzikwall%2Fgom3u-content-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzikwall%2Fgom3u-content-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzikwall%2Fgom3u-content-parser/lists"}