{"id":21986035,"url":"https://github.com/tamschi/reserde","last_synced_at":"2025-04-30T08:03:21.739Z","repository":{"id":42079208,"uuid":"284425555","full_name":"Tamschi/reserde","owner":"Tamschi","description":"A RE-SErialising DEserialiser - that is: a document converter. Currently supports Bencode, Bincode, CBOR, JSON, TAML, XML, x-www-form-urlencoded and YAML.","archived":false,"fork":false,"pushed_at":"2024-04-12T14:36:28.000Z","size":162,"stargazers_count":4,"open_issues_count":5,"forks_count":2,"subscribers_count":4,"default_branch":"develop","last_synced_at":"2024-11-12T21:44:32.889Z","etag":null,"topics":["bencode","bincode","cbor","converter","hacktoberfest","json","rust","taml","tool","x-www-form-urlencoded","xml","yaml"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Tamschi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE-APACHE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"SECURITY.md","support":null},"funding":{"github":"Tamschi"}},"created_at":"2020-08-02T08:54:07.000Z","updated_at":"2022-11-16T09:31:48.000Z","dependencies_parsed_at":"2023-01-22T22:31:04.514Z","dependency_job_id":null,"html_url":"https://github.com/Tamschi/reserde","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tamschi%2Freserde","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tamschi%2Freserde/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tamschi%2Freserde/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tamschi%2Freserde/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tamschi","download_url":"https://codeload.github.com/Tamschi/reserde/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227185398,"owners_count":17744371,"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":["bencode","bincode","cbor","converter","hacktoberfest","json","rust","taml","tool","x-www-form-urlencoded","xml","yaml"],"created_at":"2024-11-29T18:16:52.063Z","updated_at":"2024-11-29T18:16:53.192Z","avatar_url":"https://github.com/Tamschi.png","language":"Rust","funding_links":["https://github.com/sponsors/Tamschi"],"categories":[],"sub_categories":[],"readme":"# reserde\n\n[![Lib.rs](https://img.shields.io/badge/Lib.rs-*-84f)](https://lib.rs/crates/reserde)\n[![Crates.io](https://img.shields.io/crates/v/reserde)](https://crates.io/crates/reserde)\n[![Docs.rs](https://docs.rs/reserde/badge.svg)](https://docs.rs/reserde)\n\n![Rust 1.53](https://img.shields.io/static/v1?logo=Rust\u0026label=\u0026message=1.53\u0026color=grey)\n[![CI](https://github.com/Tamschi/reserde/workflows/CI/badge.svg?branch=develop)](https://github.com/Tamschi/reserde/actions?query=workflow%3ACI+branch%3Adevelop)\n![Crates.io - License](https://img.shields.io/crates/l/reserde/0.0.4)\n\n[![GitHub](https://img.shields.io/static/v1?logo=GitHub\u0026label=\u0026message=%20\u0026color=grey)](https://github.com/Tamschi/reserde)\n[![open issues](https://img.shields.io/github/issues-raw/Tamschi/reserde)](https://github.com/Tamschi/reserde/issues)\n[![open pull requests](https://img.shields.io/github/issues-pr-raw/Tamschi/reserde)](https://github.com/Tamschi/reserde/pulls)\n[![good first issues](https://img.shields.io/github/issues-raw/Tamschi/reserde/good%20first%20issue?label=good+first+issues)](https://github.com/Tamschi/reserde/contribute)\n\n[![crev reviews](https://web.crev.dev/rust-reviews/badge/crev_count/reserde.svg)](https://web.crev.dev/rust-reviews/crate/reserde/)\n[![Zulip Chat](https://img.shields.io/endpoint?label=chat\u0026url=https%3A%2F%2Fiteration-square-automation.schichler.dev%2F.netlify%2Ffunctions%2Fstream_subscribers_shield%3Fstream%3Dproject%252Freserde)](https://iteration-square.schichler.dev/#narrow/stream/project.2Freserde)\n\nA Serde-based document converter.\n\n## Installation\n\nYou can install `reserde` using Cargo:\n\n```cmd\ncargo install reserde\n```\n\n## Usage\n\n```sh\nreserde --help\n```\n\n```txt\nreserde 0.0.4\nTranscode a self-describing format into a different format.\n\nCurrently supports Bencode, Bincode (--out only), CBOR, JSON (--pretty), TAML (--in only), XML, x-www-form-urlencoded\n(as urlencoded) and YAML. All names are lowercase.\n\nUSAGE:\n    reserde.exe [FLAGS] [OPTIONS] --in \u003cin-format\u003e --out \u003cout-format\u003e\n\nFLAGS:\n        --enum-bools\n            case-insensitively convert unit variants with name `true` or `false` into booleans\n\n    -h, --help\n            Prints help information\n\n    -p\n            pretty-print (where supported)\n\n    -V, --version\n            Prints version information\n\n\nOPTIONS:\n        --if \u003cin-file\u003e\n            where to read input from. Defaults to stdin\n\n    -i, --in \u003cin-format\u003e\n            what to read [possible values: bencode, cbor, json, taml, urlencoded, xml, yaml]\n\n        --of \u003cout-file\u003e\n            where to write output to. Defaults to stdout\n\n    -o, --out \u003cout-format\u003e\n            what to write [possible values: bencode, bincode, cbor, json, urlencoded, xml, yaml]\n\n    -s \u003cstringify\u003e...\n            stringify bytes and non-string value keys into strings where possible. (Tries encodings in the order\n            specified.) [try with: --in bencode] [possible values: utf8]\n```\n\n## Examples\n\n### Converting a `.torrent` file\n\n```sh\nreserde -i bencode -o json --stringify utf8 --if manjaro-xfce-21.0.7-210614-linux510.iso.torrent\n```\n\nOutput (excerpt):\n\n```json\n{\n  \"announce\": \"udp://tracker.opentrackr.org:1337\",\n  \"created by\": \"mktorrent 1.1\",\n  \"creation date\": 1623684209,\n  \"info\": {\n    \"length\": 2600828928,\n    \"name\": \"manjaro-xfce-21.0.7-210614-linux510.iso\",\n    \"piece length\": 2097152,\n    \"pieces\": [\n      128,\n      236,\n      36,\n      37,\n      10,\n      …\n    ]\n  },\n  \"url-list\": \"https://download.manjaro.org/xfce/21.0.7/mfce/21.0.7/manjaro-xfce-21.0.7-210614-linux51anjaro-xfce-21.0.7-210614-linux510.iso\"\n}\n```\n\n### TAML to YAML\n\n```sh\nreserde -i taml -o yaml\n```\n\n```taml\n# [soundscapes]\n// Sewer\n\n## [[loops].{sound, volume}]\n\"$sewer/amb_drips\", 0.8\n\"$sewer/amb_flies\", 0.1\n\"$sewer/amb_hum\", 0.05 // postfix comment\n\n## [moments]\nsound: \"$sewer/moments/*\"\nlayers: 1\nfirst-interval-no-min: true\ninterval-range: (10, 60)\nvolume-range: (0.1, 0.15)\n\n##\n`spaced \\` identifier`: \"asdhasd kjhdajkh\"\n```\n\n```yaml\n---\nsoundscapes:\n  - loops:\n      - sound: $sewer/amb_drips\n        volume: 0.8\n      - sound: $sewer/amb_flies\n        volume: 0.1\n      - sound: $sewer/amb_hum\n        volume: 0.05\n    moments:\n      - sound: $sewer/moments/*\n        layers: 1\n        first-interval-no-min: true\n        interval-range:\n          - 10\n          - 60\n        volume-range:\n          - 0.1\n          - 0.15\n    \"spaced ` identifier\": asdhasd kjhdajkh\n```\n\n(Comments are generally stripped, as they can't be sent across Serde's interface.)\n\n### TAML to XML\n\n```sh\nreserde -i taml -o xml\n```\n\n```taml\n# [enums]: Structured\nfield_1: true\nfield_2: false\n\n# [[enums]]\nTuple(1, 2, 3)\nUnit\nEmptyTuple()\n```\n\n```xml\n\u003cenums\u003e\u003cStructured field_1=\"true\" field_2=\"false\"/\u003e\u003cTuple\u003e1\u003c/Tuple\u003e\u003cTuple\u003e2\u003c/Tuple\u003e\u003cTuple\u003e3\u003c/Tuple\u003e\u003cUnit/\u003e\u003c/enums\u003e\n```\n\n## License\n\nLicensed under either of\n\n- Apache License, Version 2.0\n   ([LICENSE-APACHE](LICENSE-APACHE) or \u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e)\n- MIT license\n   ([LICENSE-MIT](LICENSE-MIT) or \u003chttp://opensource.org/licenses/MIT\u003e)\n\nat your option.\n\n## Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the Apache-2.0 license, shall be\ndual licensed as above, without any additional terms or conditions.\n\nSee [CONTRIBUTING](CONTRIBUTING.md) for more information.\n\n## [Code of Conduct](CODE_OF_CONDUCT.md)\n\n## [Changelog](CHANGELOG.md)\n\n## Versioning\n\n`reserde` strictly follows [Semantic Versioning 2.0.0](https://semver.org/spec/v2.0.0.html) with the following exceptions:\n\n- The minor version will not reset to 0 on major version changes (except for v1).  \nConsider it the global feature level.\n- The patch version will not reset to 0 on major or minor version changes (except for v0.1 and v1).  \nConsider it the global patch level.\n\nThis includes the Rust version requirement specified above.  \nEarlier Rust versions may be compatible, but this can change with minor or patch releases.\n\nWhich versions are affected by features and patches can be determined from the respective headings in [CHANGELOG.md](CHANGELOG.md).\n\nNote that dependencies of this crate may have a more lenient MSRV policy!\nPlease use `cargo +nightly update -Z minimal-versions` in your automation if you don't generate Cargo.lock manually (or as necessary) and require support for a compiler older than current stable.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftamschi%2Freserde","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftamschi%2Freserde","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftamschi%2Freserde/lists"}