diff options
author | Michał Górny <mgorny@gentoo.org> | 2019-04-16 12:22:38 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2019-04-16 12:22:38 +0200 |
commit | 75a6eaa90f526666b2231a01bbb5be58254e814b (patch) | |
tree | db7b7d5dccbf40a4a40431823297b0a52e24eb6e | |
parent | Support decoding interwiki URL encoding (diff) | |
download | semantic-data-toolkit-75a6eaa90f526666b2231a01bbb5be58254e814b.tar.gz semantic-data-toolkit-75a6eaa90f526666b2231a01bbb5be58254e814b.tar.bz2 semantic-data-toolkit-75a6eaa90f526666b2231a01bbb5be58254e814b.zip |
Include project lead election date in projects.json20190416T102325Z
Signed-off-by: Michał Górny <mgorny@gentoo.org>
-rw-r--r-- | lib/vocabulary.rb | 1 | ||||
-rwxr-xr-x | projects.rb | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/lib/vocabulary.rb b/lib/vocabulary.rb index b0e623c..3dc25ce 100644 --- a/lib/vocabulary.rb +++ b/lib/vocabulary.rb @@ -13,6 +13,7 @@ module GentooWiki PROP_NAME = RDF::URI.new(NS_PROP + 'Has_Name') PROP_CONTACT = RDF::URI.new(NS_PROP + 'Has_Contact') PROP_DESC = RDF::URI.new(NS_PROP + 'Has_Description') + PROP_LEAD_ELECTION_DATE = RDF::URI.new(NS_PROP + 'Has_Lead_Election_Date') PROP_IRC = RDF::URI.new(NS_PROP + 'Has_IRC_channel') PROP_PARENT_PROJECT = RDF::URI.new(NS_PROP + 'Has_Parent_Project') PROP_PROPAGATES_MEMBERS = RDF::URI.new(NS_PROP + 'Propagates_Members') diff --git a/projects.rb b/projects.rb index e5a9eaf..2d9565a 100755 --- a/projects.rb +++ b/projects.rb @@ -27,6 +27,7 @@ projects_q = Query.new do pattern [:proj_uri, GentooWiki::PROP_PROPAGATES_MEMBERS, :propagates_members], optional: true pattern [:proj_uri, GentooWiki::PROP_IRC, :proj_irc], optional: true + pattern [:proj_uri, GentooWiki::PROP_LEAD_ELECTION_DATE, :proj_lead_election_date], optional: true end def query_members(project_uri) @@ -66,6 +67,7 @@ projects_q.execute(graph) do |result| project['irc'] = result[:proj_irc].to_s project['href'] = URI.decode(https(result[:proj_href].to_s).gsub('-', '%')) project['propagates_members'] = result[:propagates_members].to_s == 'true' + project['lead_election_date'] = result[:proj_lead_election_date].to_s parent_id = label_to_id result[:parent_title].to_s project['parent'] = parent_id unless parent_id == 'Gentoo' |