Project

nzb

0.0
No commit activity in last 3 years
No release in over 3 years
Library for nzb file generation
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

NZB

Gem Version

Simple library used for nzb file creation. If you don't know what nzb file is, you could check wikipedia: http://en.wikipedia.org/wiki/Nzb

It's used in my other project - https://github.com/tdobrovolskij/sanguinews

INSTALLATION

Simply invoke gem install:

gem install nzb

How to use

Methods:

  • save_segment - needs to be run for every segment(partial file), replaces write_segment(saves info into a variable)
  • write_header - invoked only once to generate xml header
  • write_file_header - you need to invoke it once for every file with following parameters:
    • poster - as in from field
    • subject - as in subject field
    • groups - separated by comma if more than one
    • date - optional; unix timestamp required
  • write_file_footer - invoked only once for every file; closes file section
  • write_segment - needs to be run for every segment(partial file)
    • size - size in bytes
    • number - number of the part
    • msgid - message ID as told by the NNTP server
  • write_segments - writes saved segments to a file
  • write_footer - closes nzb. Normally you shouldn't write to a file after this method was invoked.

HISTORY

  • 0.2.2 - Added save_segment and write_segments methods
  • 0.2.1 - Added attr_reader for nzb_filename
  • 0.2.0 - Initial public release