From 91251ec306479e6f38f16ff6ef17e5114995a939 Mon Sep 17 00:00:00 2001 From: pictuga Date: Sat, 16 Nov 2013 19:07:25 +0100 Subject: [PATCH] isPermaLink in feeds.py (RSS only) --- feeds.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/feeds.py b/feeds.py index 3d9c80e..f2ddb4d 100644 --- a/feeds.py +++ b/feeds.py @@ -407,6 +407,13 @@ class FeedItem(FeedBase): pass + def getIsPermaLink(self): + return "" + + def setIsPermaLink(self, value): + pass + + def getDesc(self): return "" @@ -461,6 +468,7 @@ class FeedItem(FeedBase): description = desc = FeedDescriptor('desc') content = FeedDescriptor('content') id = FeedDescriptor('id') + isPermaLink = FeedBool('isPermaLink') time = FeedTime('time') updated = FeedTime('updated') @@ -540,6 +548,16 @@ class FeedItemRSS(FeedItem): element.text = value + def getIsPermaLink(self): + return self.xget('rssfake:guid/@isPermaLink|guid/@isPermaLink') + + def setIsPermaLink(self, value): + table = { 'rdf:rdf': 'rssfake:guid', + 'channel': 'guid'} + element = self.xgetCreate(table) + element.attrib['isPermaLink'] = value + + def getTime(self): return self.xval('rssfake:pubDate|pubDate')