summaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorYves Fischer <yves.fischer@cern.ch>2016-01-26 11:44:55 +0100
committerYves Fischer <yves.fischer@cern.ch>2016-01-26 11:44:55 +0100
commit4612cf3d2cbe712943f6656a814657aad3303a83 (patch)
tree3e30df9819b183da10009a35fd1f77faa70dbb53 /src/main
parenta059e48189927477c605cf44299b7bf84650d844 (diff)
downloadglocals-classifieds-4612cf3d2cbe712943f6656a814657aad3303a83.tar.gz
glocals-classifieds-4612cf3d2cbe712943f6656a814657aad3303a83.zip
fix rss feed
Diffstat (limited to 'src/main')
-rw-r--r--src/main/groovy/org/xapek/yvesf/classifieds/Dumper.groovy6
-rw-r--r--src/main/groovy/org/xapek/yvesf/classifieds/Model.groovy4
2 files changed, 8 insertions, 2 deletions
diff --git a/src/main/groovy/org/xapek/yvesf/classifieds/Dumper.groovy b/src/main/groovy/org/xapek/yvesf/classifieds/Dumper.groovy
index 017cdf3..0d53c08 100644
--- a/src/main/groovy/org/xapek/yvesf/classifieds/Dumper.groovy
+++ b/src/main/groovy/org/xapek/yvesf/classifieds/Dumper.groovy
@@ -11,12 +11,14 @@ class Dumper {
rss(version: '2.0') {
channel {
title('Glocals')
+ description('glocal classifieds feed')
}
classifiedList.each { Classified classified ->
item {
title("${classified.type} - ${classified.title} - ${classified.composedLocation}")
- guid(classified.id)
- author(classified.mem_name)
+ guid(classified.link)
+ link(classified.link)
+ author("${classified.mem_name}@noemail.local")
description(getDescription(classified) + classified.description)
}
}
diff --git a/src/main/groovy/org/xapek/yvesf/classifieds/Model.groovy b/src/main/groovy/org/xapek/yvesf/classifieds/Model.groovy
index 6303d3e..35aafdf 100644
--- a/src/main/groovy/org/xapek/yvesf/classifieds/Model.groovy
+++ b/src/main/groovy/org/xapek/yvesf/classifieds/Model.groovy
@@ -60,6 +60,10 @@ class Model {
}
}
+ String getLink() {
+ return "http://www.glocals.com/classifieds/housing-and-real-estate/${id}.htm"
+ }
+
String getComposedLocation() {
return location + (city != location ? ', ' + city : '')
}