# Path: Pyblio/Autoload.py
# class Loader:
#     def __init__ (self, name, regexp, module,
#                   info = None, data = None):
#     def load (self, key = None):
#     def is_loaded (self):
# def preregister (group, name, module, regexp = None, info = None):
# def register (group, name, data = None):
# def get_by_regexp (group, key):
# def get_by_name (group, name, load = 1):
# def available (group):
# def groups ():
# 
# Path: Pyblio/Utils.py
# def compress_page_range (pages, separator='-'):
# def format (string, width, first, next):
# def generate_key (entry, table):
#     def __init__ (self):
#     def write (self, text):
# class StringStream:
# 
# Path: Pyblio/Formatter.py
# class Formatter:
# 
#     coding = 'Latin1'
#     
#     def __init__ (self, stdout = sys.stdout):
#         self.out     = stdout
#         self.counter = 1
#         return
# 
#     def start_group (self, id, table = None):
#         pass
# 
#     def end_group (self):
#         pass
# 
#     def next_key (self):
#         key = str (self.counter)
#         self.counter = self.counter + 1
# 
#         return key
#     
#     def start (self, key, entry):
#         return
#     
#     def write (self, text, style = None):
#         self.out.write (text)
#         return
# 
#     def separator (self):
#         self.write (" ")
#         return
#     
#     def end (self):
#         self.write ("\n")
#         return


import string
from Pyblio import Autoload, Utils, Formatter
    def end_group (self):
        self.out.write ("\n")
        pass

    def start (self, key, entry):
        if key is None: key = self.next_key ()
        
        self.data = ""
        self.key  = '[%s] ' % key
        extra = self.length - len (self.key)
        if extra > 0:
            self.key = self.key + ' ' * extra
        return
    
    def write (self, text, style = None):
        self.data = self.data + text
        return

    def separator (self):
        self.write (" ")
        return
    
    def end (self):
        self.data = string.strip (self.data)
        
        text = Utils.format (self.data, 79, self.length, self.length)
        self.out.write (self.key + text [self.length:] + '\n\n')
        return
    


# Path: Pyblio/Autoload.py
# class Loader:
#     def __init__ (self, name, regexp, module,
#                   info = None, data = None):
#     def load (self, key = None):
#     def is_loaded (self):
# def preregister (group, name, module, regexp = None, info = None):
# def register (group, name, data = None):
# def get_by_regexp (group, key):
# def get_by_name (group, name, load = 1):
# def available (group):
# def groups ():
# 
# Path: Pyblio/Utils.py
# def compress_page_range (pages, separator='-'):
# def format (string, width, first, next):
# def generate_key (entry, table):
#     def __init__ (self):
#     def write (self, text):
# class StringStream:
# 
# Path: Pyblio/Formatter.py
# class Formatter:
# 
#     coding = 'Latin1'
#     
#     def __init__ (self, stdout = sys.stdout):
#         self.out     = stdout
#         self.counter = 1
#         return
# 
#     def start_group (self, id, table = None):
#         pass
# 
#     def end_group (self):
#         pass
# 
#     def next_key (self):
#         key = str (self.counter)
#         self.counter = self.counter + 1
# 
#         return key
#     
#     def start (self, key, entry):
#         return
#     
#     def write (self, text, style = None):
#         self.out.write (text)
#         return
# 
#     def separator (self):
#         self.write (" ")
#         return
#     
#     def end (self):
#         self.write ("\n")
#         return


# Path: Pyblio/Output/text.py
import string
from Pyblio import Autoload, Utils, Formatter

    def end_group (self):
        self.out.write ("\n")
        pass

    def start (self, key, entry):
        if key is None: key = self.next_key ()
        
        self.data = ""
        self.key  = '[%s] ' % key
        extra = self.length - len (self.key)
        if extra > 0:
            self.key = self.key + ' ' * extra
        return
    
    def write (self, text, style = None):
        self.data = self.data + text
        return

    def separator (self):
        self.write (" ")
        return
    
    def end (self):
        self.data = string.strip (self.data)
        
        text = Utils.format (self.data, 79, self.length, self.length)
        self.out.write (self.key + text [self.length:] + '\n\n')
        return
    


Autoload.register ('output', 'text', TextFormat)