Skip to content

Commit

Permalink
Generated a distribution and a new doc
Browse files Browse the repository at this point in the history
  • Loading branch information
iherman committed Dec 13, 2023
1 parent 4598458 commit 21dbce6
Show file tree
Hide file tree
Showing 43 changed files with 328 additions and 306 deletions.
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## Version 1.4.6

- Label is now optional


## Version 1.4.5

- Error in the namespace for `Property` (see https://github.com/w3c/yml2vocab/issues/16)
Expand Down
1 change: 1 addition & 0 deletions dist/lib/common.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"use strict";
// deno-lint-ignore-file no-explicit-any
/**
* Common types and variables.
*
Expand Down
21 changes: 18 additions & 3 deletions dist/lib/convert.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,22 @@ function finalizeRawEntry(raw) {
};
}
})();
const label = ((str) => {
if (str) {
return str;
}
else if (raw.id && raw.id.length > 0) {
return raw.id[0].toLocaleUpperCase() + raw.id.substring(1);
}
else {
return "";
}
})(raw.label);
return {
id: (raw.id) ? raw.id : "",
property: raw.property,
value: raw.value,
label: (raw.label) ? raw.label : "",
label: label,
upper_value: toArray(raw.upper_value),
domain: toArray(raw.domain),
range: toArray(raw.range),
Expand Down Expand Up @@ -315,7 +326,9 @@ function getData(vocab_source) {
vocab.property.map((raw) => {
const types = (raw.status === common_1.Status.deprecated) ? ["rdf:Property", "owl:DeprecatedProperty"] : ["rdf:Property"];
// Calculate the number of entries in various categories
common_2.global.status_counter.add(raw.status);
// The conditional assignment is actually unnecessary per the earlier processing,
// but the deno typescript checker complains...
common_2.global.status_counter.add(raw.status ? raw.status : common_1.Status.stable);
let range = raw.range;
if (range && range.length > 0) {
if (range.length === 1 && (range[0].toUpperCase() === "IRI" || range[0].toUpperCase() === "URL")) {
Expand Down Expand Up @@ -359,7 +372,9 @@ function getData(vocab_source) {
const included_in_domain_of = [];
const includes_range_of = [];
// Calculate the number of entries in various categories
common_2.global.status_counter.add(raw.status);
// The conditional assignment is actually unnecessary per the earlier processing,
// but the deno typescript checker complains...
common_2.global.status_counter.add(raw.status ? raw.status : common_1.Status.stable);
// Get all domain/range cross references
for (const property of properties) {
crossref(raw, property, property.range, range_of, includes_range_of);
Expand Down
3 changes: 1 addition & 2 deletions dist/lib/vocab.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,7 @@
}
},
"required": [
"id",
"label"
"id"
],
"anyOf": [
{ "required": ["comment"] },
Expand Down
1 change: 1 addition & 0 deletions dist/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Object.defineProperty(exports, "__esModule", { value: true });
const yml2vocab = require("./index");
const commander_1 = require("commander");
const process = require("node:process");
/**
* Entry point for running the script on the command line:
*
Expand Down
28 changes: 14 additions & 14 deletions docs/classes/index.VocabGeneration.html

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions docs/classes/lib_common.StatusCounter.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>StatusCounter | Converter of vocabulary in YAML format into Turtle/JSON-LD/HTML+RDFa - v1.4.4</title><meta name="description" content="Documentation for Converter of vocabulary in YAML format into Turtle/JSON-LD/HTML+RDFa - v1.4.4"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>StatusCounter | Converter of vocabulary in YAML format into Turtle/JSON-LD/HTML+RDFa - v1.4.6</title><meta name="description" content="Documentation for Converter of vocabulary in YAML format into Turtle/JSON-LD/HTML+RDFa - v1.4.6"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
<div class="tsd-toolbar-contents container">
<div class="table-cell" id="tsd-search" data-base="..">
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
<div class="field">
<div id="tsd-toolbar-links"></div></div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Converter of vocabulary in YAML format into Turtle/JSON-LD/HTML+RDFa - v1.4.4</a></div>
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Converter of vocabulary in YAML format into Turtle/JSON-LD/HTML+RDFa - v1.4.6</a></div>
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
<div class="container container-main">
<div class="col-8 col-content">
<div class="tsd-page-title">
<ul class="tsd-breadcrumb">
<li><a href="../modules.html">Converter of vocabulary in YAML format into Turtle/JSON-LD/HTML+RDFa - v1.4.4</a></li>
<li><a href="../modules.html">Converter of vocabulary in YAML format into Turtle/JSON-LD/HTML+RDFa - v1.4.6</a></li>
<li><a href="../modules/lib_common.html">lib/common</a></li>
<li><a href="lib_common.StatusCounter.html">StatusCounter</a></li></ul>
<h1>Class StatusCounter</h1></div>
Expand All @@ -24,7 +24,7 @@ <h4>Hierarchy</h4>
<ul class="tsd-hierarchy">
<li><span class="target">StatusCounter</span></li></ul></section><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/w3c/yml2vocab/blob/5c919b4/lib/common.ts#L31">lib/common.ts:31</a></li></ul></aside>
<li>Defined in <a href="https://github.com/w3c/yml2vocab/blob/4598458/lib/common.ts#L32">lib/common.ts:32</a></li></ul></aside>
<section class="tsd-panel-group tsd-index-group">
<section class="tsd-panel tsd-index-panel">
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
Expand Down Expand Up @@ -61,7 +61,7 @@ <h4 class="tsd-parameters-title">Parameters</h4>
<h5>status: <a href="../enums/lib_common.Status.html" class="tsd-signature-type" data-tsd-kind="Enumeration">Status</a></h5></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/w3c/yml2vocab/blob/5c919b4/lib/common.ts#L36">lib/common.ts:36</a></li></ul></aside></li></ul></section>
<li>Defined in <a href="https://github.com/w3c/yml2vocab/blob/4598458/lib/common.ts#L37">lib/common.ts:37</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="counter" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>counter</span><a href="#counter" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
Expand All @@ -74,7 +74,7 @@ <h4 class="tsd-parameters-title">Parameters</h4>
<h5>status: <a href="../enums/lib_common.Status.html" class="tsd-signature-type" data-tsd-kind="Enumeration">Status</a></h5></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/w3c/yml2vocab/blob/5c919b4/lib/common.ts#L52">lib/common.ts:52</a></li></ul></aside></li></ul></section></section></div>
<li>Defined in <a href="https://github.com/w3c/yml2vocab/blob/4598458/lib/common.ts#L53">lib/common.ts:53</a></li></ul></aside></li></ul></section></section></div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<div class="tsd-navigation settings">
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
Expand All @@ -92,7 +92,7 @@ <h4 class="uppercase">Theme</h4><select id="theme"><option value="os">OS</option
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Modules</h3></summary>
<div class="tsd-accordion-details">
<ul>
<li class="current"><a href="../modules.html">Converter of vocabulary in YAML format into <wbr/>Turtle/JSON-<wbr/>LD/HTML+RDFa -<wbr/> v1.4.4</a>
<li class="current"><a href="../modules.html">Converter of vocabulary in YAML format into <wbr/>Turtle/JSON-<wbr/>LD/HTML+RDFa -<wbr/> v1.4.6</a>
<ul>
<li class="tsd-kind-module"><a href="../modules/index.html">index</a></li>
<li class="current tsd-kind-module"><a href="../modules/lib_common.html">lib/common</a></li>
Expand Down
16 changes: 8 additions & 8 deletions docs/enums/lib_common.Status.html
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Status | Converter of vocabulary in YAML format into Turtle/JSON-LD/HTML+RDFa - v1.4.4</title><meta name="description" content="Documentation for Converter of vocabulary in YAML format into Turtle/JSON-LD/HTML+RDFa - v1.4.4"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Status | Converter of vocabulary in YAML format into Turtle/JSON-LD/HTML+RDFa - v1.4.6</title><meta name="description" content="Documentation for Converter of vocabulary in YAML format into Turtle/JSON-LD/HTML+RDFa - v1.4.6"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
<div class="tsd-toolbar-contents container">
<div class="table-cell" id="tsd-search" data-base="..">
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
<div class="field">
<div id="tsd-toolbar-links"></div></div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Converter of vocabulary in YAML format into Turtle/JSON-LD/HTML+RDFa - v1.4.4</a></div>
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Converter of vocabulary in YAML format into Turtle/JSON-LD/HTML+RDFa - v1.4.6</a></div>
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
<div class="container container-main">
<div class="col-8 col-content">
<div class="tsd-page-title">
<ul class="tsd-breadcrumb">
<li><a href="../modules.html">Converter of vocabulary in YAML format into Turtle/JSON-LD/HTML+RDFa - v1.4.4</a></li>
<li><a href="../modules.html">Converter of vocabulary in YAML format into Turtle/JSON-LD/HTML+RDFa - v1.4.6</a></li>
<li><a href="../modules/lib_common.html">lib/common</a></li>
<li><a href="lib_common.Status.html">Status</a></li></ul>
<h1>Enumeration Status</h1></div>
<section class="tsd-panel tsd-comment">
<div class="tsd-comment tsd-typography"><p>Characterization of a class/property/individual on whether it is stable or not.</p>
</div></section><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/w3c/yml2vocab/blob/5c919b4/lib/common.ts#L22">lib/common.ts:22</a></li></ul></aside>
<li>Defined in <a href="https://github.com/w3c/yml2vocab/blob/4598458/lib/common.ts#L23">lib/common.ts:23</a></li></ul></aside>
<section class="tsd-panel-group tsd-index-group">
<section class="tsd-panel tsd-index-panel">
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
Expand All @@ -38,17 +38,17 @@ <h2>Enumeration Members</h2>
<h3 class="tsd-anchor-link"><span>deprecated</span><a href="#deprecated" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></h3>
<div class="tsd-signature">deprecated<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;deprecated&quot;</span></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/w3c/yml2vocab/blob/5c919b4/lib/common.ts#L25">lib/common.ts:25</a></li></ul></aside></section>
<li>Defined in <a href="https://github.com/w3c/yml2vocab/blob/4598458/lib/common.ts#L26">lib/common.ts:26</a></li></ul></aside></section>
<section class="tsd-panel tsd-member tsd-kind-enum-member tsd-parent-kind-enum"><a id="reserved" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>reserved</span><a href="#reserved" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">reserved<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;reserved&quot;</span></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/w3c/yml2vocab/blob/5c919b4/lib/common.ts#L24">lib/common.ts:24</a></li></ul></aside></section>
<li>Defined in <a href="https://github.com/w3c/yml2vocab/blob/4598458/lib/common.ts#L25">lib/common.ts:25</a></li></ul></aside></section>
<section class="tsd-panel tsd-member tsd-kind-enum-member tsd-parent-kind-enum"><a id="stable" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>stable</span><a href="#stable" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">stable<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;stable&quot;</span></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/w3c/yml2vocab/blob/5c919b4/lib/common.ts#L23">lib/common.ts:23</a></li></ul></aside></section></section></div>
<li>Defined in <a href="https://github.com/w3c/yml2vocab/blob/4598458/lib/common.ts#L24">lib/common.ts:24</a></li></ul></aside></section></section></div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<div class="tsd-navigation settings">
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
Expand All @@ -66,7 +66,7 @@ <h4 class="uppercase">Theme</h4><select id="theme"><option value="os">OS</option
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Modules</h3></summary>
<div class="tsd-accordion-details">
<ul>
<li class="current"><a href="../modules.html">Converter of vocabulary in YAML format into <wbr/>Turtle/JSON-<wbr/>LD/HTML+RDFa -<wbr/> v1.4.4</a>
<li class="current"><a href="../modules.html">Converter of vocabulary in YAML format into <wbr/>Turtle/JSON-<wbr/>LD/HTML+RDFa -<wbr/> v1.4.6</a>
<ul>
<li class="tsd-kind-module"><a href="../modules/index.html">index</a></li>
<li class="current tsd-kind-module"><a href="../modules/lib_common.html">lib/common</a></li>
Expand Down
Loading

0 comments on commit 21dbce6

Please sign in to comment.