Add guid in item templates.
authorAdam Sampson <ats@offog.org>
Sun, 16 Jan 2005 19:45:45 +0000 (19:45 +0000)
committerAdam Sampson <ats@offog.org>
Sun, 16 Jan 2005 19:45:45 +0000 (19:45 +0000)
NEWS
config
rawdoglib/rawdog.py

diff --git a/NEWS b/NEWS
index 0e46bea61d3242f6dde7ca8151667a41daa20c71..a9092338ce4be496c667b9900292db2147d5f751 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,7 @@
 - rawdog 2.4
 
+Provide guid in item templates (suggested by Rick van Rein).
+
 - rawdog 2.3
 
 Make the id= parameter work correctly (patch from Jon Nelson).
diff --git a/config b/config
index 7dd6a3a563ab793c4b8da6c4c9bfc24d5cf72c5a..b49209e3e8214b034d9b92b44d577a19a5478d9a 100644 (file)
--- a/config
+++ b/config
@@ -81,6 +81,8 @@ template default
 # __title_no_link__   The item title (as text)
 # __url__             The item's URL, or the empty string if it doesn't
 #                     have one
+# __guid__            The item's GUID, or the empty string if it doesn't
+#                     have one
 # __description__     The item's descriptive text, or the empty string
 #                     if it doesn't have a description
 # __date__            The item's date as provided by the feed
index 81fec29fe553d04a6cd50e58a5508c9ecfd4a6ce..d6c14319f274bc1daf875c6d1e6a00c13c9d2f7f 100644 (file)
@@ -1039,6 +1039,10 @@ __description__
                                itembits["url"] = link
                        else:
                                itembits["url"] = ""
+                       if guid is not None:
+                               itembits["guid"] = guid
+                       else:
+                               itembits["guid"] = ""
                        if link is None:
                                itembits["title"] = title
                        else: