diff options
author | Alex Legler <alex@a3li.li> | 2015-04-12 11:12:03 +0200 |
---|---|---|
committer | Alex Legler <alex@a3li.li> | 2015-04-12 11:12:03 +0200 |
commit | 1ebcbe0c31c252413041218e2f5ebdb61f3b90aa (patch) | |
tree | 9001ac980e7d699ac1dd915cdbf1ca201a48c662 | |
parent | Fix typo in robots.txt (diff) | |
download | www-1ebcbe0c31c252413041218e2f5ebdb61f3b90aa.tar.gz www-1ebcbe0c31c252413041218e2f5ebdb61f3b90aa.tar.bz2 www-1ebcbe0c31c252413041218e2f5ebdb61f3b90aa.zip |
Add herds support
-rw-r--r-- | _data/.gitignore | 1 | ||||
-rw-r--r-- | _plugins/herds.rb | 43 | ||||
-rw-r--r-- | _sass/misc.scss | 15 | ||||
-rwxr-xr-x | bin/update-herds.sh | 5 | ||||
-rwxr-xr-x | bin/update.sh | 3 | ||||
-rw-r--r-- | inside-gentoo/developers/herds.html | 65 |
6 files changed, 131 insertions, 1 deletions
diff --git a/_data/.gitignore b/_data/.gitignore index 6ceb68b..5acd2d7 100644 --- a/_data/.gitignore +++ b/_data/.gitignore @@ -1,5 +1,6 @@ devaway.xml glsa.yaml +herds.xml packages.xml planet.xml userinfo.json diff --git a/_plugins/herds.rb b/_plugins/herds.rb new file mode 100644 index 0000000..2f357c7 --- /dev/null +++ b/_plugins/herds.rb @@ -0,0 +1,43 @@ +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
\ No newline at end of file diff --git a/_sass/misc.scss b/_sass/misc.scss index 7b3e85d..c0ffc80 100644 --- a/_sass/misc.scss +++ b/_sass/misc.scss @@ -16,6 +16,13 @@ } } +::selection { + background: #dddaec ; +} +::-moz-selection { + background: #dddaec ; +} + .gentoo-nav a:link, .gentoo-nav a:visited { color: #54487a; @@ -47,6 +54,14 @@ body.nav-align-h2 #content h2:first-of-type { min-width: 6em; } +.herd-desc-col { + width: 10em; +} + +.herd-maint-col { + width: 50%; +} + @media (min-width: 768px) { .frontpage-table { width: 100%; diff --git a/bin/update-herds.sh b/bin/update-herds.sh new file mode 100755 index 0000000..53c3c1b --- /dev/null +++ b/bin/update-herds.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +echo -n 'Updating herd information...' +wget 'https://api.gentoo.org/packages/herds.xml' -O _data/herds.xml 2>/dev/null +echo 'done.' diff --git a/bin/update.sh b/bin/update.sh index 463989a..dcb6f99 100755 --- a/bin/update.sh +++ b/bin/update.sh @@ -3,8 +3,9 @@ bin/update-devaway.sh || exit 1 bin/update-downloads.sh || exit 1 bin/update-glsa.sh || exit 1 +bin/update-herds.sh || exit 1 bin/update-mirrors.sh || exit 1 bin/update-packages.sh || exit 1 bin/update-planet.sh || exit 1 bin/update-userinfo.sh || exit 1 -bin/update-wiki.sh || exit 1
\ No newline at end of file +bin/update-wiki.sh || exit 1 diff --git a/inside-gentoo/developers/herds.html b/inside-gentoo/developers/herds.html new file mode 100644 index 0000000..2537126 --- /dev/null +++ b/inside-gentoo/developers/herds.html @@ -0,0 +1,65 @@ +--- +title: 'Gentoo Package Herds' +navtitle: 'Herds' + +nav1: inside-gentoo + +nav2: developers + +nav3: herds +nav3-show: true +nav3-weight: 40 + +layout: page-nav3 +--- + +<p> + This page lists all package maintenance groups (herds) in the Gentoo project. +</p> + +{% for entry in site.data.herds %} +<h3>{{ entry[0] | xml_escape }}</h3> + +<table class="table"> + <tr> + <th class="herd-desc-col">Description</th> + <td>{{ entry[1].description | xml_escape }}</td> + </tr> + <tr> + <th>Contact</th> + <td><a href="mailto:{{ entry[1].email | xml_escape }}">{{ entry[1].email | xml_escape }}</a></td> + </tr> + <tr> + <th>Maintainers</th> + <td> + {% if entry[1].maintainers %} + <table class="table table-condensed"> + <tr> + <th class="herd-maint-col">Maintainer</th> + <th>Roles</th> + </tr> + {% for maint in entry[1].maintainers %} + <tr> + <td> + {% if maint.name %} + <a href="mailto:{{ maint.email | xml_escape }}">{{ maint.name | xml_escape }}</a> + {% else %} + <a href="mailto:{{ maint.email | xml_escape }}">{{ maint.email | xml_escape }}</a> + {% endif %} + </td> + <td> + {{ maint.role | xml_escape }} + </td> + </tr> + {% endfor %} + </table> + {% endif %} + + {% if entry[1].proj %} + A Gentoo project is (also) listed as participating in the maintenance of packages in this herd. + Listing maintainers of this project is currently not possible. + {% endif %} + </td> + </tr> +</table> +{% endfor %} |