STAG-FLATTEN(1p)
β¨ NAME β¨
okay bestie, stag-flatten β it turns stag data into a flat table π
that's literally the whole vibe.
πΈ SYNOPSIS πΈ
stag-flatten -c name -c person/name dept MyFile.xml
π¦ DESCRIPTION π¦
so like, it reads in a file in a stag format and flattens it into a tab-delimited table format. no cap. π«Ά
given this data:
(company
(dept
(name "special-operations")
(person
(name "james-bond"))
(person
(name "fred"))))
the above command will return a two column table:
special-operations james-bond
special-operations fred
and here's the part you gotta know π β if there are multiple values for the columns within the node, then the cartesian product will be calculated. fr fr, it's giving math but make it table.
π USAGE π
stag-flatten [-p PARSER] [-c COLS] [-c COLS] NODE <file>
π ARGUMENTS π
-p|parser FORMATβ FORMAT is one ofxml,sxproritext.xmlis assumed as default β¨-c|column COL1,COL2,COL3,..β the name of the columns/elements to write out. you can specify this either with multiple-carguments, or with a comma-seperated (no spaces!! π) list of column (terminal node) names after a single-c. pick your fighter, both slay.-n|nestβ if set, then the output will be a compress repeating values into the same row; each cell in the table will be enclosed by{}, and will contain a comma-delimited set of values π
ngl, that-none is highkey the main character if your data repeats a lot.{}cells, comma-delimited values, all cozy in one row. iconic.
π SEE ALSO π
Data::Stag β go read it, iykyk π
okay that's the whole page bestie, you ate that π
β¨ this was perl v5.34.0, dated 2022-06-12, and it came to you from the User Contributed Perl Documentation crew π bye bye, go flatten something π¦πΈ
π¦ where this page comes from
- debian bookworm: libdata-stag-perl 0.14-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libdata-stag-perl 0.14-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libdata-stag-perl 0.14-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu questing: libdata-stag-perl 0.14-3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms