Skip to content

Commit

Permalink
add rounded size table output to combine script
Browse files Browse the repository at this point in the history
  • Loading branch information
KonradHoeffner committed Mar 22, 2024
1 parent 734b69d commit 8e23709
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions scripts/combine
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ rapper -i turtle -o ntriples hito.ttl > hito.nt

echo "hito.ttl and hito.nt contain the HITO ontology, instances and SHACL shapes."
printf "all.ttl additionally contains externally referenced resources from DBpedia and the Software Ontology (SWO).\n\n"

if type awk > /dev/null 2>&1; then
echo "| Filename | bytes | KiB | MiB | KB | MB |"
echo "| -------- | ----- | --- | --- | -- | -- |"
# "command ls" in case it is aliased to eza or something else, we need the exact ls output format
LC_ALL=C command ls -l *.nt *.ttl | awk '{printf("|%11s |%10s |%9s |%9s |%9s |%9s |\n", $9, $5, $5/1024, $5/1024^2, $5/1000, $5/1000^2)}'
fi

printf "\n## Rounded\n\n"
echo "| Filename | triples | bytes | KiB | MiB | KB | MB |"
echo "| --------- | ------- | ----- | --- | --- | -- | -- |"
# "command ls" in case it is aliased to eza or something else, we need the exact ls output format
Expand Down

0 comments on commit 8e23709

Please sign in to comment.