[turba] pre-mapped csv/tsv files
Liam Hoekenga
liamr@umich.edu
Mon, 22 Apr 2002 15:09:32 -0400 (EDT)
I'm trying to write some import filters for pine and mulberry mailboxes.
It seems I could go one of two courses.... do something like the vCard
import and have *all* of it in that part of the code..
or I could use the csv routine (or the tsv routine I wrote that's based on
it) and invoke the IMPORT_MAPPED case.
I'm leaning towards the latter - but I can't figure out how to get back to
that section of the code. The cvsmap.inc that the cvs import uses
presents a form that allows the user to do the mapping. This form POSTs
back to itself.
now.. with the mulberry and pine, i know that "fullname" *always* maps to
field 1 of the imported data, and that "email" *always* maps to field 2.
I don't want the user to have to POST from a form.. I just want it to load
the data.
Here's the mulberrymap.inc file I wrote.. and it's really quite broken.
<?php
$HTTP_POST_VARS['actionID'] = HORDE_IMPORT;
$HTTP_POST_VARS['import_type'] = $importID;
$HTTP_POST_VARS['importID'] = IMPORT_MAPPED;
$HTTP_POST_VARS['cacheID'] $cacheID;
$HTTP_POST_VARS['dataKeys'] = '1 2 3 4 5 6 7 9';
$HTTP_POST_VARS['appKeys'] = 'name email company homeAddress workPhone homePhone fax notes';
header('Location: ' . $actionUrl );
?>
any suggestions?
Liam