convert2json 2.2.2

CLI utilities to convert BSON, CBOR, CSV, INI, MessagePack, Plist, RSV, TOML, XML & YAML into JSON and for use with jaq or jq.
Documentation
[package]
name = "convert2json"
description = "CLI utilities to convert BSON, CBOR, CSV, INI, MessagePack, Plist, RSV, TOML, XML & YAML into JSON and for use with jaq or jq."
authors = ["Simon Rupf <simon@rupf.net>"]
version = "2.2.2"
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.81"

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

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

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

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

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

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

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

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

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

[[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]
bson = { version = "2.15.0", features = ["uncapped_max_size"], optional = true }
ciborium = { version = "0.2.2", optional = true }
csv = { version = "1.3.1", optional = true }
pico-args = { version = "0.5.0", features = ["short-space-opt"], optional = true }
plist = { version = "1.7.1", optional = true }
quick-xml = { version = "0.37.5", features = ["serialize"], optional = true }
rmp-serde = { version = "1.3.0", 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 = { version = "1.0.140", features = ["preserve_order"] }
serde_yaml = { version = "0.9.34", optional = true }
toml = { version = "0.8.21", default-features = false, features = ["parse"], optional = true }
yaml-split = { version = "0.4.0", optional = true }

[features]
default = ["bson", "cbor", "csv", "ini", "messagepack", "plist", "rsv", "toml", "xml", "yaml"]
jq = ["bsonq", "cborq", "cq", "iq", "msgq", "plistq", "rq", "tq", "xq", "yq"]
to_json = ["bson2json", "cbor2json", "csv2json", "ini2json", "msg2json", "plist2json", "rsv2json", "toml2json", "xml2json", "yaml2json"]
bson = ["bson2json", "bsonq"]
cbor = ["cbor2json", "cborq"]
csv = ["csv2json", "cq"]
ini = ["ini2json", "iq"]
messagepack = ["msg2json", "msgq"]
plist = ["plist2json", "plistq"]
rsv = ["rsv2json", "rq"]
toml = ["toml2json", "tq"]
xml = ["xml2json", "xq"]
yaml = ["yaml2json", "yq"]
bson2json = ["dep:bson"]
bsonq = ["dep:bson"]
cbor2json = ["dep:ciborium"]
cborq = ["dep:ciborium"]
csv2json = ["dep:pico-args", "dep:csv"]
cq = ["dep:pico-args", "dep:csv"]
ini2json = ["dep:serde_ini"]
iq = ["dep:serde_ini"]
msg2json = ["dep:rmp-serde"]
msgq = ["dep:rmp-serde"]
plist2json = ["dep:plist"]
plistq = ["dep:plist"]
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]
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/bson2json", "usr/bin/", "755" ],
    ["target/x86_64-unknown-linux-musl/release/bsonq", "usr/bin/", "755" ],
    ["target/x86_64-unknown-linux-musl/release/cbor2json", "usr/bin/", "755" ],
    ["target/x86_64-unknown-linux-musl/release/cborq", "usr/bin/", "755" ],
    ["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/msg2json", "usr/bin/", "755" ],
    ["target/x86_64-unknown-linux-musl/release/msgq", "usr/bin/", "755" ],
    ["target/x86_64-unknown-linux-musl/release/plist2json", "usr/bin/", "755" ],
    ["target/x86_64-unknown-linux-musl/release/plistq", "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/bson2json", dest = "/usr/bin/bson2json", mode = "755" },
    { source = "target/x86_64-unknown-linux-musl/release/bsonq", dest = "/usr/bin/bsonq", mode = "755" },
    { source = "target/x86_64-unknown-linux-musl/release/cbor2json", dest = "/usr/bin/cbor2json", mode = "755" },
    { source = "target/x86_64-unknown-linux-musl/release/cborq", dest = "/usr/bin/cborq", mode = "755" },
    { 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/msg2json", dest = "/usr/bin/msg2json", mode = "755" },
    { source = "target/x86_64-unknown-linux-musl/release/msgq", dest = "/usr/bin/msgq", mode = "755" },
    { source = "target/x86_64-unknown-linux-musl/release/plist2json", dest = "/usr/bin/plist2json", mode = "755" },
    { source = "target/x86_64-unknown-linux-musl/release/plistq", dest = "/usr/bin/plistq", 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 = "*"