diff --git a/by_json/filters/patron_types b/by_json/filters/patron_types index a8413d3..2fc3376 100644 --- a/by_json/filters/patron_types +++ b/by_json/filters/patron_types @@ -1,5 +1,6 @@ .[] | { pid, name, + description, organisation: .organisation."$ref" } diff --git a/by_json/process_pt.sh b/by_json/process_pt.sh index f708f97..3bb174d 100644 --- a/by_json/process_pt.sh +++ b/by_json/process_pt.sh @@ -11,7 +11,10 @@ while read pt do pid=$(echo $pt|jq -r .pid) name=$(echo $pt|jq -r .name) + # fix problems with '<' and '>' in descriptions + description=$(echo $pt|jq -r .description|sed -e 's//\>/g') orga=$(echo $pt|jq -r .organisation) + # write result in output identifier="Type${pid}" label="$(render templates/label_patron_types.tmpl)" diff --git a/by_json/templates/label_patron_types.tmpl b/by_json/templates/label_patron_types.tmpl index cb390d3..1968a71 100644 --- a/by_json/templates/label_patron_types.tmpl +++ b/by_json/templates/label_patron_types.tmpl @@ -1 +1,2 @@ -<${name}
PID: ${pid}> +<${name}
${description}
+PID: ${pid}>