{"id":16874884,"url":"https://github.com/jkrhb/sdf-wot-converter","last_synced_at":"2025-10-08T10:03:46.221Z","repository":{"id":37936971,"uuid":"378499409","full_name":"JKRhb/sdf-wot-converter","owner":"JKRhb","description":"Converter between WoT TD and SDF  (including protocol bindings). Work in Progress.","archived":false,"fork":false,"pushed_at":"2023-07-20T07:04:11.000Z","size":515,"stargazers_count":8,"open_issues_count":14,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-25T07:51:12.469Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JKRhb.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}},"created_at":"2021-06-19T20:28:58.000Z","updated_at":"2023-12-07T00:38:36.000Z","dependencies_parsed_at":"2023-02-13T02:00:52.301Z","dependency_job_id":null,"html_url":"https://github.com/JKRhb/sdf-wot-converter","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/JKRhb%2Fsdf-wot-converter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JKRhb%2Fsdf-wot-converter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JKRhb%2Fsdf-wot-converter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JKRhb%2Fsdf-wot-converter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JKRhb","download_url":"https://codeload.github.com/JKRhb/sdf-wot-converter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248383893,"owners_count":21094627,"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":[],"created_at":"2024-10-13T15:34:28.974Z","updated_at":"2025-10-08T10:03:41.201Z","avatar_url":"https://github.com/JKRhb.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://github.com/JKRhb/sdf-wot-converter/actions/workflows/test.yml/badge.svg)](https://github.com/JKRhb/sdf-wot-converter/actions/workflows/test.yml)\n[![codecov](https://codecov.io/gh/JKRhb/sdf-wot-converter/branch/main/graph/badge.svg?token=X7EEI07LXD)](https://codecov.io/gh/JKRhb/sdf-wot-converter)\n\n# SDF-WoT-Converter\n\nThis repository provides a converter from [SDF](https://datatracker.ietf.org/doc/html/draft-ietf-asdf-sdf-05) (with protocol bindings) to [WoT TD](https://www.w3.org/TR/wot-thing-description/) including Thing Models.\nThe converter is still WIP but can already be used for experimenting with it.\nIt will be continously updated over the upcoming weeks.\n\nIn the end, the converter is supposed to be usable both as a tool for the command line as well as a library that can be built upon in other WoT and SDF related projects.\n\n## Installing the Command Line Tool\n\nFor now, the converter has not been published to crates.io yet.\nYou can, however, install it from the Git repository using Rust's package manager `cargo`.\n\nIf you have [Rust installed](https://www.rust-lang.org/tools/install) run\n\n```\ncargo install --git https://github.com/JKRhb/sdf-wot-converter.git --branch main\n```\n\nin a terminal of your choice.\nThe installation takes a while but once its compilation has been finished the converter should be usable right away.\nIt can be called using `sdf-wot-converter` and one of the subcommands described below.\nMore detailed information can be obtained using `sdf-wot-converter --help`.\n\n## Using the Command Line Tool\n\nSo far, the converter provides two commands (`convert` and `print`) that can be invoked from the command line.\nThe input path can either be an absolute or relative file path, or a URL with a `http` or `https` schema.\n\n### `convert`\n\nSo far, this command can convert between an SDF model and a WoT Thing Model.\nThe conversion from WoT TM to SDF, however, is not really implemented at the moment.\n\nThe command accepts the arguments `--from-sdf` or `--from-tm` to specificy input files and `--to-tm` or `--to-sdf` to\nspecify output files. \nFor the input arguments the file endings have to `sdf.json` or `tm.json`, respectively.\n\nBoth SDF protocol bindings and Thing Descriptions are not covered yet but will be added soon.\n\n**Examples:**\n\n```bash\n# Retrieval from file system\nsdf-wot-converter convert --from-sdf examples/sdf/example.sdf.json --to-tm result.tm.json\nsdf-wot-converter convert --from-tm examples/wot/example.tm.json --to-sdf result.sdf.json\n\n# Retrieval from URLs\nsdf-wot-converter convert --from-sdf https://example.org/example.sdf.json --to-tm result.tm.json\nsdf-wot-converter convert --from-tm https://example.org/example.tm.json --to-sdf result.sdf.json\n```\n\nUsing the same file format as input and output will simply copy the content of the input file.\n\n### `print`\n\nThis command serves primarily for debug purposes and will probably be removed in a later version.\nIt accepts a file path or URL that must point to a WoT TD, a WoT TM, or an SDF model.\nThe file type is specified by using `--sdf`,  `--td`, or `--tm` as an argument (see the examples below).\nIt reads in the model, and performs first a deserialization into Rust data structures followed by a serialization back into JSON.\nThe result is then printed in the terminal.\n\n**Examples:**\n\n```bash\n# Retrieval from file system\nsdf-wot-converter print --sdf examples/sdf/example.sdf.json\nsdf-wot-converter print --tm examples/wot/example.tm.json\nsdf-wot-converter print --td examples/wot/example.td.json\n\n# Retrieval from URLs\nsdf-wot-converter print --sdf https://example.org/example.sdf.json\nsdf-wot-converter print --tm https://example.org/example.tm.json\nsdf-wot-converter print --td https://example.org/example.td.json\n```\n\n## License\n\nThis project is licensed under the MIT license.\n\n```\nSPDX-License-Identifier: MIT\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjkrhb%2Fsdf-wot-converter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjkrhb%2Fsdf-wot-converter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjkrhb%2Fsdf-wot-converter/lists"}