2020-02-06 11:04:27 +00:00
|
|
|
#!/usr/bin/env bash
|
2020-02-06 13:12:25 +00:00
|
|
|
#
|
2020-02-07 13:27:29 +00:00
|
|
|
# Generate a dot file to create graph of RERO-ils data
|
2020-02-06 13:12:25 +00:00
|
|
|
#
|
2020-02-06 11:04:27 +00:00
|
|
|
|
2020-02-07 09:04:48 +00:00
|
|
|
# Usage:
|
2020-02-07 13:27:29 +00:00
|
|
|
# bash gen_orgas.sh output.dot
|
2020-02-07 09:04:48 +00:00
|
|
|
# where `output.dot` is the output file that permit to generate a graph.
|
|
|
|
# To generate the graph:
|
|
|
|
# dot -Tsvg output.dot -o organisations.svg
|
|
|
|
# where `output.dot` is the previous file. And `organisations.svg` the final schema you want to display.
|
|
|
|
|
2020-02-07 11:34:49 +00:00
|
|
|
# Load commons variables, functions and statements
|
|
|
|
source commons.sh
|
|
|
|
|
|
|
|
# Graph header
|
|
|
|
title="Link between organisations, libraries and users."
|
2020-02-07 11:20:33 +00:00
|
|
|
save "templates/header.tmpl"
|
2020-02-06 11:04:27 +00:00
|
|
|
|
|
|
|
# ORGANISATIONS
|
2020-02-07 13:27:29 +00:00
|
|
|
source process_orgas.sh
|
2020-02-06 11:04:27 +00:00
|
|
|
|
|
|
|
# LIBRARIES
|
2020-02-07 13:27:29 +00:00
|
|
|
source process_lib.sh
|
2020-02-06 11:04:27 +00:00
|
|
|
|
2020-02-07 09:44:20 +00:00
|
|
|
# PATRON_TYPES
|
2020-02-07 13:27:29 +00:00
|
|
|
source process_pt.sh
|
2020-02-07 09:44:20 +00:00
|
|
|
|
2020-02-06 11:04:27 +00:00
|
|
|
# USERS
|
2020-02-07 13:27:29 +00:00
|
|
|
source process_users.sh
|
2020-02-06 11:04:27 +00:00
|
|
|
|
2020-02-07 11:34:49 +00:00
|
|
|
# Graph footer
|
2020-02-07 11:20:33 +00:00
|
|
|
save "templates/footer.tmpl"
|
2020-02-06 11:04:27 +00:00
|
|
|
|
|
|
|
# END of program
|
|
|
|
exit 0
|