From a0dbaceec5abc028006e0658a37567f1abad59d6 Mon Sep 17 00:00:00 2001 From: Mike Linksvayer Date: Tue, 10 May 2016 14:59:04 -0700 Subject: [PATCH] Single patent column handles permission and limitation cases --- appendix.md | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/appendix.md b/appendix.md index f0c596e..0860d12 100644 --- a/appendix.md +++ b/appendix.md @@ -8,27 +8,46 @@ class: license-types All licenses described in the choosealicense.com [repository](https://github.com/github/choosealicense.com), in a table. +{% assign types = "permissions|conditions|limitations" | split: "|" %} - {% assign types = "permissions|conditions|limitations" | split: "|" %} + {% assign seen_tags = '' %} {% for type in types %} {% assign rules = site.data.rules[type] | sort: "label" %} {% for rule_obj in rules %} + {% if seen_tags contains rule_obj.tag %} + {% continue %} + {% endif %} + {% capture seen_tags %}{{ seen_tags | append:rule_obj.tag }}{% endcapture %} {% endfor %} {% endfor %} {% for license in site.licenses | sort: 'path' %} + {% assign seen_tags = '' %} {% for type in types %} {% assign rules = site.data.rules[type] | sort: "label" %} {% for rule_obj in rules %} - + {% assign req = rule_obj.tag %} + {% if seen_tags contains req %} + {% continue %} + {% endif %} + {% capture seen_tags %}{{ seen_tags | append:req }}{% endcapture %} + {% assign seen_req = false %} + {% for t in types %} + {% if license[t] contains req %} + + {% assign seen_req = true %} + {% endif %} + {% endfor %} + {% unless seen_req %} + + {% endunless %} {% endfor %} {% endfor %}
License{{ rule_obj.label }}
{{ license.title }}{% assign req = rule_obj.tag %} - {% if license[type] contains req %} - - - - {% endif %} + + + +