diff --git a/.github/workflows/create-markdown.yml b/.github/workflows/create-markdown.yml index 88e6e42..0dc9693 100644 --- a/.github/workflows/create-markdown.yml +++ b/.github/workflows/create-markdown.yml @@ -29,6 +29,9 @@ jobs: - name: Generate catalog run: cd docs ; groovy createCatalog.groovy > catalog.md ; groovy createIndex.groovy > index.md + - name: Generate persona pages + run: cd docs; groovy createPersona1.groovy > persona1.md ; groovy createPersona2.groovy > persona2.md ; groovy createPersona3.groovy > persona3.md + - name: Generate service pages run: cd docs/service ; groovy createMarkdown.groovy *.json @@ -39,6 +42,9 @@ jobs: git add docs/sitemap.xml git add docs/index.md git add docs/catalog.md + git add docs/persona1.md + git add docs/persona2.md + git add docs/persona3.md git add docs/service/*.md if git diff --exit-code --staged; then echo "No changes" diff --git a/docs/createPersona1.groovy b/docs/createPersona1.groovy new file mode 100644 index 0000000..a4a3034 --- /dev/null +++ b/docs/createPersona1.groovy @@ -0,0 +1,59 @@ +// License: MIT + +// groovy createMarkdown.groovy *.json + +import groovy.json.JsonSlurper +import groovy.io.FileType + +println """ +![https://vhp4safety.nl](VHP-LOGO-100mm-RGB.png "The VHP4Safety Project is a Dutch NWO-funded research collaboration") + +# VHP4Safety Cloud catalog - Persona 1 + + + +Below you find an overview of services available in the context of the VHP4Safety Platform. +[Additional services have been suggested](https://github.com/VHP4Safety/cloud/labels/service) +and users can [request additional services](https://github.com/VHP4Safety/cloud/issues/new/choose). +""" + +def list = [] + +def dir = new File("service") +dir.eachFileRecurse (FileType.FILES) { file -> + if (file.name.endsWith(".json") && file.name != "template.json") { + list << file + } +} + +list = list.sort() + +/* list.each { file -> + fileContents = file.text + def data = new JsonSlurper().parseText(fileContents) + print "[${data.service}](#${data.id}) " +} +println "\n" */ + +for (item in list) { + fileContents = item.text + def data = new JsonSlurper().parseText(fileContents) + if (data.VHPpersona) + if (data.VHPpersona.persona1 == "true") { + logo = "" + if (data.screenshot) logo = "![${data.service} logo](https://raw.githubusercontent.com/VHP4Safety/cloud/main/docs/service/${data.screenshot} \"Click on the image to go to the service\")\n" + println """------------------------------------------------------------------------------- + ${logo} + ## ${data.service} + + ${data.description} [[more info](service/${data.id}.md)] + + """ + } + } + +println """ +### Funding + +VHP4Safety – the Virtual Human Platform for safety assessment project [NWA 1292.19.272](https://www.nwo.nl/projecten/nwa129219272) is part of the NWA research program ‘Research along Routes by Consortia (ORC)’, which is funded by the Netherlands Organization for Scientific Research +(NWO). The project started on June 1, 2021 with a budget of over 10 million Euros and will last for the duration of 5 years.""" diff --git a/docs/createPersona2.groovy b/docs/createPersona2.groovy new file mode 100644 index 0000000..26db1ab --- /dev/null +++ b/docs/createPersona2.groovy @@ -0,0 +1,59 @@ +// License: MIT + +// groovy createMarkdown.groovy *.json + +import groovy.json.JsonSlurper +import groovy.io.FileType + +println """ +![https://vhp4safety.nl](VHP-LOGO-100mm-RGB.png "The VHP4Safety Project is a Dutch NWO-funded research collaboration") + +# VHP4Safety Cloud catalog - Persona 2 + + + +Below you find an overview of services available in the context of the VHP4Safety Platform. +[Additional services have been suggested](https://github.com/VHP4Safety/cloud/labels/service) +and users can [request additional services](https://github.com/VHP4Safety/cloud/issues/new/choose). +""" + +def list = [] + +def dir = new File("service") +dir.eachFileRecurse (FileType.FILES) { file -> + if (file.name.endsWith(".json") && file.name != "template.json") { + list << file + } +} + +list = list.sort() + +/* list.each { file -> + fileContents = file.text + def data = new JsonSlurper().parseText(fileContents) + print "[${data.service}](#${data.id}) " +} +println "\n" */ + +for (item in list) { + fileContents = item.text + def data = new JsonSlurper().parseText(fileContents) + if (data.VHPpersona) + if (data.VHPpersona.persona2 == "true") { + logo = "" + if (data.screenshot) logo = "![${data.service} logo](https://raw.githubusercontent.com/VHP4Safety/cloud/main/docs/service/${data.screenshot} \"Click on the image to go to the service\")\n" + println """------------------------------------------------------------------------------- + ${logo} + ## ${data.service} + + ${data.description} [[more info](service/${data.id}.md)] + + """ + } + } + +println """ +### Funding + +VHP4Safety – the Virtual Human Platform for safety assessment project [NWA 1292.19.272](https://www.nwo.nl/projecten/nwa129219272) is part of the NWA research program ‘Research along Routes by Consortia (ORC)’, which is funded by the Netherlands Organization for Scientific Research +(NWO). The project started on June 1, 2021 with a budget of over 10 million Euros and will last for the duration of 5 years.""" diff --git a/docs/createPersona3.groovy b/docs/createPersona3.groovy new file mode 100644 index 0000000..3c999fd --- /dev/null +++ b/docs/createPersona3.groovy @@ -0,0 +1,59 @@ +// License: MIT + +// groovy createMarkdown.groovy *.json + +import groovy.json.JsonSlurper +import groovy.io.FileType + +println """ +![https://vhp4safety.nl](VHP-LOGO-100mm-RGB.png "The VHP4Safety Project is a Dutch NWO-funded research collaboration") + +# VHP4Safety Cloud catalog - Persona 3 + + + +Below you find an overview of services available in the context of the VHP4Safety Platform. +[Additional services have been suggested](https://github.com/VHP4Safety/cloud/labels/service) +and users can [request additional services](https://github.com/VHP4Safety/cloud/issues/new/choose). +""" + +def list = [] + +def dir = new File("service") +dir.eachFileRecurse (FileType.FILES) { file -> + if (file.name.endsWith(".json") && file.name != "template.json") { + list << file + } +} + +list = list.sort() + +/* list.each { file -> + fileContents = file.text + def data = new JsonSlurper().parseText(fileContents) + print "[${data.service}](#${data.id}) " +} +println "\n" */ + +for (item in list) { + fileContents = item.text + def data = new JsonSlurper().parseText(fileContents) + if (data.VHPpersona) + if (data.VHPpersona.persona3 == "true") { + logo = "" + if (data.screenshot) logo = "![${data.service} logo](https://raw.githubusercontent.com/VHP4Safety/cloud/main/docs/service/${data.screenshot} \"Click on the image to go to the service\")\n" + println """------------------------------------------------------------------------------- + ${logo} + ## ${data.service} + + ${data.description} [[more info](service/${data.id}.md)] + + """ + } + } + +println """ +### Funding + +VHP4Safety – the Virtual Human Platform for safety assessment project [NWA 1292.19.272](https://www.nwo.nl/projecten/nwa129219272) is part of the NWA research program ‘Research along Routes by Consortia (ORC)’, which is funded by the Netherlands Organization for Scientific Research +(NWO). The project started on June 1, 2021 with a budget of over 10 million Euros and will last for the duration of 5 years.""" diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index 8b61c64..0000000 --- a/docs/index.html +++ /dev/null @@ -1,37 +0,0 @@ - - -
-some more info
- - - - - - -