Skip to content

Commit

Permalink
Delete testservice and groovy json LAX parser
Browse files Browse the repository at this point in the history
  • Loading branch information
youphendriks committed Sep 16, 2024
1 parent 47ec28c commit b3a47bc
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 439 deletions.
2 changes: 1 addition & 1 deletion createSitemap.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ list = list.sort()
list.each { file ->
fileContents = file.text
//def data = new JsonSlurper().parseText(fileContents)
def data = new JsonSlurper().parseText(fileContents).setType(JsonParserType.LAX)
def data = new JsonSlurper().parseText(fileContents)
println """<url>
<loc>https://cloud.vhp4safety.nl/service/${data.id}.html</loc>
<priority>1.00</priority>
Expand Down
3 changes: 1 addition & 2 deletions docs/createCatalog.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ println "\n" */

list.each { file ->
fileContents = file.text
def data = new JsonSlurper().parseText(fileContents).setType(JsonParserType.LAX)
//def data = new JsonSlurper().parseText(fileContents)
def data = new JsonSlurper().parseText(fileContents)
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 """-------------------------------------------------------------------------------
Expand Down
3 changes: 1 addition & 2 deletions docs/createIndex.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ list = list.sort()

list.each { file ->
fileContents = file.text
//def data = new JsonSlurper().parseText(fileContents)
def data = new JsonSlurper().parseText(fileContents).setType(JsonParserType.LAX)
def data = new JsonSlurper().parseText(fileContents)
logo = ""
if (data.instance && (data.instance.type == "VHP4Safety") && (data.instance["vhp-platform"] == "Development")) {
if (data.screenshot) logo = "<img width=\"150\" align=\"right\"\n alt=\"screenshot of the service\" \n src=\"service/${data.screenshot}\">"
Expand Down
2 changes: 1 addition & 1 deletion docs/service/createMarkdown.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def processRich(line, data, selector, expanding) {
args.each { dataFile ->
if (dataFile != "template.json") {
fileContents = new File(dataFile).text
def data = new JsonSlurper().parseText(fileContents).setType(JsonParserType.LAX)
def data = new JsonSlurper().parseText(fileContents)

outputFile = new File(data.id + ".md")
outputFile.text = ""
Expand Down
Loading

0 comments on commit b3a47bc

Please sign in to comment.