Skip to content

Conversation

@bact
Copy link
Contributor

@bact bact commented Sep 8, 2024

What this PR do

Implement #110 (Feedback from OMG - Item 5)

  • Add rdfs:label, use info from element's name
  • Add skos:definition, use info from summary
  • Add skos:note, use info from description

Follow examples from https://www.omg.org/spec/Commons/1.1/PDF
(From examples, skos:scopeNote could be used for conformance information - not yet implemented here)

Output, with few Markdown markups removed: spdx-model.ttl.txt

Notes

Few Markdown markups are removed or transformed for readability.

Links are transformed

  • [The EPSS Model](https://www.first.org/epss/model) -> The EPSS Model <https://www.first.org/epss/model>
  • [Hash](../../Core/Classes/Hash.md) -> Hash
  • [parameter](parameter.md) -> parameter

Inline code markups are removed

  • Markdown:
    `relationshipType`="ancestorOf",
    
    `from` (is) (a) `RELATIONSHIP` `to`
    
  • will be:
    relationshipType="ancestorOf",
    
    from (is) (a) RELATIONSHIP to
    

Code block markups are removed

  • Markdown:
    `` `json
    {
      "type": "ai_EnergyConsumption"
    }
    `` `
    
  • will be:
    {
      "type": "ai_EnergyConsumption"
    }
    

bact added 2 commits September 8, 2024 04:33
Signed-off-by: Arthit Suriyawongkul <[email protected]>
Signed-off-by: Arthit Suriyawongkul <[email protected]>
@zvr
Copy link
Member

zvr commented Sep 8, 2024

Unfortunately it's not that easy, since the "description" sections are in Markdown format, which means that they have be translated into a text only representation.

@bact
Copy link
Contributor Author

bact commented Sep 8, 2024

Thank you. Just to clarify, since Markdown is also "text only" -- Do you mean specifically of removing the markups?
(something similar to https://gist.github.com/lorey/eb15a7f3338f959a78cc3661fbc255fe ?)

bact added 2 commits September 9, 2024 00:05
Signed-off-by: Arthit Suriyawongkul <[email protected]>
@bact
Copy link
Contributor Author

bact commented Sep 8, 2024

Few Markdown markups that may interfere human reading are now removed. See Notes in the PR description for details.

This is also applied to rdfs:comment which contains Markdown markups from "Summary"/"Entries" sections.

New output: spdx-model.ttl.txt

Signed-off-by: Arthit Suriyawongkul <[email protected]>
Signed-off-by: Arthit Suriyawongkul <[email protected]>
Signed-off-by: Arthit Suriyawongkul <[email protected]>
Signed-off-by: Arthit Suriyawongkul <[email protected]>
Signed-off-by: Arthit Suriyawongkul <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants