{"id":24956868,"url":"https://github.com/andrewstuart/go-nzb","last_synced_at":"2025-03-28T20:38:08.768Z","repository":{"id":35434930,"uuid":"39701075","full_name":"andrewstuart/go-nzb","owner":"andrewstuart","description":"Golang nzb parsing","archived":false,"fork":false,"pushed_at":"2015-11-30T21:34:24.000Z","size":72,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-03T06:41:57.467Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/andrewstuart.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-07-25T20:01:01.000Z","updated_at":"2016-09-20T15:26:19.000Z","dependencies_parsed_at":"2022-09-26T17:41:35.967Z","dependency_job_id":null,"html_url":"https://github.com/andrewstuart/go-nzb","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/andrewstuart%2Fgo-nzb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewstuart%2Fgo-nzb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewstuart%2Fgo-nzb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewstuart%2Fgo-nzb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andrewstuart","download_url":"https://codeload.github.com/andrewstuart/go-nzb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246100418,"owners_count":20723466,"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":"2025-02-03T06:41:28.588Z","updated_at":"2025-03-28T20:38:08.742Z","avatar_url":"https://github.com/andrewstuart.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nzb\n\n[![GoDoc](https://godoc.org/github.com/andrewstuart/go-nzb?status.svg)](https://godoc.org/github.com/andrewstuart/go-nzb)\n\n--\n    import \"github.com/andrewstuart/go-nzb\"\n\nPackage nzb is intended to be a library that basically just provides go structs\nthat one can unmarshall an NZB file into and have enough information to locate\nthe associated files on usenet.\n\n## Usage\n\n#### type File\n\n```go\ntype File struct {\n\tPoster   string    `xml:\"poster,attr\"`\n\tDate     int       `xml:\"date,attr\"`\n\tSubject  string    `xml:\"subject,attr\"`\n\tGroups   []string  `xml:\"groups\u003egroup,internalxml\"`\n\tSegments []Segment `xml:\"segments\u003esegment\"`\n}\n```\n\nFile is a go struct representation of the nzb file elements. It contains the\nappropriate field tags and methods for deserialization\n\n#### func (*File) Name\n\n```go\nfunc (f *File) Name() (string, error)\n```\nName returns the estimated filename that an NZB represents.\n\n#### type Meta\n\n```go\ntype Meta map[string]string\n```\n\nThe Meta type is simply a map[string]string that implements UnmarshalXML to\nappropriately unmarshal the xml metadata tags.\n\n#### func (*Meta) UnmarshalXML\n\n```go\nfunc (m *Meta) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error\n```\nUnmarshalXML implements xml.Unmarshaler\n\n#### type NZB\n\n```go\ntype NZB struct {\n\tXMLName xml.Name `xml:\"nzb\"`\n\tMeta    Meta     `xml:\"head\u003emeta\"`\n\tFiles   []File   `xml:\"file\"`\n}\n```\n\nNZB is a go struct representation of an nzb file with the appropriate tags and\nmethods for XML unmarshalling.\n\n#### func (*NZB) Size\n\n```go\nfunc (nzb *NZB) Size() uint64\n```\nSize returns the sum of the file sizes within the nzb.\n\n#### type Segment\n\n```go\ntype Segment struct {\n\tNumber int    `xml:\"number,attr\"`\n\tBytes  int    `xml:\"bytes,attr\"`\n\tID     string `xml:\",innerxml\"`\n}\n```\n\nA Segment is a piece to be downloaded separately\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewstuart%2Fgo-nzb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrewstuart%2Fgo-nzb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewstuart%2Fgo-nzb/lists"}