diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d890d35..bb22fea 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,31 +4,54 @@ Crosswalks are developed in [the main CodeMeta repository](https://github.com/codemeta/codemeta) and are -periodically synchronised into the website. +periodically synchronised into the website. A markdown file is +automatically generated on the website for each Crosswalk when the `Makefile` +is run during deployment. -A markdown file must be created on this website before that synchronised -Crosswalk data is displayed. Refer to existing files for examples of the -format. The file must contain the following frontmatter fields: +[!WARNING] Do *not* manually create these markdown files. They will be +overwritten or duplicated. -- `title` in the format `Crosswalk for ` where `` is the name -of the system the Crosswalk maps to. It can include spaces and symbols. -- `image` in the format `/img/` where `` is the name of -the logo filename, including extension. This file must be added to the -`/static/img/` directory. Do *not* use the source path. +By default, the generated markdown files are very basic and variations may +be desired. To allow for custom information, overrides can be defined in +`/data/crosswalk_pages.json`. Many Crosswalks have already been enhanced. -The content after the frontmatter should include a short description of the -target system. A link to the system or its metadata documentation should be -included in this description. - -The following code required on the last line of the file, where -`` is the filename of -[the Crosswalk source file in the main repository](https://github.com/codemeta/codemeta.github.io/tree/master/content/crosswalk), -including spaces and symbols, but _without_ the extension: +A complete set of the override fields would look like this: ``` -{{% crosswalk name="" %}} + { + "stem":"My Crosswalk", + "name":"My Crosswalk metadata", + "short":"mycrosswalk", + "desc":"My Crosswalk metadata is very cool. [This field can have markdown](https://codemeta.github.io).", + "foot":"See crosswalk for [My Other Crosswalk](https://codemeta.github.io).", + "img":"codemeta.png", + "date":"2026-07-04" + }, ``` +[!NOTE] Remember to escape `"` if used. + + - `stem` _(required)_ must be *exactly* what the vocabulary's header is +[in its crosswalk .csv](https://github.com/codemeta/codemeta/blob/master/crosswalks). +It is the only individually required field, but there is no point to adding it if +no other fields are populated. + - `name` is the full name of the crosswalk, if it is longer than in the header, + - `short` is a short name for the crosswalk for a cleaner or shorter url, + - `desc` is a more verbose description than the default provided by the script, + - `foot` is an extension of the description that appears after the crosswalk table, + - `img` is the filename and extension of the image. If it is not already in *this* +repository, you will need to include it in your Pull Request that adds it to this JSON. +Image files go in `static/img`, + - `date` is the date that the vocabulary's crosswalk was added to CodeMeta. + +Page generation can be triggered by running `python3 scripts/crosswalk_to_pages`. + +If you add or change a `short` override, your local copy may retain the previously named +file in the directory. Rebuilding with `--cleanDestinationDir` may fix this. + +Any issues with the automatic generation of the markdown files should be raised against this +repository. + Any other issues, requests, or contributions for the content of Crosswalks should go to the main repository. diff --git a/Makefile b/Makefile index d24b57e..010fc3f 100644 --- a/Makefile +++ b/Makefile @@ -5,8 +5,10 @@ data/crosswalk.csv: wget https://github.com/codemeta/codemeta/raw/master/crosswalk.csv -O data/crosswalk.csv # Convert crosswalk.csv to crosswalk.json so Hugo can parse it +# Additionally generate the individual crosswalk pages that will desplay the json. data/crosswalk.json: scripts/crosswalk_to_json.py data/crosswalk.csv python3 scripts/crosswalk_to_json.py + python3 scripts/crosswalk_to_pages.py # properties_description.csv file was only split off from crosswalks.csv starting with # v2.1, so we can't download v2.0 itself. There were no major changes between the two, diff --git a/content/crosswalk/R.md b/content/crosswalk/R.md deleted file mode 100644 index 4403d47..0000000 --- a/content/crosswalk/R.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: "Crosswalk for R Packages" -image: "/img/R.png" -date: "2017-06-01" ---- - -The following table displays the crosswalk mapping of terms from the R package DESCRIPTION file to CodeMeta properties. - -{{% crosswalk name="R Package Description" %}} diff --git a/content/crosswalk/_index.md b/content/crosswalk/_index.md index 059621e..59ac5b6 100644 --- a/content/crosswalk/_index.md +++ b/content/crosswalk/_index.md @@ -3,33 +3,46 @@ title: "Crosswalks" layout: list --- +## What are they? + CodeMeta Crosswalks provide an explicit map between the fields of existing -metadata standards, as used by a broad range of software repositories, -registries, and archives. When mapped by a Crosswalk, CodeMeta's terms act as -a common set of properties, providing a pathway for metadata to be translated -between standards. +metadata standards. These other standards are used by software repositories, +registries, archives, and more. + +Once mapped by a Crosswalk, CodeMeta's terms act as a common set of properties, +providing a way for metadata to be translated between standards. The +[user guide](/user-guide) explains some key concepts to help with understanding +the CodeMeta metadata. -Crosswalks are not required to have a one-to-one mapping for every field. -Because Crosswalks only map fields common between a standard and CodeMeta, the -subset of common fields may differ a lot between Crosswalks. The diagram below -demonstrates how CodeMeta maps between standards when there are differences. +Crosswalks do not need a one-to-one mapping for every field. Because Crosswalks +only map fields common between a standard and CodeMeta, the subset of common +fields may differ a lot between Crosswalks. The diagram below shows how CodeMeta +maps between standards when there are differences. ![Diagram of CodeMeta mapping between two metadata standards. It shows a common term, terms unique to each standard, and terms common to only CodeMeta and each standard.](/img/crosswalkdiagram.svg) -### Contribute! +## How to use Crosswalks + +By comparing Vocabulary A to CodeMeta and comparing CodeMeta to Vocabulary +B, you are able to see if there is a term equivalent, and what it is. + +If manual conversion is not what you want, there are also [tools](/tools) to +convert between some formats, or to create a `codemeta.json` file. + +### How to contribute? + +To contribute a new Crosswalk mapping, refer to the +[CodeMeta repository contribution guide](https://github.com/codemeta/codemeta?tab=contributing-ov-file#contributing-a-new-mapping). +Suggest changes in the [CodeMeta issues tracker](https://github.com/codemeta/codemeta/issues). -CodeMeta encourages submissions of additional vocabularies. Refer to the -[CodeMeta repository contribution guide](https://github.com/codemeta/codemeta?tab=contributing-ov-file#contributing-a-new-mapping) -to submit a new Crosswalks. -Crosswalks are not automatically listed on this website. -[The guide for contributing to this website](https://github.com/codemeta/codemeta.github.io?tab=contributing-ov-file#adding-new-crosswalks) -explains how to set that up. +Improve other information about a Crosswalk in the directory below by +[reporting an issue](https://github.com/codemeta/codemeta.github.io/issues) +or [by submitting a change](https://github.com/codemeta/codemeta.github.io?tab=contributing-ov-file#adding-new-crosswalks). -Please feel welcome to propose corrections or extensions in the [CodeMeta issues tracker](https://github.com/codemeta/codemeta/issues). ## Crosswalk directory -This directory contains many of the available Crosswalks. The full Crosswalk table is +the full Crosswalk table is [available as a `.csv`](https://github.com/codemeta/codemeta/tree/master/crosswalk.csv) file in the CodeMeta repository. diff --git a/content/crosswalk/cargo.md b/content/crosswalk/cargo.md deleted file mode 100644 index f940039..0000000 --- a/content/crosswalk/cargo.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: "Crosswalk for Rust Package Manager" -image: "/img/cargo.png" -date: "2020-03-05" ---- - -[Cargo](https://doc.rust-lang.org/cargo/) is the Rust package manager. - -The `Cargo.toml` file for each package is called its manifest. Cargo uses the metadata in the manifest to download Rust package’s dependencies, compile packages, make distributable packages, and upload them to crates.io, the Rust community’s package registry. - -The manifest format is described in [the Cargo Book](https://doc.rust-lang.org/cargo/reference/manifest.html). - -{{% crosswalk name="Rust Package Manager" %}} diff --git a/content/crosswalk/datacite.md b/content/crosswalk/datacite.md deleted file mode 100644 index 571c19a..0000000 --- a/content/crosswalk/datacite.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: "Crosswalk for DataCite metadata" -image: "/img/datacite.png" -date: "2017-06-01" ---- - -[DataCite](https://datacite.org/) metadata is a standardized set of schema used when registering a DOI to ensure research outputs are findable, citable, and connected within the global scholarly ecosystem. - -{{% crosswalk name="DataCite" %}} diff --git a/content/crosswalk/dcat-2.md b/content/crosswalk/dcat-2.md deleted file mode 100644 index b6e19a3..0000000 --- a/content/crosswalk/dcat-2.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "Crosswalk for DCAT 2 vocabulary" -image: "/img/w3c.png" -date: "2019-04-23" ---- - -Data Catalog Vocabulary (DCAT) is an RDF vocabulary designed to facilitate interoperability between data catalogs published on the Web. - -[DCAT 2](https://www.w3.org/TR/vocab-dcat-2/) is superseded by DCAT 3, -but DCAT 3 does not make DCAT 2 obsolete. -DCAT 3 terms preserve backward compatibility with DCAT 2. - -{{% crosswalk name="DCAT-2" %}} - -See crosswalk for [DCAT 3](dcat-3). diff --git a/content/crosswalk/dcat-3.md b/content/crosswalk/dcat-3.md deleted file mode 100644 index 9ad33c9..0000000 --- a/content/crosswalk/dcat-3.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "Crosswalk for DCAT 3 vocabulary" -image: "/img/w3c.png" -date: "2025-04-24" ---- - -Data Catalog Vocabulary (DCAT) is an RDF vocabulary designed to facilitate interoperability between data catalogs published on the Web. - -[DCAT 3](https://www.w3.org/TR/vocab-dcat-3/) is a W3C Recommendation. -DCAT 3 supersedes DCAT 2, but DCAT 3 does not make DCAT 2 obsolete. -DCAT 3 terms preserve backward compatibility with DCAT 2. - -{{% crosswalk name="DCAT-3" %}} - -See crosswalk for [DCAT 2](dcat-2). diff --git a/content/crosswalk/debian.md b/content/crosswalk/debian.md deleted file mode 100644 index c8579e4..0000000 --- a/content/crosswalk/debian.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: "Crosswalk for Debian packages" -image: "/img/debian.png" -date: "2017-06-01" ---- - -The [Debian package system](https://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_archive_meta_data) defines archive metadata that is used by the popular [`apt`](https://wiki.debian.org/Apt) package management system on Debian and Ubuntu Linux distributions. - -{{% crosswalk name="Debian Package" %}} diff --git a/content/crosswalk/doap.md b/content/crosswalk/doap.md deleted file mode 100644 index 89abd4e..0000000 --- a/content/crosswalk/doap.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: "Crosswalk for DOAP Ontology" -image: "/img/codemeta.png" -date: "2017-06-01" ---- - -[DOAP](https://github.com/ewilderj/doap) (Description of a Project) is an XML/RDF vocabulary to describe software projects, and in particular open source projects. - -{{% crosswalk name="DOAP" %}} diff --git a/content/crosswalk/dublincore.md b/content/crosswalk/dublincore.md deleted file mode 100644 index fa9b069..0000000 --- a/content/crosswalk/dublincore.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: "Crosswalk for Dublin Core metadata" -image: "/img/dcmi.png" ---- - -[Dublin Core](https://www.dublincore.org/) vocabulary (or the Dublin Core Metadata Terms - DCMT) is a widely used, general-purpose metadata vocabulary for describing any type of resource. - -{{% crosswalk name="Dublin Core" %}} diff --git a/content/crosswalk/figshare.md b/content/crosswalk/figshare.md deleted file mode 100644 index fcde728..0000000 --- a/content/crosswalk/figshare.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: "Crosswalk for figshare metadata" -image: "/img/figshare.jpg" ---- - -[figshare](https://figshare.com) is a general purpose scientific data repository that provides [DataCite](https://datacite.org/) DOIs. - -{{% crosswalk name="Figshare" %}} diff --git a/content/crosswalk/github.md b/content/crosswalk/github.md deleted file mode 100644 index 0afb508..0000000 --- a/content/crosswalk/github.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: "Crosswalk for GitHub API" -image: "/img/github.png" -date: "2017-06-01" ---- - -[GitHub](https://github.com/) is a widely-used proprietary developer platform that allows users to store, manage, and share code using Git for distributed version control. - -[GitHub API](https://docs.github.com/en/rest) provides a programmatic way to retrieve repository metadata. - -{{% crosswalk name="GitHub" %}} diff --git a/content/crosswalk/java.md b/content/crosswalk/java.md deleted file mode 100644 index bc6afa3..0000000 --- a/content/crosswalk/java.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: "Crosswalk for Java's Maven metadata" -image: "/img/java.png" -date: "2017-06-01" ---- - -[Maven](https://maven.apache.org/what-is-maven.html) is a popular packaging/build system for Java-based projects. - -{{% crosswalk name="Java (Maven)" %}} diff --git a/content/crosswalk/node.md b/content/crosswalk/node.md deleted file mode 100644 index 3799985..0000000 --- a/content/crosswalk/node.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: "Crosswalk for Node.js package.json" -image: "/img/npm.png" -date: "2017-06-01" ---- - -The `npm` package manager for JavaScript [defines](https://docs.npmjs.com/files/package.json) software metadata using a `package.json` file. - -`npm` is the default package manager for the JavaScript runtime environment Node.js. - -{{% crosswalk name="NodeJS" %}} diff --git a/content/crosswalk/publiccode.md b/content/crosswalk/publiccode.md deleted file mode 100644 index 85b8d0c..0000000 --- a/content/crosswalk/publiccode.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: "Crosswalk for publiccode.yml" -image: "/img/publiccode.png" -date: "2025-08-10" ---- - -The [publiccode.yml](https://github.com/publiccodeyml/publiccode.yml) spec defines metadata for public sector OSS software projects, used by national and international catalogs to index, present, and facilitate the reuse of open source software developed by or for public administrations. - -{{% crosswalk name="publiccode" %}} diff --git a/content/crosswalk/python.md b/content/crosswalk/python.md deleted file mode 100644 index f91c93d..0000000 --- a/content/crosswalk/python.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: "Crosswalk for Python distutils" -image: "/img/python.png" -date: "2017-06-01" ---- - -[Python `distutils`](https://docs.python.org/3.6/distutils/) allows users to associate a range of metadata information when packaging and distributing Python-based applications or source code. - -{{% crosswalk name="Python Distutils (PyPI)" %}} diff --git a/content/crosswalk/ruby.md b/content/crosswalk/ruby.md deleted file mode 100644 index 62f8c36..0000000 --- a/content/crosswalk/ruby.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: "Crosswalk for Ruby gems" -image: "/img/ruby.png" -date: "2017-06-01" ---- - -Ruby gems [specify metadata](http://guides.rubygems.org/specification-reference/) in a `.gemspec` file. - -{{% crosswalk name="Ruby Gem" %}} diff --git a/content/crosswalk/spdx-2-3.md b/content/crosswalk/spdx-2-3.md deleted file mode 100644 index a78d2d5..0000000 --- a/content/crosswalk/spdx-2-3.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: "Crosswalk for SPDX 2.3 SBOM" -image: "/img/spdx.png" -date: "2024-01-15" ---- - -The [Software Package Data Exchange® (SPDX®)](https://spdx.dev/) specification defines a standard data format for communicating the component and metadata information associated with software packages, widely known as "software bill of materials" or "SBOM". An SPDX document can be associated with a set of software packages, files or snippets. - -SPDX 2.3 supports multiple serialization formats and often uses the following file extensions: - -| Serialization format | File extension(s) | -|----------------------|--------------------------------| -| tag:value | `*.spdx` | -| JSON | `*.spdx.json` | -| RDF (RDF/XML) | `*.spdx.rdf`, `*.spdx.rdf.xml` | -| XLS spreadsheet | `*.spdx.xls`, `*.spdx.xlsx` | -| XML | `*.spdx.xml` | -| YAML 1.2 | `*.spdx.yaml`, `*.spdx.yml` | - -The crosswalk for the SPDX 2.3 SBOM is as follows: - -{{% crosswalk name="SPDX 2.3" %}} diff --git a/content/crosswalk/swo.md b/content/crosswalk/swo.md deleted file mode 100644 index b358a23..0000000 --- a/content/crosswalk/swo.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: "Crosswalk" -image: "/img/swo.png" -date: "2017-01-05" ---- - -The [Software Ontology (SWO)](http://theswo.sourceforge.net/) is a resource for describing software tools, their types, tasks, versions, provenance and data associated. -SWO is part of the JISC funded [SWORD project](https://www.software.ac.uk/blog/sword-software-ontology-research-description) (Software Ontology for Resource Description), an inter-disciplinary effort to capture software descriptions used in the preservation of data. -The work is a collaboration between the European Bioinformatics Institute and the University of Manchester. - -{{% crosswalk name="Software Ontology" %}} diff --git a/content/crosswalk/trove.md b/content/crosswalk/trove.md deleted file mode 100644 index 0c0f75d..0000000 --- a/content/crosswalk/trove.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: "Crosswalk for Trove Software Map" -image: "/img/sourceforge.png" ---- - -[Trove](https://web.archive.org/web/20240420104333/https://sourceforge.net/p/easyhtml5/tracinst/Software%20Map%20and%20Trove/#what-is-trove) is the system used by [SourceForge.net](https://sourceforge.net/) software development hosting platform to classify software projects. - -{{% crosswalk name="Trove Software Map" %}} diff --git a/content/crosswalk/wikidata.md b/content/crosswalk/wikidata.md deleted file mode 100644 index d019821..0000000 --- a/content/crosswalk/wikidata.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "Crosswalk for WikiData Properties" -image: "/img/wikidata.png" -date: "2017-06-04" ---- - -[Wikidata](https://www.wikidata.org/wiki/Wikidata:Introduction) provides internationalized set of properties for machine-readable linked data. - -Surprisingly Wikidata does not have a native JSON-LD format, -[distributing in plain JSON and RDF dumps](https://www.wikidata.org/wiki/Wikidata:Database_download). - -{{% crosswalk name="Wikidata" %}} diff --git a/content/crosswalk/zenodo.md b/content/crosswalk/zenodo.md deleted file mode 100644 index fc43540..0000000 --- a/content/crosswalk/zenodo.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: "Crosswalk for Zenodo metadata" -image: "/img/zenodo.jpg" ---- - -[Zenodo.org](https://zenodo.org) is a data archive based at CERN which is popularly used to archive and provide DOIs to academic software from GitHub, as described in the official GitHub guide to [Making your code citable](https://guides.github.com/activities/citable-code/). - -{{% crosswalk name="Zenodo" %}} diff --git a/data/crosswalk_pages.json b/data/crosswalk_pages.json new file mode 100644 index 0000000..6c8205e --- /dev/null +++ b/data/crosswalk_pages.json @@ -0,0 +1,148 @@ +[ + { + "stem":"Rust Package Manager", + "short":"Cargo", + "desc":"[Cargo](https://doc.rust-lang.org/cargo/) is the Rust package manager.\n\nThe `Cargo.toml` file for each package is called its manifest. Cargo uses the metadata in the manifest to download Rust package’s dependencies, compile packages, make distributable packages, and upload them to crates.io, the Rust community’s package registry.\n\nThe manifest format is described in [the Cargo Book](https://doc.rust-lang.org/cargo/reference/manifest.html).", + "img":"cargo.png", + "date":"2020-03-05" + }, + { + "stem":"DataCite", + "name":"DataCite metadata", + "desc":"[DataCite](https://datacite.org/) metadata is a standardized set of schema used when registering a DOI to ensure research outputs are findable, citable, and connected within the global scholarly ecosystem.", + "img":"datacite.png", + "date":"2017-06-01" + }, + { + "stem":"DCAT-2", + "name":"DCAT-2 vocabulary", + "desc":"Data Catalog Vocabulary (DCAT) is an RDF vocabulary designed to facilitate interoperability between data catalogs lispubhed on the Web.\n\n[DCAT 2](https://www.w3.org/TR/vocab-dcat-2/) is superseded by DCAT 3,\nbut DCAT 3 does not make DCAT 2 obsolete.\nDCAT 3 terms preserve backward compatibility with DCAT 2.", + "foot":"See crosswalk for [DCAT 3](dcat-3).", + "img":"w3c.png", + "date":"2019-04-23" + }, + { + "stem":"DCAT-3", + "name":"DCAT-3 vocabulary", + "desc":"Data Catalog Vocabulary (DCAT) is an RDF vocabulary designed to facilitate interoperability between data catalogs lispubhed on the Web.\n\n[DCAT 3](https://www.w3.org/TR/vocab-dcat-3/) is a W3C Recommendation.\nDCAT 3 supersedes DCAT 2, but DCAT 3 does not make DCAT 2 obsolete.\nDCAT 3 terms preserve backward compatibility with DCAT 2.", + "foot":"See crosswalk for [DCAT 2](dcat-32).", + "img":"w3c.png", + "date":"2025-04-24" + }, + { + "stem":"Debian Package", + "name":"Debian Packages", + "short":"Debian", + "desc":"The [Debian package system](https://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_archive_meta_data) defines archive metadata that is used by the popular [`apt`](https://wiki.debian.org/Apt) package management system on Debian and Ubuntu Linux distributions.", + "img":"debian.png", + "date":"2017-06-01" + }, + { + "stem":"DOAP", + "name":"DOAP Ontology", + "desc":"DOAP (Description of a Project) is an XML/RDF vocabulary to describe software projects, and in particular open source projects.", + "date":"2017-06-01" + }, + { + "stem":"Dublin Core", + "name":"Dublin Core metadata", + "short":"dublincore", + "desc":"[Dublin Core](https://www.dublincore.org/) vocabulary (or the Dublin Core Metadata Terms - DCMT) is a widely used, general-purpose metadata vocabulary for describing any type of resource.", + "img":"dcmi.png" + }, + { + "stem":"Figshare", + "name":"Figshare metadata", + "desc":"[figshare](https://figshare.com) is a general purpose scientific data repository that provides [DataCite](https://datacite.org/) DOIs.", + "img":"figshare.jpg" + }, + { + "stem":"GitHub", + "name":"GitHub API", + "desc":"[GitHub](https://github.com/) is a widely-used proprietary developer platform that allows users to store, manage, and share code using Git for distributed version control.\n\n[GitHub API](https://docs.github.com/en/rest) provides a programmatic way to retrieve repository metadata.", + "img":"github.png", + "date":"2017-06-01" + }, + { + "stem":"Java (Maven)", + "name":"Java's Maven metadata", + "short":"java", + "desc":"[Maven](https://maven.apache.org/what-is-maven.html) is a popular packaging/build system for Java-based projects.", + "img":"java.png", + "date":"2017-06-01" + }, + { + "stem":"NodeJS", + "name":"Node.js package.json", + "short":"node", + "desc":"The `npm` package manager for JavaScript [defines](https://docs.npmjs.com/files/package.json) software metadata using a `package.json` file.\n\n`npm` is the default package manager for the JavaScript runtime environment Node.js.", + "img":"npm.png", + "date":"2017-06-01" + }, + { + "stem":"publiccode", + "name":"publiccode.yml", + "desc":"The [publiccode.yml](https://github.com/publiccodeyml/publiccode.yml) spec defines metadata for public sector OSS software projects, used by national and international catalogs to index, present, and facilitate the reuse of open source software developed by or for public administrations.", + "img":"publiccode.png", + "date":"2025-08-10" + }, + { + "stem":"Python Distutils (PyPI)", + "name":"Python Distutils", + "short":"python", + "desc":"[Python `distutils`](https://docs.python.org/3.6/distutils/) allows users to associate a range of metadata information when packaging and distributing Python-based applications or source code.", + "img":"python.png", + "date":"2017-06-01" + }, + { + "stem":"R Package Description", + "name":"R Packages", + "short":"R", + "desc":"The following table displays the crosswalk mapping of terms from the R package DESCRIPTION file to CodeMeta properties.", + "img":"R.png", + "date":"2017-06-01" + }, + { + "stem":"Ruby Gem", + "name":"Ruby Gems", + "short":"ruby", + "desc":"Ruby gems [specify metadata](http://guides.rubygems.org/specification-reference/) in a `.gemspec` file.", + "img":"ruby.png", + "date":"2017-06-01" + }, + { + "stem":"SPDX 2.3", + "name":"SPDX 2.3 SBOM", + "desc":"The [Software Package Data Exchange® (SPDX®)](https://spdx.dev/) specification defines a standard data format for communicating the component and metadata information associated with software packages, widely known as \"software bill of materials\" or \"SBOM\". An SPDX document can be associated with a set of software packages, files or snippets.\n\nSPDX 2.3 supports multiple serialization formats and often uses the following file extensions:\n\n| Serialization format | File extension(s) |\n|----------------------|--------------------------------|\n| tag:value | `*.spdx` |\n| JSON | `*.spdx.json` |\n| RDF (RDF/XML) | `*.spdx.rdf`, `*.spdx.rdf.xml` |\n| XLS spreadsheet | `*.spdx.xls`, `*.spdx.xlsx` |\n| XML | `*.spdx.xml` |\n| YAML 1.2 | `*.spdx.yaml`, `*.spdx.yml` |\n\nThe crosswalk for the SPDX 2.3 SBOM is as follows:", + "img":"spdx.png", + "date":"2024-01-15" + }, + { + "stem":"Software Ontology", + "name":"", + "short":"swo", + "desc":"The [Software Ontology (SWO)](http://theswo.sourceforge.net/) is a resource for describing software tools, their types, tasks, versions, provenance and data associated.\n\nSWO is part of the JISC funded [SWORD project](https://www.software.ac.uk/blog/sword-software-ontology-research-description) (Software Ontology for Resource Description), an inter-disciplinary effort to capture software descriptions used in the preservation of data.\n\nThe work is a collaboration between the European Bioinformatics Institute and the University of Manchester.", + "img":"swo.png", + "date":"2017-01-05" + }, + { + "stem":"Trove Software Map", + "short":"trove", + "desc":"[Trove](https://web.archive.org/web/20240420104333/https://sourceforge.net/p/easyhtml5/tracinst/Software%20Map%20and%20Trove/#what-is-trove) is the system used by [SourceForge.net](https://sourceforge.net/) software development hosting platform to classify software projects.", + "img":"sourceforge.png" + }, + { + "stem":"Wikidata", + "name":"WikiData Properties", + "short":"wikidata", + "desc":"[Wikidata](https://www.wikidata.org/wiki/Wikidata:Introduction) provides internationalized set of properties for machine-readable linked data.\n\nSurprisingly Wikidata does not have a native JSON-LD format,\n[distributing in plain JSON and RDF dumps](https://www.wikidata.org/wiki/Wikidata:Database_download).", + "img":"wikidata.png", + "date":"2017-06-04" + }, + { + "stem":"Zenodo metadata", + "short":"zenodo", + "desc":"[Zenodo.org](https://zenodo.org) is a data archive based at CERN which is popularly used to archive and provide DOIs to academic software from GitHub, as described in the official GitHub guide to [Making your code citable](https://guides.github.com/activities/citable-code/).", + "img":"zenodo.png" + } +] diff --git a/layouts/shortcodes/crosswalk.md b/layouts/shortcodes/crosswalk.md index 90526eb..125ec32 100644 --- a/layouts/shortcodes/crosswalk.md +++ b/layouts/shortcodes/crosswalk.md @@ -26,3 +26,8 @@ Property {{ end }} + +New to CodeMeta? The [User Guide](/user-guide) describes how these terms are used in a +`codemeta.json` file. There are also [various tools](/tools) such as +[the generator](/create) that can help! +{.tip} diff --git a/layouts/shortcodes/crosswalks_desc.md b/layouts/shortcodes/crosswalks_desc.md new file mode 100644 index 0000000..f77880e --- /dev/null +++ b/layouts/shortcodes/crosswalks_desc.md @@ -0,0 +1,9 @@ +{{ $crosswalkName := .Params.name }} +{{ $result := where .Site.Data.crosswalk_pages "stem" $crosswalkName }} +{{ if gt (len $result) 0 -}} + {{ range $result }} + {{ .desc }} + {{ end }} +{{ else }} +Properties of the {{ $crosswalkName }} vocabulary. +{{ end }} diff --git a/layouts/shortcodes/crosswalks_footnote.md b/layouts/shortcodes/crosswalks_footnote.md new file mode 100644 index 0000000..c310380 --- /dev/null +++ b/layouts/shortcodes/crosswalks_footnote.md @@ -0,0 +1,9 @@ +{{ $crosswalkName := .Params.name }} +{{ $result := where .Site.Data.crosswalk_pages "stem" $crosswalkName }} +{{ if gt (len $result) 0 -}} + {{ range $result }} + {{ .foot }} + {{ end }} +{{ else }} +Properties of the {{ $crosswalkName }} vocabulary. +{{ end }} diff --git a/scripts/crosswalk_to_pages.py b/scripts/crosswalk_to_pages.py new file mode 100644 index 0000000..c9ca50d --- /dev/null +++ b/scripts/crosswalk_to_pages.py @@ -0,0 +1,120 @@ +"""Transforms crosswalk.csv field headers into md files. + +This recreates the old existing files. Some were a little +bit special. + +Everything special is stored in data/crosswalk_pages.json +""" + +import re +import csv +import json +import pathlib + +DIR = pathlib.Path(__file__).parent.parent +CW_CSV = DIR / "data/crosswalk.csv" +MD_DIR = DIR / "content/crosswalk" +ORIDES_PATH = DIR / "data/crosswalk_pages.json" + +# Get our override values +try: + with open(ORIDES_PATH, 'r', encoding='utf-8') as orides_f: + orides = json.load(orides_f) +except FileNotFoundError: + raise FileNotFoundError(f"The data overrides file '{ORIDES_PATH}' could not be opened.") + +# Get crosswalk.csv header fieldnames +try: + with open(CW_CSV, 'r') as f: + csv_dict = csv.DictReader(f) + cw_stems = csv_dict.fieldnames[4:] +except FileNotFoundError: + raise FileNotFoundError(f"The CodeMeta properties file '{CW_CSV}' could not be opened.") + +# Do we have anything to parse? If not, raise an error about that +if len(cw_stems) > 0: + for stem in cw_stems: + stem_clean = real_stem = stem.strip() + stem_slug = re.sub(r'[^a-zA-Z0-9]+', '-', stem_clean) + + # Find our stem in the overrides file + match = next((item for item in orides if (item["stem"] == real_stem)), None) + + # If a name exists, use it or stick with the cleaned stem name + try: + vocab_name = match["name"] + except (TypeError, KeyError): + vocab_name = stem_clean + pass + + # If a shortname exists, we want this for the .md filename + try: + stem_slug = match["short"] + except (TypeError, KeyError): + pass + + # If there's an image defined, use it, if not use the codemeta.png as placeholder + try: + vocab_img = match["img"] + except (TypeError, KeyError): + vocab_img = f"image: /img/codemeta.png" + pass + else: + # of course check if it exists and if not use the same placeholder + img_path = DIR / "static/img" / vocab_img + img_path = pathlib.Path(img_path) + if img_path.is_file(): + vocab_img = f"image: /img/{vocab_img}" + else: + vocab_img = f"image: /img/codemeta.png" + + # A few pages had text after the table to refer back to other versions of the schemas + # this seems useful enough to preserve + try: + vocab_foot = match["foot"] + except (TypeError, KeyError): + vocab_foot = "" + pass + else: + vocab_foot = f"{{{{% crosswalks_footnote name='{stem_clean}' %}}}}" + + # Only some have dates. TODO Can be patched in later + try: + vocab_date = match["date"] + except (TypeError, KeyError): + date_formatted = "" + pass + else: + date_formatted = f"date: {vocab_date}" + + # A Software Ontology has no name. Keep it special for now. + if vocab_name == "": + title = f"title: \"Crosswalk\"" + vocab_name = stem_clean + else: + title = f"title: \"Crosswalk for {vocab_name}\"" + + md_text = f"""--- +{title} +vocab: "{vocab_name}" +slug: "{stem_slug}" +{vocab_img} +{date_formatted} +--- + +{{{{% crosswalks_desc name="{stem_clean}" %}}}} + +{{{{% crosswalk name="{real_stem}" %}}}} + +{vocab_foot}""" + + # preserve filename casing only for diff readability + if len(stem_slug) > 1: + stem_slug = stem_slug.lower() + + # Write our shiny markdown file for the crosswalk. + cw_md = MD_DIR / f"{stem_slug}.md" + cw_md.write_text(md_text) +else: + # Oops? + raise ValueError("The crosswalk.csv file had zero entries, is it empty?!"); diff --git a/themes/CodeMeta-Pyramids/layouts/_default/list.html b/themes/CodeMeta-Pyramids/layouts/_default/list.html index c463055..a3bc395 100644 --- a/themes/CodeMeta-Pyramids/layouts/_default/list.html +++ b/themes/CodeMeta-Pyramids/layouts/_default/list.html @@ -8,11 +8,18 @@
- - {{ partial "list.html" . }} - - - +
+ + + +
+ {{ partial "list.html" . }} +
+ +
+
diff --git a/themes/CodeMeta-Pyramids/layouts/partials/list.html b/themes/CodeMeta-Pyramids/layouts/partials/list.html index 0438191..de88ded 100644 --- a/themes/CodeMeta-Pyramids/layouts/partials/list.html +++ b/themes/CodeMeta-Pyramids/layouts/partials/list.html @@ -11,14 +11,13 @@ {{ with .Content }}
{{ . }}
{{ end }} -
{{ range .Paginator.Pages }} + + +
{{if .Params.image }} - {{ substr .Params.image 5 -4 }} logo + {{ .Params.slug | replaceRE {{ end }} @@ -31,21 +30,27 @@

{{ .Title }}

{{ if or (.Paginator.HasPrev) (.Paginator.HasNext) }}
+ {{ if .Paginator.HasNext }} + Next » + {{ end }} +
{{ end }}