-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cargo.toml
148 lines (130 loc) · 5.45 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
[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 <[email protected]>"]
version = "1.1.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.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.1", features = ["serialize"], optional = true }
rsv-core = { version = "0.0.4", optional = true }
serde = { version = "1.0.215", features = ["serde_derive"] }
serde_ini = { version = "0.2.0", optional = true }
serde_json = "1.0.133"
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 <[email protected]>"
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 = "*"