diff --git a/bun.lockb b/bun.lockb index 89467ae..eeafda5 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/curated-texts/Home.md b/curated-texts/Home.md index 548cd5a..42eff19 100644 --- a/curated-texts/Home.md +++ b/curated-texts/Home.md @@ -1,6 +1,7 @@ --- -term: Home -termType: term +glossaryTerm: Home +term: home +termType: concept --- Welcome to the [Human Experience Working Group](https://wiki.trustoverip.org/x/_RIB) (HXWG) [terms wiki](https://github.com/trustoverip/hxwg/wiki/terms-wiki)! This is where the HXWG [terms community](https://github.com/trustoverip/ctwg/wiki/terms-community) manages the "bootstrap" terminology needed for its own documentation and tools. diff --git a/curated-texts/Minimum-Virtuous-Product-(MVirP).md b/curated-texts/Minimum-Virtuous-Product-(MVirP).md index 44b2200..29b6d8a 100644 --- a/curated-texts/Minimum-Virtuous-Product-(MVirP).md +++ b/curated-texts/Minimum-Virtuous-Product-(MVirP).md @@ -1,6 +1,7 @@ --- -term: Minimum Virtuous Product (MVirP) -termType: term +glossaryTerm: Minimum Virtuous Product (MVirP) +term: minimum-virtuous-product +termType: concept glossaryText: >- A method of product development that tests for the effects on stakeholders and builds in guards against potential harms. Defined by Hemant Taneja,[ The Era diff --git a/curated-texts/P2P-Decision-Context.md b/curated-texts/P2P-Decision-Context.md index 2cd5e4a..1d62c30 100644 --- a/curated-texts/P2P-Decision-Context.md +++ b/curated-texts/P2P-Decision-Context.md @@ -1,6 +1,7 @@ --- -term: P2P Decision Context -termType: term +glossaryTerm: P2P Decision Context +term: p2p-decision-context +termType: concept glossaryText: >- Single or chained peer-to-peer interactions or [transactions](https://essif-lab.github.io/framework/docs/essifLab-glossary#transaction) diff --git a/curated-texts/PESTEL.md b/curated-texts/PESTEL.md index bb8825c..aee807e 100644 --- a/curated-texts/PESTEL.md +++ b/curated-texts/PESTEL.md @@ -1,6 +1,7 @@ --- -term: PESTEL -termType: term +glossaryTerm: PESTEL +term: pestel +termType: concept glossaryText: >- Political, Economic, Sociocultural, Technological, Environmental and Legal - a method of business analysis, see [PESTEL diff --git a/curated-texts/balance-of-power.md b/curated-texts/balance-of-power.md index 273b1dd..91b9668 100644 --- a/curated-texts/balance-of-power.md +++ b/curated-texts/balance-of-power.md @@ -1,6 +1,7 @@ --- -term: Balance Of Power -termType: term +glossaryTerm: Balance Of Power +term: balance-of-power +termType: concept glossaryText: >- A balance of power in a [digital identity ecosystem](https://trustoverip.github.io/hxwg/glossary.html#digital-identity-ecosystem) diff --git a/curated-texts/collective-resiliency.md b/curated-texts/collective-resiliency.md index 4cef4e5..79f3cb1 100644 --- a/curated-texts/collective-resiliency.md +++ b/curated-texts/collective-resiliency.md @@ -1,6 +1,7 @@ --- -term: Collective Resiliency -termType: term +glossaryTerm: Collective Resiliency +term: collective-resiliency +termType: concept glossaryText: >- Collective resiliency is the ability of the [digital identity ecosystem](https://trustoverip.github.io/hxwg/glossary.html#digital-identity-ecosystem) diff --git a/curated-texts/complex-adaptive-system-(CAS).md b/curated-texts/complex-adaptive-system-(CAS).md index 4afbb61..673e0dc 100644 --- a/curated-texts/complex-adaptive-system-(CAS).md +++ b/curated-texts/complex-adaptive-system-(CAS).md @@ -1,6 +1,7 @@ --- -term: Complex Adaptive System (CAS) -termType: term +glossaryTerm: Complex Adaptive System (CAS) +term: complex-adaptive-system +termType: concept glossaryText: >- A group of semi-autonomous agents who interact in interdependent ways to produce system-wide patterns, such that those patterns then influence diff --git a/curated-texts/contingent-harm.md b/curated-texts/contingent-harm.md index 084025f..da5beee 100644 --- a/curated-texts/contingent-harm.md +++ b/curated-texts/contingent-harm.md @@ -1,6 +1,7 @@ --- -term: Contingent Harm -termType: term +glossaryTerm: Contingent Harm +term: contingent-harm +termType: concept glossaryText: >- Contingent harms arise in the [digital identity ecosystem](https://trustoverip.github.io/hxwg/glossary.html#digital-identity-ecosystem) diff --git a/curated-texts/digital-identity-ecosystem-(DIE).md b/curated-texts/digital-identity-ecosystem-(DIE).md index 18cdae1..c1961ce 100644 --- a/curated-texts/digital-identity-ecosystem-(DIE).md +++ b/curated-texts/digital-identity-ecosystem-(DIE).md @@ -1,6 +1,7 @@ --- -term: Digital Identity Ecosystem (DIE) -termType: term +glossaryTerm: Digital Identity Ecosystem (DIE) +term: digital-identity-ecosystem +termType: concept glossaryText: >- A set of at least two (autonomous) [parties](https://essif-lab.github.io/framework/docs/essifLab-glossary#party) diff --git a/curated-texts/digital-identity.md b/curated-texts/digital-identity.md index 13701ea..89c3d33 100644 --- a/curated-texts/digital-identity.md +++ b/curated-texts/digital-identity.md @@ -1,6 +1,7 @@ --- -term: Digital Identity -termType: term +glossaryTerm: Digital Identity +term: digital-identity +termType: concept glossaryText: >- [Digital data](https://essif-lab.github.io/framework/docs/essifLab-glossary#data) that diff --git a/curated-texts/digital-trust-ecosystem-(DTE).md b/curated-texts/digital-trust-ecosystem-(DTE).md index 96c0296..494e58d 100644 --- a/curated-texts/digital-trust-ecosystem-(DTE).md +++ b/curated-texts/digital-trust-ecosystem-(DTE).md @@ -1,6 +1,7 @@ --- -term: Digital Trust Ecosystem (DTE) -termType: term +glossaryTerm: Digital Trust Ecosystem (DTE) +term: digital-trust-ecosystem +termType: concept glossaryText: >- See ToIP core terms [digital trust ecosystem (DTE)](https://trustoverip.github.io/toip/glossary.html#digital-trust-ecosystem) diff --git a/curated-texts/direct-harm.md b/curated-texts/direct-harm.md index 47a56dd..2b863f9 100644 --- a/curated-texts/direct-harm.md +++ b/curated-texts/direct-harm.md @@ -1,6 +1,7 @@ --- -term: Direct Harm -termType: term +glossaryTerm: Direct Harm +term: direct-harm +termType: concept glossaryText: >- Direct harm is the intentional or unintentional harm that is inflicted by one [peer diff --git a/curated-texts/edge-agency.md b/curated-texts/edge-agency.md index 9208bee..76ec017 100644 --- a/curated-texts/edge-agency.md +++ b/curated-texts/edge-agency.md @@ -1,6 +1,7 @@ --- -term: Edge Agency -termType: term +glossaryTerm: Edge Agency +term: edge-agency +termType: concept glossaryText: >- Edge agency is the ability of all [parties](https://essif-lab.github.io/framework/docs/essifLab-glossary#party) diff --git a/curated-texts/external-life-context.md b/curated-texts/external-life-context.md index 2a76508..02d87ec 100644 --- a/curated-texts/external-life-context.md +++ b/curated-texts/external-life-context.md @@ -1,6 +1,7 @@ --- -term: External Life Context -termType: term +glossaryTerm: External Life Context +term: external-life-context +termType: concept glossaryText: >- Other: The world outside the [digital identity ecosystem](https://trustoverip.github.io/hxwg/glossary.html#digital-identity-ecosystem) diff --git a/curated-texts/felt-harm.md b/curated-texts/felt-harm.md index 778f123..3c9dd76 100644 --- a/curated-texts/felt-harm.md +++ b/curated-texts/felt-harm.md @@ -1,6 +1,7 @@ --- -term: Felt Harm -termType: term +glossaryTerm: Felt Harm +term: felt-harm +termType: concept glossaryText: >- Felt harms affect the physical and mental health and wellbeing of the harmed [party]([https://essif-lab.github.io/framework/docs/essifLab-glossary#](https://essif-lab.github.io/framework/docs/essifLab-glossary#party)party) diff --git a/curated-texts/harms-work.md b/curated-texts/harms-work.md index a424ba0..c9b50ff 100644 --- a/curated-texts/harms-work.md +++ b/curated-texts/harms-work.md @@ -1,6 +1,7 @@ --- -term: Harms Work -termType: term +glossaryTerm: Harms Work +term: harms-work +termType: concept glossaryText: >- Efforts to characterize, detect, prevent, intervene in, remediate, and learn from human harms rising from ToIP-related technologies. diff --git a/curated-texts/indirect-harm.md b/curated-texts/indirect-harm.md index 8d09271..97f8f21 100644 --- a/curated-texts/indirect-harm.md +++ b/curated-texts/indirect-harm.md @@ -1,6 +1,7 @@ --- -term: Indirect Harm -termType: term +glossaryTerm: Indirect Harm +term: indirect-harm +termType: concept glossaryText: >- Indirect harm is the intentional or unintentional harm that is experienced by one or more members of the [digital identity diff --git a/curated-texts/internal-life-context.md b/curated-texts/internal-life-context.md index 3e8d38c..9bcc70f 100644 --- a/curated-texts/internal-life-context.md +++ b/curated-texts/internal-life-context.md @@ -1,6 +1,7 @@ --- -term: Internal Life Context -termType: term +glossaryTerm: Internal Life Context +term: internal-life-context +termType: concept glossaryText: >- Self: The world inside human beings as individuals and as social groups. The physiological, psychological and spiritual world, of thoughts, stories, diff --git a/curated-texts/man-made-thing.md b/curated-texts/man-made-thing.md index 9ded8fa..515e337 100644 --- a/curated-texts/man-made-thing.md +++ b/curated-texts/man-made-thing.md @@ -1,6 +1,7 @@ --- -term: Man Made Thing -termType: term +glossaryTerm: Man Made Thing +term: man-made-thing +termType: concept glossaryText: >- From [Sovrin Foundation Glossary V3](https://docs.google.com/document/d/1gfIz5TT0cNp2kxGMLFXr19x1uoZsruUe_0glHst2fZ8/edit). diff --git a/curated-texts/natural-thing.md b/curated-texts/natural-thing.md index 1c105e7..60bb6be 100644 --- a/curated-texts/natural-thing.md +++ b/curated-texts/natural-thing.md @@ -1,6 +1,7 @@ --- -term: Natural Thing -termType: term +glossaryTerm: Natural Thing +term: natural-thing +termType: concept glossaryText: >- From [Sovrin Foundation Glossary V3](https://docs.google.com/document/d/1gfIz5TT0cNp2kxGMLFXr19x1uoZsruUe_0glHst2fZ8/edit). diff --git a/curated-texts/peer-to-peer-(P2P).md b/curated-texts/peer-to-peer-(P2P).md index d8580fd..a89d2a0 100644 --- a/curated-texts/peer-to-peer-(P2P).md +++ b/curated-texts/peer-to-peer-(P2P).md @@ -1,6 +1,7 @@ --- -term: Peer To Peer (P2P) -termType: term +glossaryTerm: Peer To Peer (P2P) +term: peer-to-peer +termType: concept glossaryText: >- Peer to Peer originally used to describe computer networks where each participant acts as both a client and server. Can also refer to any 1:1 diff --git a/curated-texts/self-sovereign-identity-(SSI).md b/curated-texts/self-sovereign-identity-(SSI).md index 41c48a1..c8c74a0 100644 --- a/curated-texts/self-sovereign-identity-(SSI).md +++ b/curated-texts/self-sovereign-identity-(SSI).md @@ -1,6 +1,7 @@ --- -term: Self Sovereign Identity (SSI) -termType: term +glossaryTerm: Self Sovereign Identity (SSI) +term: self-sovereign-identity +termType: concept glossaryText: >- See Trust over IP [self-sovereign identity](https://trustoverip.github.io/toip/glossary.html#self-sovereign-identity) diff --git a/curated-texts/socio-technical-system-(STS).md b/curated-texts/socio-technical-system-(STS).md index 7eb0734..3a36385 100644 --- a/curated-texts/socio-technical-system-(STS).md +++ b/curated-texts/socio-technical-system-(STS).md @@ -1,6 +1,7 @@ --- -term: Socio Technical System (STS) -termType: term +glossaryTerm: Socio Technical System (STS) +term: socio-technical-system +termType: concept glossaryText: >- An approach to complex organizational work design that recognizes the interaction between people and technology in workplaces. The term also refers diff --git a/curated-texts/thing.md b/curated-texts/thing.md index 3e8a2fb..d825b10 100644 --- a/curated-texts/thing.md +++ b/curated-texts/thing.md @@ -1,6 +1,7 @@ --- -term: Thing -termType: term +glossaryTerm: Thing +term: thing +termType: concept glossaryText: >- From [Sovrin Foundation Glossary V3](https://docs.google.com/document/d/1gfIz5TT0cNp2kxGMLFXr19x1uoZsruUe_0glHst2fZ8/edit). diff --git a/curated-texts/vulnerability-recognition.md b/curated-texts/vulnerability-recognition.md index 61e9d14..92157b1 100644 --- a/curated-texts/vulnerability-recognition.md +++ b/curated-texts/vulnerability-recognition.md @@ -1,6 +1,7 @@ --- -term: Vulnerability Recognition -termType: term +glossaryTerm: Vulnerability Recognition +term: vulnerability-recognition +termType: concept glossaryText: >- Vulnerability recognition is one of four harms mitigation strategies in the human harms framework. It is diff --git a/src/CuratedText.ts b/src/CuratedText.ts index 5ddbef3..57dc67b 100644 --- a/src/CuratedText.ts +++ b/src/CuratedText.ts @@ -4,6 +4,7 @@ interface CuratedTextOptions { term: string; termType: string; isa?: string; + glossaryTerm?: string; glossaryText?: string; synonymOf?: string; groupTags?: string[]; diff --git a/src/Run.ts b/src/Run.ts index 19dd789..9129e46 100755 --- a/src/Run.ts +++ b/src/Run.ts @@ -10,6 +10,7 @@ import { CuratedTextParser } from "./CuratedText.js"; import { fileURLToPath } from "url"; import { filenameToTitle, + filenameToTerm, getFileContents, removeNullValues, saveToFile, @@ -22,7 +23,7 @@ import figlet from "figlet"; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); const packageJson = JSON.parse( - fs.readFileSync(path.resolve(__dirname, "package.json"), "utf8") + fs.readFileSync(path.resolve(__dirname, "../package.json"), "utf8") ); const version = packageJson.version; const program = new Command(); @@ -79,6 +80,9 @@ const main = async (): Promise => { console.log( chalk.red(figlet.textSync("TEv2 Ingress", { horizontalLayout: "full" })) ); + console.log( + chalk.yellow(figlet.textSync(version, { horizontalLayout: "full" })) + ); if (options.config) { try { @@ -129,10 +133,10 @@ const main = async (): Promise => { } files.forEach((file) => { const newFile = file.replace("wiki", "curated-texts"); - console.log("-------------------------------------"); const curatedText = new CuratedTextParser(getFileContents(file), { - term: filenameToTitle(file), - termType: "term", + glossaryTerm: filenameToTitle(file), + term: filenameToTerm(file), + termType: "concept", }); curatedText.toYAML(); console.log(file, "->", newFile); diff --git a/src/utils.ts b/src/utils.ts index af55cff..e5f1e8e 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -60,6 +60,7 @@ export const extractTokens = (text: string): MarkdownData => { export function filenameToTitle(filename: string): string { // Remove the directory path and file extension + console.log(filename) const baseFilename = filename.replace(/^.*\//, '').replace(/\.md$/, ''); // Split the filename into words using '-' as a delimiter @@ -73,5 +74,11 @@ export function filenameToTitle(filename: string): string { return title; } +export function filenameToTerm(filename: string): string { + return filename + .replace(/\(.*?\)/g, "").replace(/^.*\//, '') + .replace(/\.md$/, '').replace(/-$/, "") + .toLowerCase(); +} export const getFileContents = (filePath: string): string => fs.readFileSync(filePath, 'utf-8');