##############################################################################
#
# Copyright (c) 2002 Ingeniweb SARL
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
#
##############################################################################

"""
AttachmentField product
"""

import AttachmentHandler

import os
import os.path
import string
import re
import sys


if sys.platform == "win32":
    program = "type"
else:
    program = "cat"


class HTMLAttachment(AttachmentHandler.AbstractHandler):
    """
    MSWord file abstraction
    """
    icon_file = "html.gif"
    small_icon_file = "html_small.gif"
    content_types = ('text/html', )
    converter_type = "HTML"

    index_path = program
    index_arguments = r"%s"
    index_encoding = None
    
    preview_path = program
    preview_arguments = r"-nh %s"
    preview_encoding = None
    preview_format = "html"


AttachmentHandler.registerHandler(HTMLAttachment)
