Skip to main content

Project Status: Active -- The project has reached a stable, usable state and is being actively developed. GitHub release Latest release in the Python Package Index

Codemeta2html

Introduction

Codemeta2html is a command-line tool and software library to visualize software metadata in the codemeta standard. This library builds on codemetapy.

Features

  • Generates a complete static website with:
    • rich RDFa data (codemeta/schema.org/etc) embedded in the HTML, expressing as much of the input linked data as possible. This means though we visualise for humans, we do not sacrifice on machine parsability and semantic interpretability.
    • index pages (card view & table view)
    • one dedicated page per software source project
    • client-side filtering (faceted search) capabilities
    • direct access to the underlying JSON-LD and Turtle serialisations per source project and for the complete data graph as a whole
    • responsive layout suitable for different devices and screen-sizes
    • badges (aka shields) for GitHub, Repostatus
    • minimal amount of external web calls (only for github/gitlab badges and for external resources references directly by the software metadata itself)
    • minimal client-side javascript, also usable without (except for filtering)
    • useful in combination with codemeta-harvester to visualize the results of the harvest

Notes

  1. This solution is designed to work well with tens or hundreds of resources (software projects), it does not scale well beyond that to thousands of resources.
  2. If you want a server-side solution that allows for live querying (using SPARQL), then use codemeta-server instead (which has this project as main dependency).

Installation

pip install codemeta2html

Usage

You can pass either a JSON-LD file describing a single software project and have it output to standard output:

$ codemeta2html --stdout yoursoftware.codemeta.json > yoursoftware.html

Or you can pass a full JSON-LD graph describing multiple projects, effectively using codemeta2html to generate a static website:

$ codemeta2html --outputdir build/ yoursoftware.codemeta.json

This is the default behaviour, it also works on an input file for single software project although it may be overkill there.

You can pass additional linked data (JSON-LD or turtle) to the context graph, this is used for vocabularies that are referenced by the software metadata and ensures they can be properly labelled in the visualisation. The use of SKOS vocabularies is supported and encouraged. Consider the following example for the CLARIAH project:

$ codemeta2html --title "CLARIAH Tools" --baseuri https://tools.clariah.nl/ --addcontextgraph https://w3id.org/nwo-research-fields --addcontextgraph https://raw.githubusercontent.com/CLARIAH/tool-discovery/master/schemas/research-technology-readiness-levels.jsonld --addcontextgraph https://vocabs.dariah.eu/rest/v1/tadirah/data\?format\=text/turtle data.json

The --baseuri parameter will adapt all resource identifiers to a single common URI, which does not necessarily have to be the same as the URL the pages are served from (you can use --baseurl for that).

Acknowledgement

This work is conducted at the KNAW Humanities Cluster's Digital Infrastructure department in the scope of the CLARIAH project (CLARIAH-PLUS, NWO grant 184.034.023) as part of the FAIR Tool Discovery track of the Shared Development Roadmap.

Metadata

Release files for codemeta2html 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for codemeta2html 0.2.1
File Size Uploaded
codemeta2html-0.2.1.tar.gz 465.0 kB Details

Release files / codemeta2html-0.2.1.tar.gz

Download URL codemeta2html-0.2.1.tar.gz
Size 465.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0155baf706ff0583520cfee481b3c70f9a706ec5445ebe85adedb174bb50ef16
BLAKE2b-256 checksum
How to use checksums
a5045d74f3b365dc1c35bc7ad166a988a60fa886416ddc089b6659caf99022f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release history Release notifications | RSS feed

This release

0.2.1 This release

1 release file

0.2.0

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page