FeedAPI Node Delete

schaub123's picture

I've been working on an extension module / processor for FeedAPI (similar to feedapi_node) that does node deletions based upon incoming feed items parsed by FeedAPI. So, you can bring in and create new nodes from feed items -- why not be able to delete them as well!

I am currently matching on guid or node title -- the match type is configurable. Guid is pretty safe and should be unique. Also, you are probably not going to bring in and process a "delete feed" from an untrusted source.

But, I'm wondering about the pros / cons of matching on node titles. At first, it seemed like a good idea to be flexible enough to take a "delete feed" from any RSS feed source. I could see someone wanting to write this kind of feed that might be pulling data from a variety of sources (even non-Drupal) that need to update remote client sites. Guid is more exact, but node title might be handy in some cases.

So, any thoughts on the merits of title matching are greatly appreciated. I just wanted to see if anyone thought it was a good idea before I ripped it out! I'm hoping to submit the module for inclusion as a feedAPI parser. It seems that node deletion is really needed since we already have node creation.

Thanks for your input.

Login to post comments

Did you get this module working?

grigs - Tue, 2009-03-17 19:23

We're looking to do something similar where a master list is maintained on an external server and we want to sync that list to nodes. We need to handle deletions as well. Did you build the module or find a different solution?

Thanks.


filter feed items on taxonomy terms

indytechcook's picture
indytechcook - Tue, 2009-03-17 20:21

I sort of do what you are looking for using feedapi taxonomy compare. http://drupal.org/project/feedapi_taxonomy_compare

I'm doing this on the blog for http://code-dreamers.com.

  • I created a Vocabulary called 'Categories' This is a list of the tags that I wanted to display on my site.
  • I have blog posts on my main blog. Here I attach Tags.
  • FeedAPI and Feed Element Mapper are used to pull in the feeds and map the 'option->tags' rss element to a 'Tags' vocabulary in drupal.
  • After each feed refresh, FeedAPI Taxonomy compare looks at the new items terms (from the Feed Mapping above) and looks for a match to the 'Categories' vocabulary.
  • If a match is found, then it adds the 'Categories' term to the feed-item and removes the 'Tags' vocabulary term (the remove is optional).
  • I use views to only display the feed-items that have a term in the 'Categories' vocabulary. I don't display the 'Tags' or 'Categories' to the user. The are purely used to filter out unwanted posts.

I used to have an option to delete the feed-item if a match wasn't found but removed to protect the user. They can always filter the content by a view.

There is also FeedAPI Item Filter module: http://drupal.org/project/feedapi_itemfilter


Some patches

q0rban's picture
q0rban - Wed, 2009-08-12 14:32

You might also check out these patches:
http://drupal.org/node/289100#comment-1741906
http://drupal.org/node/289100#comment-1819010

The latter patch sounds like a better solution to me.
_ _
( ' _' )