mirror of
https://github.com/wader/fq.git
synced 2024-12-25 14:23:18 +03:00
f24d685a5b
Refactor element name handling a bit, return it instead, feels nicer.
60 lines
1.4 KiB
Plaintext
60 lines
1.4 KiB
Plaintext
$ fq . test.svg
|
|
{
|
|
"svg": {
|
|
"-height": "2500",
|
|
"-inkscape:version": "1.0 (4035a4f, 2020-05-01)",
|
|
"-sodipodi:docname": "ffclippy.svg",
|
|
"-version": "1.1",
|
|
"-viewBox": "0 0 192.756 192.756",
|
|
"-width": "2500",
|
|
"-xmlns": "http://www.w3.org/2000/svg",
|
|
"-xmlns:inkscape": "http://www.inkscape.org/namespaces/inkscape",
|
|
"-xmlns:sodipodi": "http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd",
|
|
"-xmlns:svg": "http://www.w3.org/2000/svg",
|
|
"g": {
|
|
"-clip-rule": "evenodd",
|
|
"-fill-rule": "evenodd",
|
|
"-id": "g863"
|
|
},
|
|
"sodipodi:namedview": {
|
|
"-pagecolor": "#ffffff",
|
|
"-showgrid": "false"
|
|
}
|
|
}
|
|
}
|
|
$ fq -o array=true . test.svg
|
|
[
|
|
"svg",
|
|
{
|
|
"height": "2500",
|
|
"inkscape:version": "1.0 (4035a4f, 2020-05-01)",
|
|
"sodipodi:docname": "ffclippy.svg",
|
|
"version": "1.1",
|
|
"viewBox": "0 0 192.756 192.756",
|
|
"width": "2500",
|
|
"xmlns": "http://www.w3.org/2000/svg",
|
|
"xmlns:inkscape": "http://www.inkscape.org/namespaces/inkscape",
|
|
"xmlns:sodipodi": "http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd",
|
|
"xmlns:svg": "http://www.w3.org/2000/svg"
|
|
},
|
|
[
|
|
[
|
|
"sodipodi:namedview",
|
|
{
|
|
"pagecolor": "#ffffff",
|
|
"showgrid": "false"
|
|
},
|
|
[]
|
|
],
|
|
[
|
|
"g",
|
|
{
|
|
"clip-rule": "evenodd",
|
|
"fill-rule": "evenodd",
|
|
"id": "g863"
|
|
},
|
|
[]
|
|
]
|
|
]
|
|
]
|