I've recently been trying out the Feeds module in Drupal 6, having used Feeds API extensively before for a video aggregation website.
Previously when pulling in feeds I often found myself adding in hacks to the Simple Pie parser to provide extra fields not just to help with mapping video enclosures but also to alter the data being fed into the Feeds API Element Mapper.
I havn't tried mapping video enclosures yet in Feeds and hoping that will work okay however....
I was wondering if it would be possible to allow to have an input box come up in the Mapping section of the "Edit importer" page for each bit of Source data coming in that would allow you to alter that data before mapping it to a field with a custom PHP script.
For example,
One feed I pulled in would give me the *.mpg file for the video even though the website also generated flv files for each video. I was able to get the flv file from hacking the SimplePie parser and adding in a line that would chop off the ".mpg" and replace it with ".flv" and add that as a field that was then fed to the Feeds API processor.
Another example that I am looking at just now is pulling in a Wordpress feed. The guid that the wordpress feed gives me gives the full address to the node ( http://example.com/?p=634 ) but I would like to send someone visiting my site to the Wordpress article on the front page of the source website, i.e. http://example.com/#post-634, so having a box that would allow me to alter the data coming in with a PHP script before mapping it would make this job easier.
I understand these are exceptional examples but I am sure there are probably many other situations in which this would be useful, I think.
Thanks.
Comments
Comment #1
twistor commentedBoy do I have a module for you. Feeds Tamper.
Comment #2
benced commentedWow, thanks. This feeds stuff has improved a lot since a Iot since I looked at it.
Comment #2.0
benced commentedtypo, put have instead of havn't in paragraph 3