summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'projects/devdashboard/planetiniparser.rb')
-rwxr-xr-xprojects/devdashboard/planetiniparser.rb39
1 files changed, 34 insertions, 5 deletions
diff --git a/projects/devdashboard/planetiniparser.rb b/projects/devdashboard/planetiniparser.rb
index 051db56..72de77d 100755
--- a/projects/devdashboard/planetiniparser.rb
+++ b/projects/devdashboard/planetiniparser.rb
@@ -5,8 +5,8 @@ require 'pp'
module PlanetIniParser
- def PlanetIniParser.updateDev(developer)
- planetUri = "http://sources.gentoo.org/viewcvs.py/*checkout*/planet/configs/planet.ini?rev=176"
+ def PlanetIniParser.updateDevs(developers)
+ planetUri = "http://sources.gentoo.org/viewcvs.py/*checkout*/planet/configs/planet.ini"
open(planetUri) do |file|
while line = file.gets do
if line =~ /^\[(.*)\]$/
@@ -21,15 +21,44 @@ module PlanetIniParser
data[$1] = $2
end
- if data['username'] == developer.handle
- if ! data['face'].nil?
+ developer = developers["#{data['username']}@gentoo.org"]
+ unless developer.nil?
+ unless data['face'].nil?
developer.hackergotchi = "http://planet.gentoo.org/images/#{data['face']}"
end
+
developer.blogRss = url
end
+ end
end
end
+
end
-end
+# def PlanetIniParser.updateDev(developer)
+# planetUri = "http://sources.gentoo.org/viewcvs.py/*checkout*/planet/configs/planet.ini?rev=176"
+# open(planetUri) do |file|
+# while line = file.gets do
+# if line =~ /^\[(.*)\]$/
+# url = $1
+# next if url == "Planet" or url == "DEFAULT"
+#
+# data = {}
+# while line = file.gets do
+# line.chomp!
+# break if line == ""
+# line =~ /(.*) = (.*)/
+# data[$1] = $2
+# end
+#
+# if data['username'] == developer.handle
+# if ! data['face'].nil?
+# developer.hackergotchi = "http://planet.gentoo.org/images/#{data['face']}"
+# end
+# developer.blogRss = url
+# end
+# end
+# end
+# end
+
end