[package]
name = "convert2json"
description = "CLI utilities to convert CSV, INI, TOML, XML & YAML into JSON and for use with jq."
authors = ["Simon Rupf <simon@rupf.net>"]
version = "0.7.2"
edition = "2021"
license = "MIT"
repository = "https://github.com/simonrupf/convert2json"
keywords = ["cli", "csv", "json", "xml", "yaml"]
categories = ["command-line-utilities", "development-tools", "encoding"]
rust-version = "1.70"
[[bin]]
name = "csv2json"
required-features = ["csv2json"]
[[bin]]
name = "cq"
required-features = ["cq"]
[[bin]]
name = "ini2json"
required-features = ["ini2json"]
[[bin]]
name = "iq"
required-features = ["iq"]
[[bin]]
name = "toml2json"
required-features = ["toml2json"]
[[bin]]
name = "tq"
required-features = ["tq"]
[[bin]]
name = "xml2json"
required-features = ["xml2json"]
[[bin]]
name = "xq"
required-features = ["xq"]
[[bin]]
name = "yaml2json"
required-features = ["yaml2json"]
[[bin]]
name = "yq"
required-features = ["yq"]
[dependencies]
csv = { version = "1.3.0", optional = true }
pico-args = { version = "0.5.0", features = ["short-space-opt"], optional = true }
serde = { version = "1.0.197", features = ["serde_derive"] }
serde-xml-rs = { version = "0.6.0", optional = true }
serde_ini = { version = "0.2.0", optional = true }
serde_json = "1.0.114"
serde_yaml = { version = "0.9.32", optional = true }
toml = { version = "0.8.8", optional = true }
yaml-split = { version = "0.4.0", optional = true }
[features]
default = ["csv", "ini", "toml", "xml", "yaml"]
jq = ["cq", "tq", "xq", "yq"]
to_json = ["csv2json", "toml2json", "xml2json", "yaml2json"]
csv = ["csv2json", "cq"]
ini = ["ini2json", "iq"]
toml = ["toml2json", "tq"]
xml = ["xml2json", "xq"]
yaml = ["yaml2json", "yq"]
csv2json = ["dep:pico-args", "dep:csv"]
cq = ["dep:pico-args", "dep:csv"]
ini2json = ["dep:serde_ini"]
iq = ["dep:serde_ini"]
toml2json = ["dep:toml"]
tq = ["dep:toml"]
xml2json = ["dep:serde-xml-rs"]
xq = ["dep:serde-xml-rs"]
yaml2json = ["dep:serde_yaml", "dep:yaml-split"]
yq = ["dep:serde_yaml", "dep:yaml-split"]
[profile.release]
opt-level = 'z'
lto = true
codegen-units = 1
strip = true
[package.metadata.deb]
maintainer = "Simon Rupf <simon@rupf.net>"
license-file = ["LICENSE-MIT", "0"]
extended-description-file = "README.md"
depends = "jq"
section = "contrib/utils"
priority = "optional"
assets = [
["target/x86_64-unknown-linux-musl/release/csv2json", "usr/bin/", "755" ],
["target/x86_64-unknown-linux-musl/release/cq", "usr/bin/", "755" ],
["target/x86_64-unknown-linux-musl/release/ini2json", "usr/bin/", "755" ],
["target/x86_64-unknown-linux-musl/release/iq", "usr/bin/", "755" ],
["target/x86_64-unknown-linux-musl/release/toml2json", "usr/bin/", "755" ],
["target/x86_64-unknown-linux-musl/release/tq", "usr/bin/", "755" ],
["target/x86_64-unknown-linux-musl/release/xml2json", "usr/bin/xml2json", "755" ],
["target/x86_64-unknown-linux-musl/release/xq", "usr/bin/", "755" ],
["target/x86_64-unknown-linux-musl/release/yaml2json", "usr/bin/yaml2json", "755" ],
["target/x86_64-unknown-linux-musl/release/yq", "usr/bin/", "755" ],
["CHANGELOG.md", "usr/share/doc/convert2json/", "644" ],
["LICENSE.md", "usr/share/doc/convert2json/", "644" ],
["README.md", "usr/share/doc/convert2json/", "644" ],
]
[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/ini2json", dest = "/usr/bin/ini2json", mode = "755" },
{ source = "target/x86_64-unknown-linux-musl/release/iq", dest = "/usr/bin/iq", 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 = "*"