author | František Kučera <franta-hg@frantovo.cz> |
Sat, 26 Oct 2019 20:57:42 +0200 | |
branch | v_0 |
changeset 276 | cfaf1fa94154 |
parent 272 | a756214f1ee8 |
child 326 | ab7f333f1225 |
permissions | -rw-r--r-- |
271
a19312ab9db7
examples: Sane software manifesto statistics using XMLTable/XPath
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
1 |
build/statistics.rp: text/ssm.en.xml |
a19312ab9db7
examples: Sane software manifesto statistics using XMLTable/XPath
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
2 |
mkdir -p build |
a19312ab9db7
examples: Sane software manifesto statistics using XMLTable/XPath
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
3 |
cat text/ssm.en.xml \ |
a19312ab9db7
examples: Sane software manifesto statistics using XMLTable/XPath
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
4 |
| relpipe-in-xmltable \ |
a19312ab9db7
examples: Sane software manifesto statistics using XMLTable/XPath
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
5 |
--namespace "m" "tag:globalcode.info,2019:sane-software/manifesto" \ |
a19312ab9db7
examples: Sane software manifesto statistics using XMLTable/XPath
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
6 |
--relation "chapter" \ |
a19312ab9db7
examples: Sane software manifesto statistics using XMLTable/XPath
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
7 |
--records "//m:chapter" \ |
272
a756214f1ee8
examples: Sane software manifesto statistics using XMLTable/XPath (indentation, resume)
František Kučera <franta-hg@frantovo.cz>
parents:
271
diff
changeset
|
8 |
--attribute "name" string "m:name" \ |
a756214f1ee8
examples: Sane software manifesto statistics using XMLTable/XPath (indentation, resume)
František Kučera <franta-hg@frantovo.cz>
parents:
271
diff
changeset
|
9 |
--attribute "requirements" integer "count(descendant::m:item[m:type='requirement'])" \ |
271
a19312ab9db7
examples: Sane software manifesto statistics using XMLTable/XPath
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
10 |
--attribute "recommendations" integer "count(descendant::m:item[m:type='recommendation'])" \ |
272
a756214f1ee8
examples: Sane software manifesto statistics using XMLTable/XPath (indentation, resume)
František Kučera <franta-hg@frantovo.cz>
parents:
271
diff
changeset
|
11 |
--attribute "informations" integer "count(descendant::m:item[m:type='information'])" \ |
a756214f1ee8
examples: Sane software manifesto statistics using XMLTable/XPath (indentation, resume)
František Kučera <franta-hg@frantovo.cz>
parents:
271
diff
changeset
|
12 |
--attribute "items_total" integer "count(descendant::m:item)" \ |
271
a19312ab9db7
examples: Sane software manifesto statistics using XMLTable/XPath
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
13 |
> build/statistics.rp |
a19312ab9db7
examples: Sane software manifesto statistics using XMLTable/XPath
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
14 |
|
a19312ab9db7
examples: Sane software manifesto statistics using XMLTable/XPath
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
15 |
# Prints a table with number of items in particular chapters: |
a19312ab9db7
examples: Sane software manifesto statistics using XMLTable/XPath
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
16 |
statistics: build/statistics.rp |
a19312ab9db7
examples: Sane software manifesto statistics using XMLTable/XPath
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
17 |
cat build/statistics.rp | relpipe-out-tabular |
a19312ab9db7
examples: Sane software manifesto statistics using XMLTable/XPath
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
18 |
|
a19312ab9db7
examples: Sane software manifesto statistics using XMLTable/XPath
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
19 |
statistics-chart: build/statistics.rp |
a19312ab9db7
examples: Sane software manifesto statistics using XMLTable/XPath
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
20 |
cat build/statistics.rp | relpipe-tr-cut ".*" "(name|.*s)" | relpipe-out-gui -title "Sane software manifesto – chart of rule types" |