Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Support id/guid #3

Closed
oueqzoms opened this Issue · 3 comments

2 participants

@oueqzoms

Could you add support for the id/guid tag? Not all feeds include them, but when they do it's quite handy.

It would be nice to have a built-in way to access entries by id too, but all I really need is an :id key in the entry struct.

@scsibug
Owner

The :link and :uri keys will probably give you what you are looking for. ROME (the underlying library that actually performs feed parsing) tries to reconcile id/guid in the many different feed formats into a URI.

For an Atom feed, you should find the feed and entry "id" element accessible from the :uri key. For RSS, the guid may be available via either the :link or :uri, but the logic governing that is more complicated.

See this reference for precise details on how this mapping is accomplished in ROME: http://wiki.java.net/bin/view/Javawsxml/Rome05URIMapping

Please let me know if this ends up working out for you. Thank you!

@oueqzoms

Yes, that's very helpful. I'm not sure I understand your comment about RSS's GUID, though; my reading of the linked document is that if there's a GUID for an RSS (0.94+) feed entry, then it will always be used as the uri for that entry (though it may also be used as the link). So in my understanding: if there's an ID of some sort, :uri will be it. Is this correct?

Thanks for the response!

@scsibug
Owner

You are right, the GUID may be available from both :link/:uri (not "either" as I originally commented).

My understanding is the same as yours: :uri will always contain an identifier (if one existed in the feed/entry).

@scsibug scsibug closed this in fbe07e2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.