Skip to main content

Convert software metadata in codemeta to html for visualisation

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

codemeta2html-0.2.1.tar.gz (465.0 kB view details)

Uploaded Source

File details

Details for the file codemeta2html-0.2.1.tar.gz.

File metadata

  • Download URL: codemeta2html-0.2.1.tar.gz
  • Upload date:
  • Size: 465.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for codemeta2html-0.2.1.tar.gz
Algorithm Hash digest
SHA256 0155baf706ff0583520cfee481b3c70f9a706ec5445ebe85adedb174bb50ef16
MD5 cb03ebd717e87ac844cb67d06d8285db
BLAKE2b-256 a5045d74f3b365dc1c35bc7ad166a988a60fa886416ddc089b6659caf99022f7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page