view MoinMoin/filter/application_vnd_ms_excel.py @ 5928:d97e3b0d6b49

reorder input fields in recoverpass form, to help browsers remember the user name (not the recovery token)
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 21 Jan 2013 16:24:06 +0100
parents 4e904da48c4c
children
line wrap: on
line source
# -*- coding: iso-8859-1 -*-
"""
    MoinMoin - msexcel filter

    Depends on: "xls2csv" command from "catdoc" package

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

from MoinMoin.filter import execfilter

def execute(indexobj, filename):
    data = execfilter("xls2csv %s", filename)
    # xls2csv uses comma as field separator and "field content",
    # we strip both to not confuse the indexer
    data = data.replace(u',', u' ').replace(u'"', u' ')
    return data