Back to index

moin  1.9.0~rc2
application_msword.py
Go to the documentation of this file.
00001 # -*- coding: iso-8859-1 -*-
00002 """
00003     MoinMoin - msword filter
00004 
00005     Depends on: antiword command from antiword package
00006 
00007     @copyright: 2006-2008 MoinMoin:ThomasWaldmann
00008     @license: GNU GPL, see COPYING for details.
00009 """
00010 
00011 import os
00012 
00013 from MoinMoin.filter import execfilter
00014 
00015 def execute(indexobj, filename):
00016     cmd = "antiword %s"
00017     if os.name == 'posix':
00018         cmd = "HOME=/tmp " + cmd  # no HOME makes antiword complain (on Linux)
00019     return execfilter(cmd, filename)
00020