make: statistics (just for fun) v_0
authorFrantišek Kučera <franta-hg@frantovo.cz>
Sat, 21 Sep 2019 01:12:49 +0200
branchv_0
changeset 20 fb939d9baaf4
parent 19 c28f759961c7
child 21 2c064ad964cd
make: statistics (just for fun) generates output: chapter: ╭──────────────────────────────────┬──────────────────────╮ │ name (string) │ item_count (integer) │ ├──────────────────────────────────┼──────────────────────┤ │ Free software │ 7 │ │ Documented │ 5 │ │ Semantic versioning │ 5 │ │ Compatible with itself │ 6 │ │ Compatible with others │ 6 │ │ Modular architecture │ 4 │ │ Extensible │ 7 │ │ Testable │ 4 │ │ Safe code and sustainability │ 6 │ │ Small code footprint │ 3 │ │ Sane dependencies │ 10 │ │ Easily auditable │ 3 │ │ Reproducible builds │ 2 │ │ Trustworthy packages and sources │ 6 │ │ Network interactions │ 4 │ │ Localized/internationalized │ 11 │ │ Communication channels │ 23 │ │ Accept contributions │ 13 │ │ Open development – has public: │ 4 │ ╰──────────────────────────────────┴──────────────────────╯ Record count: 19
Makefile
--- a/Makefile	Sat Sep 21 00:41:54 2019 +0200
+++ b/Makefile	Sat Sep 21 01:12:49 2019 +0200
@@ -24,3 +24,16 @@
 publish:
 	scp ssm.en.xhtml globalcode.info:/var/www/sane-software.globalcode.info/v_0/index.xhtml
 	scp style.css    globalcode.info:/var/www/sane-software.globalcode.info/v_0/
+
+
+# Prints a table with number of items in particular chapters:
+statistics:
+	cat ssm.en.xml \
+	    | relpipe-in-xmltable \
+		--namespace "m" "tag:globalcode.info,2019:sane-software/manifesto" \
+		--relation "chapter" \
+		    --records "//m:chapter" \
+		    --attribute "name" string "m:name" \
+		    --attribute "item_count" integer "count(descendant::m:item)" \
+	    | relpipe-out-tabular
+# try also relpipe-out-gui to get the chart