1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
##############################################################################
#
# 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
#
##############################################################################
"""
ZAttachmentAttribute product
Configuration file.
You can edit this file.
"""
import string
import sys
import App.Common
import os.path
from Products.ZAttachmentAttribute.Log import *
# Converter program
PACKAGE_HOME = App.Common.package_home(globals())
if sys.platform == 'win32':
# Windows platform
CONVERTER_PROGRAM = '"' + os.path.join(PACKAGE_HOME, "win32", "ppthtml.exe", ) + '"'
Log(LOG_DEBUG, "Using '%s'." % (CONVERTER_PROGRAM,))
try:
open(CONVERTER_PROGRAM[1:-1], "r")
except:
Log(LOG_WARNING, "Converter program '%s' not found ! Please check your installation" % (CONVERTER_PROGRAM,))
else:
# Unix platform
import commands
program = commands.getoutput("which ppthtml")
if not program:
Log(LOG_WARNING, "MSPowerPointAttachment: ppthtml not found ! Indexing won't work.")
else:
CONVERTER_PROGRAM = string.strip(program)
Log(LOG_NOTICE, "MSPowerPointAttachment: Using '%s' for indexing." % (CONVERTER_PROGRAM, ))
|