|
@@ -102,7 +102,6 @@ class Site |
|
|
end |
|
|
end |
|
|
end |
|
|
end |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
end |
|
|
end |
|
|
Petrify.file('media', 'index.xml', feed) |
|
|
Petrify.file('media', 'index.xml', feed) |
|
|
|
|
|
|
|
@@ -131,6 +130,32 @@ class Site |
|
|
Petrify.page(path, 'authority', \ |
|
|
Petrify.page(path, 'authority', \ |
|
|
{ apps: apps, auth: auth, summary: summary, stories: this_stories, title: auth['authority_name'] }) |
|
|
{ apps: apps, auth: auth, summary: summary, stories: this_stories, title: auth['authority_name'] }) |
|
|
Petrify.csv(path, slug(auth['authority_name']), apps) |
|
|
Petrify.csv(path, slug(auth['authority_name']), apps) |
|
|
|
|
|
|
|
|
|
|
|
# RSS feed for this authority's media stories |
|
|
|
|
|
feed = RSS::Maker.make("2.0") do |maker| |
|
|
|
|
|
maker.channel.title = "#{auth['authority_name']} InLinkUK kiosks media coverage" |
|
|
|
|
|
maker.channel.description = "News and views about Google's UK street kiosk network in #{auth['authority_name']}." |
|
|
|
|
|
maker.channel.link = "#{SITEURL}#{authority_url(auth['authority_name'])}" |
|
|
|
|
|
maker.channel.updated = Time.now.to_s |
|
|
|
|
|
|
|
|
|
|
|
this_stories.each do |story| |
|
|
|
|
|
maker.items.new_item do |item| |
|
|
|
|
|
item.link = story['url'] |
|
|
|
|
|
item.title = "%s: %s" % [ story['publication'], story['title'] ] |
|
|
|
|
|
item.updated = story['publish_date'] |
|
|
|
|
|
|
|
|
|
|
|
if story['authorities'] |
|
|
|
|
|
links = [] |
|
|
|
|
|
story['authorities'].split('|').each do |auth| |
|
|
|
|
|
auth.strip! |
|
|
|
|
|
links << "<a href=%s>%s</a>" % [ SITEURL + authority_url(auth), auth ] |
|
|
|
|
|
end |
|
|
|
|
|
item.description = links.join(', ') |
|
|
|
|
|
end |
|
|
|
|
|
end |
|
|
|
|
|
end |
|
|
|
|
|
end |
|
|
|
|
|
Petrify.file(path, 'media.xml', feed) |
|
|
end |
|
|
end |
|
|
end |
|
|
end |
|
|
end |
|
|
end |