view MoinMoin/filter/application_msword.py @ 4510:6180f7b85a45

Modernized theme: make nonexistent links gray also when the yare already visited
author Radomir Dopieralski <moindev@sheep.art.pl>
date Sat, 24 Jan 2009 21:49:44 +0100
parents 7185d43b2504
children
line wrap: on
line source
# -*- coding: iso-8859-1 -*-
"""
    MoinMoin - msword filter

    Depends on: antiword command from antiword package

    @copyright: 2006-2008 MoinMoin:ThomasWaldmann
    @license: GNU GPL, see COPYING for details.
"""

import os

from MoinMoin.filter import execfilter

def execute(indexobj, filename):
    cmd = "antiword %s"
    if os.name == 'posix':
        cmd = "HOME=/tmp " + cmd  # no HOME makes antiword complain (on Linux)
    return execfilter(cmd, filename)