Newzbin DocumentationMain Page | About | Help | FAQ | Special pages | Log in

Printable version | Disclaimers | Privacy policy

Newzbin:NZB Specs

From Newzbin Documentation

Contents

[edit] Where's the simple stuff?

In our Guide to NZB Files.

[edit] NZB (Message-ID List) File Specification

Here follows a sample NZB for a single small file:

<?xml version="1.0" encoding="iso-8859-1" ?>
<!DOCTYPE nzb PUBLIC "-//newzBin//DTD NZB 1.0//EN" "http://www.newzbin.com/DTD/nzb/nzb-1.0.dtd">
<nzb xmlns="http://www.newzbin.com/DTD/2003/nzb">
 <file poster="Joe Bloggs <bloggs@nowhere.example>" date="1071674882" subject="Here's your file!  abc-mr2a.r01 (1/2)">
   <groups>
     <group>alt.binaries.newzbin</group>
     <group>alt.binaries.mojo</group>
   </groups>
   <segments>
     <segment bytes="102394" number="1">123456789abcdef@news.newzbin.com</segment>
     <segment bytes="4501" number="2">987654321fedbca@news.newzbin.com</segment>
   </segments>
 </file>
</nzb>

This example is for one file, consisting of two segments, which are 102,394 bytes and 4,501 bytes. The file is posted into two groups, alt.binaries.newzbin and alt.binaries.mojo; it was posted by Joe Bloggs, at unixtime 1071674882. The subject is slightly munged; the segment counter always starts at 1; but you can see it has 2 segments; confirmed by the segments tags below.

This is a fully populated nzb file, all the tags and attributes you can expect to see are there, but clients are expected to cope should more be added.

Since this is an XML format, clients are encouraged to use an XML parser to process it; minor changes to the nzb files we generate such as with attribute ordering, indentation, and even new tags and attributes must be taken into account. XML PI's and CDATA sections are not expected to be used, so clients should be free to cut some corners using lightweight parsers.

We will, where possible, avoid changes which may break clients; even those which use simple pattern matchers. Significant changes to the format are unlikely at this point, but users of the format should try not to get too complacent.

[edit] XML Tag breakdown

<nzb> .. </nzb> Description Root element for the file
Attributes None
Body None (placeholder)
Children <file>
<file> .. </file> Description Represents a list of messageids that make up a file
Attributes
  1. poster string - Copy of the From: field from the article header.
  2. date int - Unixtime representation of the date the server saw this article. This is not completely reliable; timezones can break this value, and incorrectly configured news servers will make it almost useless.
  3. subject string - A slightly munged copy of the article's subject. The segment counter (xx/yy) usually found at the end, is replaced with (1/yy). You can use the yy to confirm all segments are present.
Body None (placeholder)
Children <groups>, <segments>
<groups> .. </groups> Description Placeholder element for a list of groups that reference the file
Attributes None
Body None (placeholder)
Children <group>
<group> .. </group> Description One <group> element represents a group, multiple may be used
Attributes None
Body string - The name of the group (e.g. alt.binaries.newzbin)
Children None
<segments> .. </segments> Description Placeholder element for a list of segments that make up a file
Attributes None
Body None (placeholder)
Children <segment>
<segment> .. </segment> Description One part segment of a file
Attributes
  1. bytes int - Size of the article, in bytes, as a number, with no comma separation.
  2. number int - Segment number of the article, gleaned by parsing (yy/zz)
Body string - The Message-ID of this article, without the surrounding < and > (e.g. 123456789abcdef@news.newzbin.com)
Children None

[edit] Who can use them?

Anyone. If you write a newsreader, feel free to add support for it. If you run a site, feel free to offer them for any file you want to point people at. This is an open standard, which anyone can use.

Retrieved from "http://docs.newzbin.com/index.php/Newzbin:NZB_Specs"

This page has been accessed 136,724 times. This page was last modified 09:32, 17 March 2007.


Find

Browse
Main Page
Community portal
Current events
Recent changes
Random page
Help
Donations
Edit
Edit this page
Editing help
This page
Discuss this page
Post a comment
Printable version
Context
Page history
What links here
Related changes
My pages
Log in / create account
Special pages
New pages
File list
Statistics
Bug reports
More...