Skip to content

Commit

Permalink
Revert change to indexer
Browse files Browse the repository at this point in the history
  • Loading branch information
KamasamaK committed Mar 8, 2024
1 parent 21c467f commit 0cab15c
Showing 1 changed file with 16 additions and 17 deletions.
33 changes: 16 additions & 17 deletions utilities/indexer.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,6 @@
<cfset categories = []>
<cfset versions = {"4"=[], "4.5"=[],"5"=[],"6"=[],"7"=[],"8"=[],"9"=[],"10"=[],"11"=[],"2016"=[],"2018"=[],"2021"=[],"2023"=[]}>
<cfset lucee_versions = {"5"=[],"6"=[]}>

<cfloop array="#structKeyArray(versions)#" index="v">
<cfset vData = {"name"="ColdFusion #v# New Functions and Tags","type"="listing","description"="List of tags and functions added in ColdFusion #v#", "related"=versions[v]}>
<cfset arraySort(vData.related, "text")>
<cfset fileName = "cf#reReplace(v, "[^0-9]", "", "ALL")#.json">
<cfset fileWrite("#dataDir#/#fileName#", prettyJSON(serializeJSON(vData), "utf-8"))>
<p>Wrote <cfoutput>#fileName#</cfoutput></p>
</cfloop>

<cfloop array="#structKeyArray(lucee_versions)#" index="v">
<cfset vData = {"name"="Lucee #v# New Functions and Tags","type"="listing","description"="List of tags and functions added in Lucee #v#", "related"=lucee_versions[v]}>
<cfset arraySort(vData.related, "text")>
<cfset fileName = "lucee#reReplace(v, "[^0-9]", "", "ALL")#.json">
<cfset fileWrite("#dataDir#/#fileName#", prettyJSON(serializeJSON(vData), "utf-8"))>
<p>Wrote <cfoutput>#fileName#</cfoutput></p>
</cfloop>

<cfloop array="#directoryList(dataDir, false, "array")#" index="filePath">
<cfset json = fileRead(filePath,"utf-8")>
<cftry>
Expand Down Expand Up @@ -113,6 +96,22 @@
<cfset fileWrite(dataDir & "/guides.json", prettyJSON(serializeJSON(gData), "utf-8"))>
<p>Wrote guides.json</p>

<cfloop array="#structKeyArray(versions)#" index="v">
<cfset vData = {"name"="ColdFusion #v# New Functions and Tags","type"="listing","description"="List of tags and functions added in ColdFusion #v#", "related"=versions[v]}>
<cfset arraySort(vData.related, "text")>
<cfset fileName = "cf#reReplace(v, "[^0-9]", "", "ALL")#.json">
<cfset fileWrite("#dataDir#/#fileName#", prettyJSON(serializeJSON(vData), "utf-8"))>
<p>Wrote <cfoutput>#fileName#</cfoutput></p>
</cfloop>

<cfloop array="#structKeyArray(lucee_versions)#" index="v">
<cfset vData = {"name"="Lucee #v# New Functions and Tags","type"="listing","description"="List of tags and functions added in Lucee #v#", "related"=lucee_versions[v]}>
<cfset arraySort(vData.related, "text")>
<cfset fileName = "lucee#reReplace(v, "[^0-9]", "", "ALL")#.json">
<cfset fileWrite("#dataDir#/#fileName#", prettyJSON(serializeJSON(vData), "utf-8"))>
<p>Wrote <cfoutput>#fileName#</cfoutput></p>
</cfloop>

<cfset applicationStop()>
<p>Stopped application so it can reinit</p>

Expand Down

0 comments on commit 0cab15c

Please sign in to comment.