diff options
author | Alex Legler <alex@a3li.li> | 2016-01-31 01:56:23 +0100 |
---|---|---|
committer | Alex Legler <alex@a3li.li> | 2016-01-31 01:56:23 +0100 |
commit | ab268de78b5c9f952cfedfbd75eab2f249f175c2 (patch) | |
tree | 8daac2a98757153fe91220f5dc522d81b9b6f69b /_plugins | |
parent | Clear debug code (diff) | |
download | www-ab268de78b5c9f952cfedfbd75eab2f249f175c2.tar.gz www-ab268de78b5c9f952cfedfbd75eab2f249f175c2.tar.bz2 www-ab268de78b5c9f952cfedfbd75eab2f249f175c2.zip |
Deprecate herds
Diffstat (limited to '_plugins')
-rw-r--r-- | _plugins/herds.rb | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/_plugins/herds.rb b/_plugins/herds.rb deleted file mode 100644 index 971f1e2..0000000 --- a/_plugins/herds.rb +++ /dev/null @@ -1,43 +0,0 @@ -module Gentoo - class HerdsGenerator < Jekyll::Generator - XML = '_data/herds.xml' - - def generate(site) - xml = Nokogiri::XML(File.open(XML)) - - site.data['herds'] ||= {} - - xml.xpath('/herds/herd').each do |item| - item_data = {} - - name = item.xpath('./name').first.text - - item_data['email'] = item.xpath('./email/text()').first.content - item_data['description'] = item.xpath('./description/text()').first.text - - ns_maint = item.xpath('./maintainer') - item_data['maintainers'] = [] if ns_maint.size > 0 - ns_maint.each do |maint| - maint_data = { - 'email' => maint.xpath('./email/text()').first.text, - 'name' => nil, - 'role' => nil - } - - ns_name = maint.xpath('./name/text()') - maint_data['name'] = ns_name.first.text if ns_name.size > 0 - - ns_role = maint.xpath('./role/text()') - maint_data['role'] = ns_role.first.text if ns_role.size > 0 - - item_data['maintainers'] << maint_data - end - - ns_maintproj = item.xpath('./maintainingproject/text()') - item_data['proj'] = ns_maintproj.first.text if ns_maintproj.size > 0 - - site.data['herds'][name] = item_data - end - end - end -end |