Go to file
2022-10-26 23:54:46 +02:00
examples Add JSON5 deserialization 2022-09-20 23:03:15 +02:00
scripts Tagging script should run the test and force formatting => dirty repo will prevent the tagging 2022-10-26 23:54:46 +02:00
src Attempt to add DBus, it compiles but I did not achive a conversion (in either direction) 2022-10-26 23:53:37 +02:00
tests Add JSON5 deserialization 2022-09-20 23:03:15 +02:00
.gitignore POC: Inital commit (transcode json, ron, yaml) 2022-09-17 20:29:35 +02:00
Cargo.lock Attempt to add DBus, it compiles but I did not achive a conversion (in either direction) 2022-10-26 23:53:37 +02:00
Cargo.toml Attempt to add DBus, it compiles but I did not achive a conversion (in either direction) 2022-10-26 23:53:37 +02:00
README.md POC: Inital commit (transcode json, ron, yaml) 2022-09-17 20:29:35 +02:00

Description

This tool "traduit" (french for translate) data formats. It was made in the hope to bring serde to the cli (serdi ^^). But that not exaclty what serde is about and I have no affiliation with them so I did not want to namesquat.

Installation

First install the rust toolchain and then execute the following command:

cargo install tradaf

Usage example

Prettify (or minify) some data format for ease of reading (resp: compact and have less data to save/transfert)

tradaf json json --pretty < simple.json 

Litterally transcode between data formats

tradaf ron yaml < examples/standard.ron

Transcode into JSON so we can use jq, do some transformations and then transcode again into another format for viewing

tradaf RON json < examples/gameConfig.ron | jq .key_bindings | tradaf Json yaml