{"id":23370649,"url":"https://github.com/kodymoodley/fair-metadata-html-page-generator","last_synced_at":"2025-04-08T00:48:41.957Z","repository":{"id":100125939,"uuid":"341209881","full_name":"kodymoodley/fair-metadata-html-page-generator","owner":"kodymoodley","description":"A simple Python script to generate a static HTML page for viewing a JSON-LD metadata description of a dataset using Schema.org markup vocabulary.","archived":false,"fork":false,"pushed_at":"2021-04-12T07:37:56.000Z","size":33,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-14T01:43:28.037Z","etag":null,"topics":["fair","fair-data","fair-principles","html","json-ld","jsonld","metadata","metadata-management","python","schema-org","structured-data"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kodymoodley.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-22T13:29:26.000Z","updated_at":"2025-01-09T18:24:24.000Z","dependencies_parsed_at":"2023-05-12T11:15:39.958Z","dependency_job_id":null,"html_url":"https://github.com/kodymoodley/fair-metadata-html-page-generator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kodymoodley%2Ffair-metadata-html-page-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kodymoodley%2Ffair-metadata-html-page-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kodymoodley%2Ffair-metadata-html-page-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kodymoodley%2Ffair-metadata-html-page-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kodymoodley","download_url":"https://codeload.github.com/kodymoodley/fair-metadata-html-page-generator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247755591,"owners_count":20990626,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fair","fair-data","fair-principles","html","json-ld","jsonld","metadata","metadata-management","python","schema-org","structured-data"],"created_at":"2024-12-21T15:47:56.759Z","updated_at":"2025-04-08T00:48:41.951Z","avatar_url":"https://github.com/kodymoodley.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [FAIR](https://www.go-fair.org/fair-principles/) metadata html page generator\n\n### Description\n\nA simple Python script to generate a static [HTML](https://html.spec.whatwg.org/) page for viewing a [JSON-LD](https://json-ld.org/) metadata description of a dataset using [Schema.org](https://schema.org/) markup vocabulary.\n\n[Structured](https://developers.google.com/search/docs/guides/intro-structured-data), machine-readable metadata about datasets are helpful for improving the [Findability, Accessibility, Interoperability and Reusability](https://www.go-fair.org/fair-principles/) of data. [Google](https://www.google.com/), for example, is gradually developing support for [dataset search tools](https://datasetsearch.research.google.com/) to help researchers find and reuse relevant data. Providing machine-readable descriptions of datasets is helpful for search engine indexing software to process and display data descriptions to users.\n\nI have developed a Python script [here](https://github.com/kodymoodley/fair-metadata-generator) to generate such a description in JSON-LD using [Schema.org](https://schema.org/) markup vocabulary. \n\nHowever, after this JSON-LD description is generated, it is often useful to publish a webpage describing the content of the JSON-LD file for viewing by humans. Given an input JSON-LD file describing a dataset, the script ``jsonld_to_html.py`` generates a single static HTML page accomplishing this.\n\n### Requirements\n\n+ [Python 3.7+](https://www.python.org/downloads/)\n+ Python libraries specified in ``requirements.txt`` in this repository\n+ A JSON-LD file compliant with the [Schema.org](https://schema.org/) [Dataset](https://schema.org/Dataset) entity description. If you do not have one of these files at hand, you can generate one using [this tool](https://github.com/kodymoodley/fair-metadata-generator). Alternatively, there is an example file under ``testdata/inputdata/`` in this repository.\n\nTo install the required libraries in ``requirements.txt`` run: ``pip install -r requirements.txt`` in your command line environment (after installing Python).\n\n### Usage\n\nRun ``python jsonld_to_html.py \u003crelative path to input json-ld file\u003e \u003crelative path to output html file\u003e`` in your command line environment after installing Python and the required libraries. For example: ``python jsonld_to_html.py testdata/inputdata/test.jsonld testdata/outputdata/test.html``\n\n### Developer notes\n\n#### Custom HTML templates\nThis tool makes use of the [Jinja](https://jinja.palletsprojects.com/en/2.11.x/) templating engine for Python. I have defined an HTML template ``templates/html_template.html`` in this repository. If you would like to customise your HTML files for viewing the JSON-LD metadata, you can modify this template or add new custom templates in this folder. You would then need to update references to this template file in ``jsonld_to_html.py`` and also make necessary modifications to the ``mappings/jsonld_to_htmltemplate_mapping.csv`` file. This file defines a mapping between JSON-LD keys for Schema.org [datasets](https://schema.org/Dataset) and the Jinja variables (in the HTML template file) that should hold the values for these keys. I plan to include the mapping file and the HTML template as arguments for the ``json_to_html.py`` script in the near future.\n\n#### Custom CSS\nThe styling of the output HTML page(s) is defined in the ``style.css`` [CSS](https://www.w3.org/TR/css-2020/) file located in ``testdata/outputdata/``. If you prefer a different styling, this is the file to modify. The output HTML files also expect the CSS file to be located in a folder called ``css/`` in the same directory as the output HTML file(s). \n\n### License and contributions\n\nThe FAIR metadata html page generator is copyrighted by [Kody Moodley](https://sites.google.com/site/kodymoodley/) and released under the [GNU Affero License](https://www.gnu.org/licenses/agpl-3.0.txt)\n\nContributions and bug reports are helpful and welcome.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkodymoodley%2Ffair-metadata-html-page-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkodymoodley%2Ffair-metadata-html-page-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkodymoodley%2Ffair-metadata-html-page-generator/lists"}