Back to index

plone3  3.1.7
word.py
Go to the documentation of this file.
00001 from rigging import transformer
00002 
00003 import os
00004 from stat import ST_MTIME
00005 
00006 
00007 ## BIG BAD FUNCTIONAL TEST OF OOo Word Conversion
00008 ## The interfaces work, but are not quite what we need
00009 ## I might have to back fill a chain from source/dest graphing
00010 
00011 file = "/tmp/word.doc"
00012 
00013 class curry:
00014     def __init__(self, func, *fixed_args):
00015         self.func = func
00016         self.fixed_args = fixed_args
00017 
00018     def __call__(self, *variable_args):
00019         return apply(self.func, self.fixed_args +
00020           variable_args)
00021 
00022 data = open("/tmp/word.doc", "r").read()
00023 
00024 data = transformer.convert("WordToHtml", data, filename="word.doc")
00025 print data.getData()