Quellcode durchsuchen

Update with Plaque Guide info

master
Adrian Short vor 11 Jahren
Ursprung
Commit
06b1026fd8
1 geänderte Dateien mit 6 neuen und 5 gelöschten Zeilen
  1. +6
    -5
      csv2georss.rb

+ 6
- 5
csv2georss.rb Datei anzeigen

@@ -3,12 +3,13 @@ require 'pp'
require 'erb'
require 'time'

# https://gist.github.com/adrianshort/5547284
# $ ruby csv2georss.rb myfile.csv > feed.xml

template = ERB.new <<-EOF
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#">
<channel>
<channel>
<title><%= channel[:title] %></title>
<link><%= channel[:link] %></link>
<description><%= channel[:description] %></description>
@@ -30,9 +31,9 @@ template = ERB.new <<-EOF
EOF
channel = {
:title => "Open Plaques",
:link => "http://openplaques.org/",
:description => "Documenting the historical links between people and places, as recorded by commemorative plaques."
:title => "Plaque Guide",
:link => "http://www.plaqueguide.com/",
:description => ""
}

items = []
@@ -50,7 +51,7 @@ CSV.foreach(ARGV[0]) do |row|
:link => link,
:description => row[32], # note1
:pubDate => Time.now.rfc822,
:author => "feedback@openplaques.org",
:author => "info@plaqueguide.com",
:guid => link,
:lat => row[5],
:long => row[6]


Laden…
Abbrechen
Speichern