# Path: newsreap/NNTPIOStream.py
# NNTP_DEFAULT_ENCODING = 'ISO-8859-1'
# 
# Path: newsreap/NNTPIOStream.py
# class NNTPIOStream(object):
#     """
#     Defines the supported NNTP Input/Output Streams
# 
#     """
#     # RFC-3977 Standard NNTP Stream - No compression at all
#     RFC3977 = 'rfc3977'
# 
#     # GZip RFC-3977 (COMPRESS Keyword used)
#     RFC3977_GZIP = 'gzip.rfc3977'
# 
# Path: newsreap/Utils.py
# def parse_bool(arg, default=False):
#     """
#     Parses strings such as 'yes' and 'no' as well as other strings such as
#     'on' or 'off' , 'enable' or 'disable', etc.
# 
#     This method can just simplify checks to these variables.
# 
#     If the content could not be parsed, then the default is
#     returned.
#     """
# 
#     if isinstance(arg, basestring):
#         # no = no - False
#         # of = short for off - False
#         # 0  = int for False
#         # fa = short for False - False
#         # f  = short for False - False
#         # n  = short for No or Never - False
#         # ne  = short for Never - False
#         # di  = short for Disable(d) - False
#         # de  = short for Deny - False
#         if arg.lower()[0:2] in ('de', 'di', 'ne', 'f', 'n', 'no', 'of',
#                                 '0', 'fa'):
#             return False
#         # ye = yes - True
#         # on = short for off - True
#         # 1  = int for True
#         # tr = short for True - True
#         # t  = short for True - True
#         # al = short for Always (and Allow) - True
#         # en  = short for Enable(d) - True
#         elif arg.lower()[0:2] in ('en', 'al', 't', 'y', 'ye', 'on', '1',
#                                   'tr'):
#             return True
#         # otherwise
#         return default
# 
#     # Handle other types
#     return bool(arg)
# 
# Path: newsreap/Logging.py
# NEWSREAP_ENGINE = '%s.engine' % NEWSREAP_LOGGER


import gevent.monkey
import re
import sys
import yaml
import logging
from os import name as os_name
from os.path import join
from os.path import isfile
from os.path import dirname
from os.path import abspath
from os.path import expanduser
from yaml.scanner import ScannerError
from yaml.parser import ParserError
from operator import itemgetter
from copy import deepcopy
    from newsreap.NNTPDatabase import NNTPDatabase
    from newsreap.NNTPDatabase import NNTPDatabase
from newsreap.NNTPIOStream import NNTP_DEFAULT_ENCODING
from newsreap.NNTPIOStream import NNTPIOStream
from newsreap.Utils import parse_bool
from newsreap.Logging import NEWSREAP_ENGINE
    # A ramdisk greatly increases processing of certain content
    'ramdisk': None,
}

# Keyword used in configuration to host all of the defined NNTP Servers
PROCESSING_KEY = 'processing'

# Processing Variables mapped to their defaults if not found.
# if None is specified, then the field is mandatory or we'll abort
DEFAULT_POSTING_VARIABLES = {
    # The maximum article size before splitting the content; most providers do
    # now allow you to exceed 760KB which is why it is the default.
    'max_article_size': '760KB',

    # The maximum archive size before splitting the content
    # Some archivers (such as rar, zip, 7z) can break up a large archive
    # into several smaller archived files

    # If this value is set to auto, then the size is automatically calculated
    # based on the total size of the content being prepared
    'max_archive_size': 'auto',

    # The default poster
    'poster': 'Newsreap <reaper@newsreap.io>',

    # The default subject
    'subject': '{{description}} (%Y-%m-%d)" - "{{filename}}" yEnc '\
               '({{index}}/{{count}})',
}


# Path: newsreap/NNTPIOStream.py
# NNTP_DEFAULT_ENCODING = 'ISO-8859-1'
# 
# Path: newsreap/NNTPIOStream.py
# class NNTPIOStream(object):
#     """
#     Defines the supported NNTP Input/Output Streams
# 
#     """
#     # RFC-3977 Standard NNTP Stream - No compression at all
#     RFC3977 = 'rfc3977'
# 
#     # GZip RFC-3977 (COMPRESS Keyword used)
#     RFC3977_GZIP = 'gzip.rfc3977'
# 
# Path: newsreap/Utils.py
# def parse_bool(arg, default=False):
#     """
#     Parses strings such as 'yes' and 'no' as well as other strings such as
#     'on' or 'off' , 'enable' or 'disable', etc.
# 
#     This method can just simplify checks to these variables.
# 
#     If the content could not be parsed, then the default is
#     returned.
#     """
# 
#     if isinstance(arg, basestring):
#         # no = no - False
#         # of = short for off - False
#         # 0  = int for False
#         # fa = short for False - False
#         # f  = short for False - False
#         # n  = short for No or Never - False
#         # ne  = short for Never - False
#         # di  = short for Disable(d) - False
#         # de  = short for Deny - False
#         if arg.lower()[0:2] in ('de', 'di', 'ne', 'f', 'n', 'no', 'of',
#                                 '0', 'fa'):
#             return False
#         # ye = yes - True
#         # on = short for off - True
#         # 1  = int for True
#         # tr = short for True - True
#         # t  = short for True - True
#         # al = short for Always (and Allow) - True
#         # en  = short for Enable(d) - True
#         elif arg.lower()[0:2] in ('en', 'al', 't', 'y', 'ye', 'on', '1',
#                                   'tr'):
#             return True
#         # otherwise
#         return default
# 
#     # Handle other types
#     return bool(arg)
# 
# Path: newsreap/Logging.py
# NEWSREAP_ENGINE = '%s.engine' % NEWSREAP_LOGGER


# Path: newsreap/NNTPSettings.py
import gevent.monkey
import re
import sys
import yaml
import logging
from os import name as os_name
from os.path import join
from os.path import isfile
from os.path import dirname
from os.path import abspath
from os.path import expanduser
from yaml.scanner import ScannerError
from yaml.parser import ParserError
from operator import itemgetter
from copy import deepcopy
    from newsreap.NNTPDatabase import NNTPDatabase
    from newsreap.NNTPDatabase import NNTPDatabase
from newsreap.NNTPIOStream import NNTP_DEFAULT_ENCODING
from newsreap.NNTPIOStream import NNTPIOStream
from newsreap.Utils import parse_bool
from newsreap.Logging import NEWSREAP_ENGINE

    # A ramdisk greatly increases processing of certain content
    'ramdisk': None,
}

# Keyword used in configuration to host all of the defined NNTP Servers
PROCESSING_KEY = 'processing'

# Processing Variables mapped to their defaults if not found.
# if None is specified, then the field is mandatory or we'll abort
DEFAULT_POSTING_VARIABLES = {
    # The maximum article size before splitting the content; most providers do
    # now allow you to exceed 760KB which is why it is the default.
    'max_article_size': '760KB',

    # The maximum archive size before splitting the content
    # Some archivers (such as rar, zip, 7z) can break up a large archive
    # into several smaller archived files

    # If this value is set to auto, then the size is automatically calculated
    # based on the total size of the content being prepared
    'max_archive_size': 'auto',

    # The default poster
    'poster': 'Newsreap <reaper@newsreap.io>',

    # The default subject
    'subject': '{{description}} (%Y-%m-%d)" - "{{filename}}" yEnc '\
               '({{index}}/{{count}})',
}


POSTING_KEY = 'posting'