[package]
name = "convert2json"
description = "CLI utilities to convert CSV, TOML, XML & YAML into JSON and for use with jq."
authors = ["Simon Rupf <simon@rupf.net>"]
version = "0.4.2"
edition = "2021"
license = "MIT"
repository = "https://github.com/simonrupf/convert2json"
keywords = ["cli", "json", "toml", "xml", "yaml"]
categories = ["command-line-utilities", "development-tools", "encoding"]
rust-version = "1.65"
[features]
default = ["csv", "toml", "xml", "yaml"]
jq = ["cq", "tq", "xq", "yq"]
to_json = ["csv2json", "toml2json", "xml2json", "yaml2json"]
csv = ["csv2json", "cq"]
toml = ["toml2json", "tq"]
xml = ["xml2json", "xq"]
yaml = ["yaml2json", "yq"]
csv2json = []
cq = []
toml2json = []
tq = []
xml2json = []
xq = []
yaml2json = []
yq = []
[dependencies]
argh = "0.1.10"
csv = "1.2.2"
is-terminal = "0.4.9"
serde = { version = "1.0.171", features = ["serde_derive"] }
serde-xml-rs = "0.6.0"
serde_json = "1.0.100"
serde_yaml = "0.9.22"
toml = "0.7.6"
yaml-split = "0.4.0"
[profile.release]
opt-level = 'z'
lto = true
codegen-units = 1
strip = true
[package.metadata.generate-rpm]
assets = [
{ source = "target/x86_64-unknown-linux-musl/release/csv2json", dest = "/usr/bin/csv2json", mode = "755" },
{ source = "target/x86_64-unknown-linux-musl/release/cq", dest = "/usr/bin/cq", mode = "755" },
{ source = "target/x86_64-unknown-linux-musl/release/toml2json", dest = "/usr/bin/toml2json", mode = "755" },
{ source = "target/x86_64-unknown-linux-musl/release/tq", dest = "/usr/bin/tq", mode = "755" },
{ source = "target/x86_64-unknown-linux-musl/release/xml2json", dest = "/usr/bin/xml2json", mode = "755" },
{ source = "target/x86_64-unknown-linux-musl/release/xq", dest = "/usr/bin/xq", mode = "755" },
{ source = "target/x86_64-unknown-linux-musl/release/yaml2json", dest = "/usr/bin/yaml2json", mode = "755" },
{ source = "target/x86_64-unknown-linux-musl/release/yq", dest = "/usr/bin/yq", mode = "755" },
{ source = "CHANGELOG.md", dest = "/usr/share/doc/convert2json/CHANGELOG.md", mode = "644", doc = true },
{ source = "LICENSE.md", dest = "/usr/share/doc/convert2json/LICENSE.md", mode = "644", doc = true },
{ source = "README.md", dest = "/usr/share/doc/convert2json/README.md", mode = "644", doc = true },
]
[package.metadata.generate-rpm.requires]
jq = "*"