Trying to add a unique guid to each item in rss feed
I have an rss feed that doesn't contain unique guid's per item.
I'm trying to use a wordpress addon to import items in an rss feed to posts but the addon only posts the first item in the feed because it assumes there all the same because they all have the same guid. The addon uses the guid to determine if an item in the feed has been posted already so it doesn't post the same thing twice.
So what I need to do is use yahoo pipes to create a unique guid per item in the feed so I can use the wordpress addon.
My rss feed has my login details so I cant share the original feed but here is the feed structure.
Make the assumption all items are unique (if not, you can filter in pipes). With that assumption, you just want to put distinct strings in the guid field. To do that, you can just copy the title to guid (rename module, select item.title 'copy as' guid), or put utime in it (regex module), or a copy of the pubdate,...
So if the link is present in the description for example, you should copy it as guid, then use regex to leave only the link as the guid value. Then, still using the regex for example, create the field guid.isPermaLink and set it to 'true'.
don't use YQL here, it's an overkill. fetch data or fetch feed, that's fine. However all fetching methods, used properly, should give you the same results.
the <Guid set properly as item title> seems very wrong. you should obtain something like <guid isPermaLink="false">title of the i-th article of the feed</guid>, unless you put that here instead of your article title, in which case please don't as it's all kinds of wrong.
From what I read, ie that your add-on read only the first article and that pipe does that too, I'd say neither are culprits, and you've got only one item in your feed.
first, can't you link a dummy pipe without your login details? of another feed for example... even though I'd like to check this one as I don't believe very much there is no guid sub-item, and I suspect your feed is only one item long.
ps: the norm specify that the guid is NOT mandatory, so if your really have more than one item in the feed, you should probably look for another wordpress add-on...
I understand that the GUID is not mandatory for a feed to work. However this Wordpress addon needs the guid to be set in order to know if it processed the item in the feed or not. The wordpress addon makes a new post with the contents of the feed if the guid is missing or all items have the same guid the addon assumes the items are the same and skips duplicates.
The Addon is not to blame. It's the original feed not containing the guid for the addon to work.
I have added the feed to feedburner (To hide my user credentials) so I can now share my pipe hopefully this makes this easier. :)
your problem was that your original feed already had a y:id value (an empty one) and a y:id.isPermaLink.
Thus, trying to assign a dummy string to it was not to the linking of pipes it would seem...
Instead, in this pipe, I built the guid in another sub-field (the guid here), and copied it whole to y:id afterwards. Also, I took out the spaces, in case of, but that might just be me being overcautious. Last word, when working on the guid, open your feed in a text editor to see the guid sub-field. However, the update of the pipe scheme is not instantaneous. Do not change the pipe right after a first change because the output is identical...