Parsing Enclosures

Events happening in the community are now at Drupal community events on www.drupal.org.
andrew7's picture

Since the gods of aggregation are all here, and I've exhausted all other options, here goes my question:

In our project, we are dealing with aggregated feeds that have media enclosures in them. Photos, the occasional video, etc. How can one parse these files and use them?

My related post:
http://drupal.org/node/180385

Comments

Short version: I used

lyricnz's picture

Short version: I used FeedAPI, added a couple of hooks to my parser/processor, and then explicitly fetched attributes from the <item> and used them to create the nodes. This included the enclosure tag (using curl to fetch the file), keywords tags (added to taxonomy), etc.

Simon Roberts
Taniwha Solutions

Hi keysar, I know this is a

alex_b's picture

Hi keysar,

I know this is a late reply, but only recently I got around to do more aggregator work again (FeedAPI 1.0 beta 1 is out now).

I am interested in making downloading enclosures and other file references happen, too.

What's not clear for me is what kind of Drupal ressources you would like to map enclosures to.

Should e. g. a file enclosure be mapped to a particular CCK file field on your node? Files of image types be mapped to an image field? Or do you only want to download files into a directory?

Alex

Alex: I can't speak for

designerbrent's picture

Alex: I can't speak for keystar7 but I would say there are two different types of ways to handle enclosures:

  • Download the enclosure and mapping it into Drupal.
  • Map the remote location of the enclosure to Drupal.

I'm very interested in the second way and I think your Mapping module will work well for that. Thanks for all your great work on the FeedAPI

Cheers,
Brent

We've been looking at this as well

bonobo's picture

and have been thinking about two different directions --

  1. a unique cck field for each type of media (following the model of the audio module, embedded media field, media field display, etc) with each field having a player associated with it.

http://drupal.org/project/mediafield
http://drupal.org/project/mediafield_display
http://drupal.org/project/audio
http://drupal.org/project/emfield

  1. Or, one field that holds different types of media, and displays it in a different type of player based on the media type -- this would work like the audio module, with configurable players by media type --

WRT importing the file, we would want to set that as an option that would allow the site admin to set a size limit for the import -- ie, import any file under X MB, and link to files over X MB -- like the player, this would be configurable by media type, so you (for example) could elect to import jpgs 2 MB or or smaller, import mp3s 10 MB or smaller, and import video files 30 MB or smaller.

I'd love any feedback from folks who have gone down this road about the different options, or other options we haven't considered. We are still researching now, but will start coding within the next 2-3 weeks. Our initial use case is in synching up with a doc repository.

Cheers,

Bill


FunnyMonkey
Tools for Teachers

RSS & Aggregation

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: