########################################################################
# Pyfm - personal finance data-base
# Copyright (C) 2007 Ehud Ben-Reuven
# udi@benreuven.com
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation version 2.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
########################################################################
"""Convert OFX v1.x or QFX files to flat lines.
The OFX or QFX files should be located at $PYFM_DATA/ofx
The files are first converted to .xml in $PYFM_DATA/temp directory
and then to .txt files in $PYFM_DATA/flt/ofx/
"""
from ofx2xml import ofx2xml
from ofxml2flat import ofxml2flat
from lib import dirs
pre=None
def flat(xmlname,fout,linetxt):
ofxml2flat(xmlname,fout,linetxt)
ext='*.xml' # Files ending with .xml
help="""Convert OFX v2.x or XML files to flat lines.
The XML files should be located at $PYFM_DATA/imports/ofx2
The files are converted to .txt files in $PYFM_DATA/flt/ofx2/
"""
def path(line):
return ['ofx2']