author | František Kučera <franta-hg@frantovo.cz> |
Sat, 21 Sep 2019 01:12:49 +0200 | |
branch | v_0 |
changeset 20 | fb939d9baaf4 |
parent 18 | f315b3d27a9d |
child 25 | 8da11cce2c98 |
permissions | -rw-r--r-- |
15
96fc2f42b1e1
conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
1 |
# Sane Software Manifesto helper tools |
96fc2f42b1e1
conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
2 |
# Copyright © 2019 František Kučera (Frantovo.cz, GlobalCode.info) |
96fc2f42b1e1
conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
3 |
# |
96fc2f42b1e1
conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
4 |
# This program is free software: you can redistribute it and/or modify |
96fc2f42b1e1
conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
5 |
# it under the terms of the GNU General Public License as published by |
96fc2f42b1e1
conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
6 |
# the Free Software Foundation, version 3. |
96fc2f42b1e1
conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
7 |
# |
96fc2f42b1e1
conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
8 |
# This program is distributed in the hope that it will be useful, |
96fc2f42b1e1
conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
9 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
96fc2f42b1e1
conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
10 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
96fc2f42b1e1
conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
11 |
# GNU General Public License for more details. |
96fc2f42b1e1
conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
12 |
# |
96fc2f42b1e1
conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
13 |
# You should have received a copy of the GNU General Public License |
96fc2f42b1e1
conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
14 |
# along with this program. If not, see <https://www.gnu.org/licenses/>. |
96fc2f42b1e1
conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
15 |
|
96fc2f42b1e1
conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
16 |
validate: |
96fc2f42b1e1
conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
17 |
xmllint --noout --schema ssm.xsd ssm.en.xml |
96fc2f42b1e1
conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
18 |
xhtml: |
96fc2f42b1e1
conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
19 |
xsltproc --output ssm.en.xhtml --nonet ssm.xsl ssm.en.xml |
96fc2f42b1e1
conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
20 |
|
96fc2f42b1e1
conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
21 |
clean: |
96fc2f42b1e1
conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
22 |
rm -f ssm.en.xhtml |
18 | 23 |
|
24 |
publish: |
|
25 |
scp ssm.en.xhtml globalcode.info:/var/www/sane-software.globalcode.info/v_0/index.xhtml |
|
26 |
scp style.css globalcode.info:/var/www/sane-software.globalcode.info/v_0/ |
|
20
fb939d9baaf4
make: statistics (just for fun)
František Kučera <franta-hg@frantovo.cz>
parents:
18
diff
changeset
|
27 |
|
fb939d9baaf4
make: statistics (just for fun)
František Kučera <franta-hg@frantovo.cz>
parents:
18
diff
changeset
|
28 |
|
fb939d9baaf4
make: statistics (just for fun)
František Kučera <franta-hg@frantovo.cz>
parents:
18
diff
changeset
|
29 |
# Prints a table with number of items in particular chapters: |
fb939d9baaf4
make: statistics (just for fun)
František Kučera <franta-hg@frantovo.cz>
parents:
18
diff
changeset
|
30 |
statistics: |
fb939d9baaf4
make: statistics (just for fun)
František Kučera <franta-hg@frantovo.cz>
parents:
18
diff
changeset
|
31 |
cat ssm.en.xml \ |
fb939d9baaf4
make: statistics (just for fun)
František Kučera <franta-hg@frantovo.cz>
parents:
18
diff
changeset
|
32 |
| relpipe-in-xmltable \ |
fb939d9baaf4
make: statistics (just for fun)
František Kučera <franta-hg@frantovo.cz>
parents:
18
diff
changeset
|
33 |
--namespace "m" "tag:globalcode.info,2019:sane-software/manifesto" \ |
fb939d9baaf4
make: statistics (just for fun)
František Kučera <franta-hg@frantovo.cz>
parents:
18
diff
changeset
|
34 |
--relation "chapter" \ |
fb939d9baaf4
make: statistics (just for fun)
František Kučera <franta-hg@frantovo.cz>
parents:
18
diff
changeset
|
35 |
--records "//m:chapter" \ |
fb939d9baaf4
make: statistics (just for fun)
František Kučera <franta-hg@frantovo.cz>
parents:
18
diff
changeset
|
36 |
--attribute "name" string "m:name" \ |
fb939d9baaf4
make: statistics (just for fun)
František Kučera <franta-hg@frantovo.cz>
parents:
18
diff
changeset
|
37 |
--attribute "item_count" integer "count(descendant::m:item)" \ |
fb939d9baaf4
make: statistics (just for fun)
František Kučera <franta-hg@frantovo.cz>
parents:
18
diff
changeset
|
38 |
| relpipe-out-tabular |
fb939d9baaf4
make: statistics (just for fun)
František Kučera <franta-hg@frantovo.cz>
parents:
18
diff
changeset
|
39 |
# try also relpipe-out-gui to get the chart |