convert2json 2.0.0

CLI utilities to convert CSV, INI, RSV, TOML, XML & YAML into JSON and for use with jaq or jq.
Documentation
[package]
name = "convert2json"
description = "CLI utilities to convert CSV, INI, RSV, TOML, XML & YAML into JSON and for use with jaq or jq."
authors = ["Simon Rupf <simon@rupf.net>"]
version = "2.0.0"
edition = "2021"
license = "MIT"
repository = "https://github.com/simonrupf/convert2json"
keywords = ["cli", "csv", "json", "xml", "yaml"] # limited to 5 keywords
categories = ["command-line-utilities", "development-tools", "encoding"]
rust-version = "1.74"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[[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 = "rsv2json"
required-features = ["rsv2json"]

[[bin]]
name = "rq"
required-features = ["rq"]

[[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.1", optional = true }
pico-args = { version = "0.5.0", features = ["short-space-opt"], optional = true }
quick-xml = { version = "0.37.2", features = ["serialize"], optional = true }
rsv-core = { version = "0.0.4", optional = true }
serde = { version = "1.0.219", features = ["serde_derive"] }
serde_ini = { version = "0.2.0", optional = true }
serde_json = "1.0.140"
serde_yaml = { version = "0.9.34", optional = true }
toml = { version = "0.8.8", optional = true }
yaml-split = { version = "0.4.0", optional = true }

[features]
default = ["csv", "ini", "rsv", "toml", "xml", "yaml"]
jq = ["cq", "rq", "tq", "xq", "yq"]
to_json = ["csv2json", "rsv2json", "toml2json", "xml2json", "yaml2json"]
csv = ["csv2json", "cq"]
ini = ["ini2json", "iq"]
rsv = ["rsv2json", "rq"]
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"]
rsv2json = ["dep:rsv-core"]
rq = ["dep:rsv-core"]
toml2json = ["dep:toml"]
tq = ["dep:toml"]
xml2json = ["dep:quick-xml"]
xq = ["dep:quick-xml"]
yaml2json = ["dep:serde_yaml", "dep:yaml-split"]
yq = ["dep:serde_yaml", "dep:yaml-split"]

[profile.release]
opt-level = 'z'  # Optimize for size.
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/rsv2json", "usr/bin/", "755" ],
    ["target/x86_64-unknown-linux-musl/release/rq", "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/rsv2json", dest = "/usr/bin/csv2json", mode = "755" },
    { source = "target/x86_64-unknown-linux-musl/release/rq", 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 = "*"