public
Description: Ruby script that takes data from the BBC website and sends it to twitter/pollen_london
Homepage: http://twitter.com/pollen_london
Clone URL: git://github.com/snowblink/pollen-london.git
[#1 state:resolved] Adding a date to each tweet to show when the data was 
pulled.
snowblink (author)
Fri May 16 09:59:12 -0700 2008
commit  e6fd4214a61931190e6a90ddbe117347415f30d0
tree    d2d7d5ee7592c0f7d2158ac361e3117a32bdd931
parent  929cab2618b27d7987623261575a5370de537fdf
...
15
16
17
18
19
20
 
 
21
22
23
...
30
31
32
33
 
 
 
34
35
36
...
15
16
17
 
18
19
20
21
22
23
24
...
31
32
33
 
34
35
36
37
38
39
0
@@ -15,9 +15,10 @@ require 'hpricot'
0
 require 'yaml'
0
 
0
 twitter_config = YAML::load_file('twitter_config.yml')
0
-
0
 twitter = Twitter::Client.new(twitter_config)
0
 
0
+date = DateTime.now.strftime("%Y%m%d%H%M%S")
0
+
0
 # where I live
0
 PLACE = "London"
0
 
0
@@ -30,7 +31,9 @@ to_twitter = []
0
 
0
 elements.each do |image|
0
   alt_text = image.get_attribute("alt")
0
-  to_twitter << alt_text if alt_text.include?(PLACE)
0
+  if alt_text.include?(PLACE)
0
+    to_twitter << "#{alt_text} checked at #{date}"
0
+  end
0
 end
0
 
0
 to_twitter.each do |update|

Comments