Merge pull request #338 from Luis-Fernando-Molina/in-app-documentation

Many bugs fixed including files with bad names
This commit is contained in:
Luis Fernando Molina authored and GitHub committed 2021-01-11 21:26:16 +01:00
commit 243573c73b
56 files changed
+481 -447

No files matched your search

+21 -7
View File
@@ -313,7 +313,7 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE
let project = requestParameters[3]
let filePath = global.env.PATH_TO_PROJECTS + '/' + project + '/Schemas/Docs-Nodes'
checkAllSchmemaDocuments(docsSchema, filePath)
checkAllSchmemaDocuments('Node', docsSchema, filePath)
respondWithContent(JSON.stringify(global.DEFAULT_OK_RESPONSE), httpResponse)
} catch (err) {
@@ -340,7 +340,7 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE
let project = requestParameters[3]
let filePath = global.env.PATH_TO_PROJECTS + '/' + project + '/Schemas/Docs-Concepts'
checkAllSchmemaDocuments(docsSchema, filePath)
checkAllSchmemaDocuments('Concept', docsSchema, filePath)
respondWithContent(JSON.stringify(global.DEFAULT_OK_RESPONSE), httpResponse)
} catch (err) {
@@ -367,7 +367,7 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE
let project = requestParameters[3]
let filePath = global.env.PATH_TO_PROJECTS + '/' + project + '/Schemas/Docs-Topics'
checkAllSchmemaDocuments(docsSchema, filePath)
checkAllSchmemaDocuments('Topic', docsSchema, filePath)
respondWithContent(JSON.stringify(global.DEFAULT_OK_RESPONSE), httpResponse)
} catch (err) {
@@ -394,7 +394,7 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE
let project = requestParameters[3]
let filePath = global.env.PATH_TO_PROJECTS + '/' + project + '/Schemas/Docs-Tutorials'
checkAllSchmemaDocuments(docsSchema, filePath)
checkAllSchmemaDocuments('Tutorial', docsSchema, filePath)
respondWithContent(JSON.stringify(global.DEFAULT_OK_RESPONSE), httpResponse)
} catch (err) {
@@ -421,7 +421,7 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE
let project = requestParameters[3]
let filePath = global.env.PATH_TO_PROJECTS + '/' + project + '/Schemas/Docs-Books'
checkAllSchmemaDocuments(docsSchema, filePath)
checkAllSchmemaDocuments('Book', docsSchema, filePath)
respondWithContent(JSON.stringify(global.DEFAULT_OK_RESPONSE), httpResponse)
} catch (err) {
@@ -441,7 +441,7 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE
}
}
function checkAllSchmemaDocuments(docsSchema, filePath) {
function checkAllSchmemaDocuments(category, docsSchema, filePath) {
const fs = require('fs')
for (let i = 0; i < docsSchema.length; i++) {
@@ -450,6 +450,20 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE
for (let j = 0; j < 10; j++) {
fileName = cleanFileName(fileName)
}
let pageNumber = '00' + schemaDocument.pageNumber
switch (category) {
case 'Topic': {
fileName = schemaDocument.topic.toLowerCase() + '-' + pageNumber.substring(pageNumber.length - 3, pageNumber.length) + '-' + schemaDocument.type.toLowerCase()
fileName = cleanFileName(fileName)
break
}
case 'Tutorial': {
fileName = schemaDocument.tutorial.toLowerCase() + '-' + pageNumber.substring(pageNumber.length - 3, pageNumber.length) + '-' + schemaDocument.type.toLowerCase()
fileName = cleanFileName(fileName)
break
}
}
fileName = fileName + '.json'
if (schemaDocument.deleted === true) {
@@ -465,7 +479,7 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE
if (schemaDocument.updated === true || schemaDocument.created === true) {
try {
let created = schemaDocument.created
let updated = schemaDocument.updated
let updated = schemaDocument.updated
schemaDocument.updated = undefined
schemaDocument.created = undefined
let fileContent = JSON.stringify(schemaDocument, undefined, 4)
@@ -1,24 +0,0 @@
{
"topic": "Docs Paragraph Styles",
"pageNumber": "21",
"type": "Docs Anchor Style",
"definition": {
"text": "Amchor paragraphs are used together with the Docs Goto Command. When you want to generate a Docs Link to an specific part of a Docs Page, you first need to create an Anchor paragraph in order to be able to create the link to that part of the page.",
"updated": 1609258745310
},
"paragraphs": [
{
"style": "Text",
"text": "To correctly define an Anchor Paragraph, you need to follow the following syntax:",
"updated": 1610387812416
},
{
"style": "Javascript",
"text": "Anchor Name"
},
{
"style": "List",
"text": "Anchor Name: This refers to any name that you would like to give to the newly created Anchor. The name must be unique within the page."
}
]
}
@@ -0,0 +1,44 @@
{
"topic": "Docs Commands",
"pageNumber": "7",
"type": "Docs Repaginate Command",
"definition": {
"text": "When you add a Docs Topic Page or a Docs Tutorial Page, you define the page number for it, that is will ultimately defines the position of the page within that topic or tutorial table of contents. The technique to add a page in-between other pages is to use decimal values. After that you can use the Repaginate command in order to recalculate all page numbers and leave the whole set with integer numbers.",
"updated": 1610392867410
},
"paragraphs": [
{
"style": "Title",
"text": "Syntax",
"updated": 1610393031768
},
{
"style": "Javascript",
"text": "docs.repaginate Category from Project: Topic or Tutorial name."
},
{
"style": "Title",
"text": "Properties"
},
{
"style": "List",
"text": "Category: It must be either Topic or Tutorial."
},
{
"style": "List",
"text": "Project: Any existing already integrated project."
},
{
"style": "List",
"text": "Topic or Tutorial name: The name given tu the Topic or Tutorial that you want to repaginate."
},
{
"style": "Title",
"text": "Example"
},
{
"style": "Javascript",
"text": "docs.repaginate Topic from Superalgos: Docs Commands"
}
]
}
@@ -1,6 +1,6 @@
{
"topic": "Docs Commands Errors",
"pageNumber": "1",
"pageNumber": 1,
"type": "Docs Error Intro",
"definition": {
"text": "While executing a command, you might receive different types of error messanges. These are described below. ",
@@ -1,6 +1,6 @@
{
"topic": "Docs Commands Errors",
"pageNumber": "2",
"pageNumber": 2,
"type": "Docs Error Too Few Parameters",
"definition": {
"text": "While executing a command, you might receive different types of error messanges. These are described below. ",
@@ -39,6 +39,14 @@
{
"style": "List",
"text": "Docs Delete Command"
},
{
"style": "List",
"text": "Docs Delete Command"
},
{
"style": "List",
"text": "Docs Repaginate Command"
}
]
}
@@ -1,6 +1,6 @@
{
"topic": "Docs Commands Errors",
"pageNumber": "3",
"pageNumber": 3,
"type": "Docs Error Project Does Not Exist",
"definition": {
"text": "While executing a command, you might receive different types of error messanges. These are described below. ",
@@ -37,6 +37,10 @@
{
"style": "List",
"text": "Docs Delete Command"
},
{
"style": "List",
"text": "Docs Repaginate Command"
}
]
}
@@ -1,6 +1,6 @@
{
"topic": "Docs Commands Errors",
"pageNumber": "4",
"pageNumber": 4,
"type": "Docs Error Category Not Valid",
"definition": {
"text": "While executing a command, you might receive different types of error messanges. These are described below. ",
@@ -39,6 +39,14 @@
{
"style": "List",
"text": "Docs Delete Command"
},
{
"style": "List",
"text": "Docs Delete Command"
},
{
"style": "List",
"text": "Docs Repaginate Command"
}
]
}
@@ -1,6 +1,6 @@
{
"topic": "Docs Commands Errors",
"pageNumber": "5",
"pageNumber": 5,
"type": "Docs Error Page Not Found",
"definition": {
"text": "While executing a command, you might receive different types of error messanges. These are described below. ",
@@ -1,6 +1,6 @@
{
"topic": "Docs Commands Errors",
"pageNumber": "6",
"pageNumber": 6,
"type": "Docs Error Page With No Paragraphs",
"definition": {
"text": "While executing a command, you might receive different types of error messanges. These are described below. ",
@@ -1,6 +1,6 @@
{
"topic": "Docs Commands Errors",
"pageNumber": "7",
"pageNumber": 7,
"type": "Docs Error Only In English",
"definition": {
"text": "Command not available because you are not set in English language.",
@@ -1,6 +1,6 @@
{
"topic": "Docs Commands Errors",
"pageNumber": "8",
"pageNumber": 8,
"type": "Docs Error Missing Colon",
"definition": {
"text": "You forgot the colon character \":\" that is part of the syntax of the command. ",
@@ -34,6 +34,14 @@
{
"style": "List",
"text": "Docs Delete Command"
},
{
"style": "List",
"text": "Docs Delete Command"
},
{
"style": "List",
"text": "Docs Repaginate Command"
}
]
}
@@ -1,6 +1,6 @@
{
"topic": "Docs Commands Errors",
"pageNumber": "9",
"pageNumber": 9,
"type": "Docs Error Missing To",
"definition": {
"text": "The word \"to\" is part of the syntax of the command and you did not include it.",
@@ -1,6 +1,6 @@
{
"topic": "Docs Commands Errors",
"pageNumber": "10",
"pageNumber": 10,
"type": "Docs Error Missing From",
"definition": {
"text": "The word \"from\" is part of the syntax of the command and it is missing.",
@@ -28,6 +28,14 @@
{
"style": "List",
"text": "Docs Delete Command"
},
{
"style": "List",
"text": "Docs Delete Command"
},
{
"style": "List",
"text": "Docs Repaginate Command"
}
]
}
@@ -1,6 +1,6 @@
{
"topic": "Docs Commands Errors",
"pageNumber": "11",
"pageNumber": 11,
"type": "Docs Error Changes Not Saved",
"definition": {
"text": "It was not possible to save your changes.",
@@ -1,6 +1,6 @@
{
"topic": "Docs Commands Errors",
"pageNumber": "12",
"pageNumber": 12,
"type": "Docs Error Page Already Exists",
"definition": {
"text": "The page you are trying to add already exists at Docs.",
@@ -1,6 +1,6 @@
{
"topic": "Docs Commands Errors",
"pageNumber": "13",
"pageNumber": 13,
"type": "Docs Error Page Does Not Exist",
"definition": {
"text": "The page you are trying to delete does not exist.",
@@ -1,6 +1,6 @@
{
"topic": "Docs Commands Errors",
"pageNumber": "14",
"pageNumber": 14,
"type": "Docs Error Page Number Mismatch",
"definition": {
"text": "The Docs Page Number provided does not match with the Docs Page Number found at the page you want to delete. ",
@@ -1,6 +1,6 @@
{
"topic": "Docs Commands Errors",
"pageNumber": "15",
"pageNumber": 15,
"type": "Docs Error Topic Mismatch",
"definition": {
"text": "The Docs Topic Name provided does not match with the Docs Topic Name found at the page you want to delete.",
@@ -1,6 +1,6 @@
{
"topic": "Docs Commands Errors",
"pageNumber": "16",
"pageNumber": 16,
"type": "Docs Error Tutorial Mismatch",
"definition": {
"text": "The Docs Tutorial Name provided does not match with the Docs Tutorial Name found at the page you want to delete.",
@@ -1,6 +1,6 @@
{
"topic": "Docs Commands Messages",
"pageNumber": "1",
"pageNumber": 1,
"type": "Docs Message Saving Succeed",
"definition": {
"text": "The docs.save command you executed was successful and all changes have been saved at the Superalgos Client.",
@@ -1,6 +1,6 @@
{
"topic": "Docs Commands Messages",
"pageNumber": "2",
"pageNumber": 2,
"type": "Docs Message Reindexing Started",
"definition": {
"text": "The docs.reindex command you executed succesfully started the rebuing of the Docs Search Engine Index.",
@@ -9,8 +9,8 @@
"paragraphs": [
{
"style": "Success",
"text": "This is a very resourse intensive process. While this happens you will not be able to move arround since all the CPU resources are being used to recreate the index as fast as possible. The size of your workspace impacts the time to reindex the content since every node in it is scanned and all its config and code are indexed. So hold on for a few minutes until the process finishes. Once it does, we will take you to a page that informs you of the result of the process.",
"updated": 1609783508213
"text": "This is a very resourse intensive process. While this happens you will not be able to move arround since all the CPU resources are being used to recreate the index as fast as possible. The size of your workspace impacts the time to reindex the content since every node in it is scanned and all it's config and code are indexed. So hold on for a few minutes until the process finishes. Once it does, we will take you to a page that informs you of the result of the process.",
"updated": 1610353170958
}
]
}
@@ -1,6 +1,6 @@
{
"topic": "Docs Commands Messages",
"pageNumber": "3",
"pageNumber": 3,
"type": "Docs Message Reindexing Succeed",
"definition": {
"text": "The docs.reindex command you executed succesfully rebuilt the Docs Search Engine Index.",
@@ -1,16 +1,16 @@
{
"topic": "Docs Commands Messages",
"pageNumber": "4",
"pageNumber": 4,
"type": "Docs Message Deleting Succeed",
"definition": {
"text": "The docs.delete command you executed successfuly delete the page you requested.",
"updated": 1609783558007
"text": "The docs.delete command you executed successfuly deleted the page you requested.",
"updated": 1610292270590
},
"paragraphs": [
{
"style": "Success",
"text": "The page was removed from the in-memory collection of pages, but it is still indexed at the Docs Search Engine Index, and it still exist on disk. To remove it from the index you need to execute docs.reindex and to remove it from disk, you need to execute docs.save. ",
"updated": 1609783652507
"style": "Important",
"text": "The page was flagged to be deleted. It will be removed from the in-memory collection of pages once you run the Docs Save Command. Even after that it will still be indexed at the Docs Search Engine Index. To remove it from the index you need to execute Docs Reindex Command. The Docs Save Command will instruct the Client to delete it from it's disk.",
"updated": 1610292163004
}
]
}
@@ -0,0 +1,16 @@
{
"topic": "Docs Commands Messages",
"pageNumber": 5,
"type": "Docs Message Repagination Succeed",
"definition": {
"text": "The docs.repaginate command you executed successfuly.",
"updated": 1610292270590
},
"paragraphs": [
{
"style": "Important",
"text": "To complete this procedure, you need to manually delete from disk all the files of the Topic / Tutorial you just repaginated, and execute the Docs Save Command to save the in-memory updated pages.",
"updated": 1610292163004
}
]
}
@@ -1,16 +0,0 @@
{
"topic": "Docs Commands Messages",
"pageNumber": "3",
"type": "Docs Message Deleting Succeed",
"definition": {
"text": "The docs.delete command you executed successfuly deleted the page you requested.",
"updated": 1610292270590
},
"paragraphs": [
{
"style": "Important",
"text": "The page was flagged to be deleted. It will be removed from the in-memory collection of pages once you run the Docs Save Command. Even after that it will still be indexed at the Docs Search Engine Index. To remove it from the index you need to execute Docs Reindex Command. The Docs Save Command will instruct the Client to delete it from it's disk.",
"updated": 1610292163004
}
]
}
@@ -1,16 +0,0 @@
{
"topic": "Docs Commands Messages",
"pageNumber": "2",
"type": "Docs Message Reindexing Started",
"definition": {
"text": "The docs.reindex command you executed succesfully started the rebuing of the Docs Search Engine Index.",
"updated": 1609783396612
},
"paragraphs": [
{
"style": "Success",
"text": "This is a very resourse intensive process. While this happens you will not be able to move arround since all the CPU resources are being used to recreate the index as fast as possible. The size of your workspace impacts the time to reindex the content since every node in it is scanned and all it's config and code are indexed. So hold on for a few minutes until the process finishes. Once it does, we will take you to a page that informs you of the result of the process.",
"updated": 1610353170958
}
]
}
@@ -1,6 +1,6 @@
{
"topic": "Docs Paragraph Styles",
"pageNumber": "1",
"pageNumber": 1,
"type": "Docs Text Style",
"definition": {
"text": "The text style is the one used for content without any particular style applied."
@@ -1,6 +1,6 @@
{
"topic": "Docs Paragraph Styles",
"pageNumber": "2",
"pageNumber": 2,
"type": "Docs Title Style",
"definition": {
"text": "Use this style to render titles on the docs page."
@@ -1,6 +1,6 @@
{
"topic": "Docs Paragraph Styles",
"pageNumber": "3",
"pageNumber": 3,
"type": "Docs Subtitle Style",
"definition": {
"text": "This is simply the way to show subtitles within a docs page."
@@ -1,6 +1,6 @@
{
"topic": "Docs Paragraph Styles",
"pageNumber": "4",
"pageNumber": 4,
"type": "Docs Note Style",
"definition": {
"text": "This style will render in a blue box with the word note as a prefix."
@@ -1,6 +1,6 @@
{
"topic": "Docs Paragraph Styles",
"pageNumber": "5",
"pageNumber": 5,
"type": "Docs Warning Style",
"definition": {
"text": "Use this style for boxing text as a warning to readers."
@@ -1,6 +1,6 @@
{
"topic": "Docs Paragraph Styles",
"pageNumber": "6",
"pageNumber": 6,
"type": "Docs Important Style",
"definition": {
"text": "Use this style to communicate a tip or something important to the reader."
@@ -1,6 +1,6 @@
{
"topic": "Docs Paragraph Styles",
"pageNumber": "7",
"pageNumber": 7,
"type": "Docs Error Style",
"definition": {
"text": "This style is used by the system itself to show you when you entered incorrect parameters for some styles. You can use this style as well to show readers errors in the context of what you are explaining to them."
@@ -1,6 +1,6 @@
{
"topic": "Docs Paragraph Styles",
"pageNumber": "8",
"pageNumber": 8,
"type": "Docs Success Style",
"definition": {
"text": "This style will render the text inside a success box."
@@ -1,6 +1,6 @@
{
"topic": "Docs Paragraph Styles",
"pageNumber": "9",
"pageNumber": 9,
"type": "Docs List Style",
"definition": {
"text": "This style will render the text as an item of a bullet point list."
@@ -1,6 +1,6 @@
{
"topic": "Docs Paragraph Styles",
"pageNumber": "10",
"pageNumber": 10,
"type": "Docs Callout Style",
"definition": {
"text": "A callout paragraph is used to call the attention of readers."
@@ -1,6 +1,6 @@
{
"topic": "Docs Paragraph Styles",
"pageNumber": "11",
"pageNumber": 11,
"type": "Docs Summary Style",
"definition": {
"text": "Summary paragraphs are usually used at the begining of a page, like in this one."
@@ -1,6 +1,6 @@
{
"topic": "Docs Paragraph Styles",
"pageNumber": "12",
"pageNumber": 12,
"type": "Docs JS Code Style",
"definition": {
"text": "Use this style to correctly format javascript code."
@@ -1,6 +1,6 @@
{
"topic": "Docs Paragraph Styles",
"pageNumber": "13",
"pageNumber": 13,
"type": "Docs JSON Code Style",
"definition": {
"text": "Use this style to format JSON code, such as the one in configs."
@@ -1,6 +1,6 @@
{
"topic": "Docs Paragraph Styles",
"pageNumber": "14",
"pageNumber": 14,
"type": "Docs Table Style",
"definition": {
"text": "It is possible to render table in docs pages. To do so you just need to follow some formatting rules."
@@ -1,6 +1,6 @@
{
"topic": "Docs Paragraph Styles",
"pageNumber": "15",
"pageNumber": 15,
"type": "Docs Hierarchy Style",
"definition": {
"text": "It is possible to inject into a docs page, a hierarchy of nodes, starting on a node specified and letting the system to figure out which are it's decendents."
@@ -1,6 +1,6 @@
{
"topic": "Docs Paragraph Styles",
"pageNumber": "16",
"pageNumber": 16,
"type": "Docs Web Page Link Style",
"definition": {
"text": "Applying this style to a paragraph is the way to create a link to an external website."
@@ -1,6 +1,6 @@
{
"topic": "Docs Paragraph Styles",
"pageNumber": "17",
"pageNumber": 17,
"type": "Docs YouTube Video Style",
"definition": {
"text": "It is possible to embed YouTube videos at a Docs page. All you need to know is to copy and pate the YouTube video id into a paragraph with Youtube style."
@@ -1,6 +1,6 @@
{
"topic": "Docs Paragraph Styles",
"pageNumber": "18",
"pageNumber": 18,
"type": "Docs Gif Style",
"definition": {
"text": "It is possible to embed gifs at a Docs page. "
@@ -1,6 +1,6 @@
{
"topic": "Docs Paragraph Styles",
"pageNumber": "19",
"pageNumber": 19,
"type": "Docs Png Style",
"definition": {
"text": "It is possible to embed PNGs images into a Docs page."
@@ -1,6 +1,6 @@
{
"topic": "Docs Paragraph Styles",
"pageNumber": "20",
"pageNumber": 20,
"type": "Docs Section Style",
"definition": {
"text": "Use this style to divide big areas of a page into different sections.",
@@ -1,6 +1,6 @@
{
"topic": "Docs Paragraph Styles",
"pageNumber": "21",
"pageNumber": 21,
"type": "Docs Anchor Style",
"definition": {
"text": "Amchor paragraphs are used together with the Docs Goto Command. When you want to generate a Docs Link to an specific part of a Docs Page, you first need to create an Anchor paragraph in order to be able to create the link to that part of the page.",
@@ -9,8 +9,8 @@
"paragraphs": [
{
"style": "Text",
"text": "To correctly ddefine an Anchor Paragraph, you need to follow the following syntax:",
"updated": 1609259277591
"text": "To correctly define an Anchor Paragraph, you need to follow the following syntax:",
"updated": 1610387812416
},
{
"style": "Javascript",
@@ -1,6 +1,6 @@
{
"topic": "Docs Paragraph Styles",
"pageNumber": "22",
"pageNumber": 22,
"type": "Docs Block Style",
"definition": {
"text": "Block paragraphs defines set of paragraphs that can be inclided from other pages. When you include a block by creating a Docs Include Style paragraph, you need to reference a Block paragraph created at the page that have the set of paragraphs to be inclided. A Block contains all the paragraph after itself until the next Block or the end of the page.",
@@ -1,6 +1,6 @@
{
"topic": "Docs Paragraph Styles",
"pageNumber": "23",
"pageNumber": 23,
"type": "Docs Include Style",
"definition": {
"text": "Include paragraphs are used to include into a Docs Page paragraphs that belong to other Docs Pages. In order to do that, you need to reference a Docs Block Style paragraph located in some other Docs Page.",
@@ -1,6 +1,6 @@
{
"topic": "Docs Paragraph Styles",
"pageNumber": "24",
"pageNumber": 24,
"type": "Docs Chapter Style",
"definition": {
"text": "This style is used in Docs Books to define a new chapeter for that book. The style renders in the book's page the index of the Docs Topics referenced.",
@@ -1,6 +1,6 @@
{
"topic": "Masters",
"pageNumber": "1",
"topic": "Masters Data Mine",
"pageNumber": 1,
"type": "Bollinger Bands (BB - %B)",
"definition": {
"text": "The indicator produces the Bollinger Bands (BB) and Percentage Bandwith (%B), both in standard settings.",
@@ -0,0 +1,96 @@
{
"topic": "Masters Data Mine",
"pageNumber": 2,
"type": "Bollinger Channels",
"definition": {
"text": "The indicator produces the Bollinger Channels and Bollinger Subchannels products.",
"updated": 1610385654126
},
"paragraphs": [
{
"style": "Title",
"text": "On the Charts",
"updated": 1610385639559
},
{
"style": "Subtitle",
"text": "Bollinger Channels"
},
{
"style": "Text",
"text": "This is a non-standard indicator derived from the Bollinger Bands. These types of channels are calculated using the Bollinger Bands moving average. Essentially an upward channel begins when the moving average changes direction from going down to going up, and the channel finishes when it turns from going up to down. A downward channel starts when the Bollinger Band moving average turns from going up to down, and it finishes when it starts going up again. Upward channels are plotted in green, while downward channels in red. Additional information can be found at the indicator’s panel, like the number of periods contained at the channel."
},
{
"style": "Gif",
"text": "GIFs/Superalgos/Docs/indicators/masters-bots-layers-07-bollinger-channels.gif",
"updated": 1610385920623
},
{
"style": "Anchor",
"text": "Bollinger Sub-Channels"
},
{
"style": "Subtitle",
"text": "Bollinger Sub-Channels"
},
{
"style": "Text",
"text": "If we consider that one Bollinger Channel can have sub-channels in the same direction (up or down) but different slopes, then we get to the concept of Bollinger Sub-Channels. The most important property of a sub-channel is its slope. The possible values are Side, Gentle, Medium, High and Extreme. With this information, a trading bot could easily ask if it is in a sub-channel with a certain slope and for how many periods. The slope or inclination of the moving average may be an indication of momentum."
},
{
"style": "Gif",
"text": "GIFs/Superalgos/Docs/indicators/masters-bots-layers-08-bollinger-subchannels.gif",
"updated": 1610385965423
},
{
"style": "Title",
"text": "Products & Properties"
},
{
"style": "Subtitle",
"text": "Bollinger Channels"
},
{
"style": "Text",
"text": "The product bollingerChannel features two different properties that you may use."
},
{
"style": "Table",
"text": "| Product Name | Product Variable\t| Property Variables |\n| Bollinger Channels | bollingerChannel | direction, period |",
"updated": 1610385740520
},
{
"style": "List",
"text": "bollingerChannel.direction: Possible values are \"Down\", \"Up\", and \"Side\"."
},
{
"style": "List",
"text": "bollingerChannel.period: The number of periods the channel spans at the moment the variable is being read. For instance, if a channel spans 10 candles and the variable is checked on the fourth candle, then bollingerChannel.period = 4. Put in other words, it is the current span of the channel."
},
{
"style": "Subtitle",
"text": "Bollinger SubChannels"
},
{
"style": "Text",
"text": "The product bollingerSubChannel features three different properties that you may use."
},
{
"style": "Table",
"text": "| Product Name | Product Variable | Property Variables |\n| Bollinger SubChannels | bollingerSubChannel | direction, period, slope |",
"updated": 1610385815244
},
{
"style": "List",
"text": "bollingerSubChannel.direction: Possible values are \"Down\", \"Up\", and \"Side\"."
},
{
"style": "List",
"text": "bollingerSubChannel.period: The number of periods the subchannel spans at the moment the variable is being read. For instance, if a subchannel spans 10 candles and the variable is checked on the fourth candle, then bollingerChannel.period = 4. Put in other words, it is the current span of the subchannel."
},
{
"style": "List",
"text": "bollingerSubChannel.slope: Indicates how steep the slope of the subchannel is. Possible values are \"Side\", \"Gentle\", \"Medium\", \"Steep\", \"Extreme\" (in order from lowest to highest)."
}
]
}
@@ -85,6 +85,7 @@ function newSuperalgosDocsCommmandInterface() {
if (checkGotoCommand() === undefined) { return }
if (checkAddCommand() === undefined) { return }
if (checkDeleteCommand() === undefined) { return }
if (checkRepaginateCommand() === undefined) { return }
if (checkUReIndexCommand() === undefined) { return }
if (checkUSaveCommand() === undefined) { return }
@@ -317,6 +318,68 @@ function newSuperalgosDocsCommmandInterface() {
}
}
function checkRepaginateCommand() {
if (UI.projects.superalgos.spaces.docsSpace.commandInterface.command.toLowerCase() === 'docs.help docs.repaginate') {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Repaginate Command')
return
}
if (UI.projects.superalgos.spaces.docsSpace.commandInterface.command.indexOf('Docs.Repaginate') !== 0 && UI.projects.superalgos.spaces.docsSpace.commandInterface.command.indexOf('docs.repaginate') !== 0) { return 'Not Repaginate Command' }
let splittedCommand = UI.projects.superalgos.spaces.docsSpace.commandInterface.command.split(': ')
if (splittedCommand[1] === undefined) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error Missing Colon', 'Anchor Missing Colon')
return
}
let primaryCommand = splittedCommand[0]
let secondaryCommand = splittedCommand[1]
let splittedPrimaryCommand = primaryCommand.split(' ')
if (splittedPrimaryCommand[0].toLowerCase() === 'docs.repaginate') {
if (splittedPrimaryCommand[2] !== 'from') {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error Missing From', 'Anchor Missing From')
return
}
if (splittedPrimaryCommand.length < 4) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error Too Few Parameters', 'Anchor Too Few Paramenters')
return
}
if (secondaryCommand === '') {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error Category Not Valid', 'Anchor Category Not Valid')
return
}
switch (splittedPrimaryCommand[1].toLowerCase()) {
case 'node': {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error Category Not Valid', 'Anchor Category Not Valid')
return
}
case 'concept': {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error Category Not Valid', 'Anchor Category Not Valid')
return
}
case 'topic': {
repaginate(splittedPrimaryCommand[3], 'Topic', secondaryCommand)
return
}
case 'tutorial': {
repaginate(splittedPrimaryCommand[3], 'Tutorial', secondaryCommand)
return
}
case 'book': {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error Category Not Valid', 'Anchor Category Not Valid')
return
}
default: {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error Category Not Valid', 'Anchor Category Not Valid')
return
}
}
}
}
function checkUReIndexCommand() {
if (UI.projects.superalgos.spaces.docsSpace.commandInterface.command.toLowerCase() === 'docs.help docs.reindex') {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Reindex Command')
@@ -327,10 +390,10 @@ function newSuperalgosDocsCommmandInterface() {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Message Reindexing Started')
setTimeout(startReindexingProcess, 100)
function startReindexingProcess(){
function startReindexingProcess() {
UI.projects.superalgos.spaces.docsSpace.setUpWorkspaceSchemas()
UI.projects.superalgos.spaces.docsSpace.searchEngine.setUpSearchEngine()
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Message Reindexing Succeed')
}
}
@@ -475,6 +538,43 @@ function newSuperalgosDocsCommmandInterface() {
}
}
function repaginate(project, category, query) {
if (SCHEMAS_BY_PROJECT.get(project) === undefined) {
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error Project Does Not Exist', 'Anchor Project Does Not Exist')
return
}
let orderedArray = UI.projects.superalgos.utilities.docs.buildOrderedPageIndex(
project,
category,
query
)
let pageNumber = 1
for (let i = 0; i < orderedArray.length; i++) {
schemaDocument = orderedArray[i]
switch (category) {
case 'Topic': {
if (schemaDocument.topic === query) {
schemaDocument.pageNumber = pageNumber
pageNumber++
schemaDocument.updated = true
}
break
}
case 'Tutorial': {
if (schemaDocument.tutorial === query) {
schemaDocument.pageNumber = pageNumber
pageNumber++
schemaDocument.updated = true
}
break
}
}
}
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Message Repagination Succeed')
}
function addNode(project, type) {
let template = {
created: true,
@@ -167,9 +167,11 @@ function newSuperalgosDocsDocumentPage() {
if (UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.category === 'Topic') {
buildOrderedTopicPageIndex(thisObject.docsSchemaDocument.topic)
orderedTopicPageIndexArray = UI.projects.superalgos.utilities.docs.buildOrderedPageIndex(
UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project,
'Topic',
thisObject.docsSchemaDocument.topic
)
/* Topic Title
@@ -192,7 +194,11 @@ function newSuperalgosDocsDocumentPage() {
if (UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.category === 'Tutorial') {
buildOrderedTutorialPageIndex(thisObject.docsSchemaDocument.tutorial)
orderedTutorialPageIndexArray = UI.projects.superalgos.utilities.docs.buildOrderedPageIndex(
UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project,
'Tutorial',
thisObject.docsSchemaDocument.tutorial
)
/* Tutorial Title
titleLabel = thisObject.docsSchemaDocument.tutorial + ' Tutorial Navigation'
@@ -273,34 +279,6 @@ function newSuperalgosDocsDocumentPage() {
}
function buildOrderedTopicPageIndex(topic) {
orderedTopicPageIndexArray = []
let schemaArray = SCHEMAS_BY_PROJECT.get(UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project).array.docsTopicSchema
for (let i = 0; i < schemaArray.length; i++) {
let arrayItem = schemaArray[i]
if (arrayItem.topic === topic) {
let itemAdded = false
if (orderedTopicPageIndexArray.length === 0) {
orderedTopicPageIndexArray.push(arrayItem)
itemAdded = true
} else {
for (let j = 0; j < orderedTopicPageIndexArray.length; j++) {
let orderedArrayItem = orderedTopicPageIndexArray[j]
if (Number(arrayItem.pageNumber) < Number(orderedArrayItem.pageNumber)) {
orderedTopicPageIndexArray.splice(j, 0, arrayItem)
itemAdded = true
break
}
}
}
if (itemAdded === false) {
orderedTopicPageIndexArray.push(arrayItem)
}
}
}
}
function generateTopicPreviousAndNextPageNavigation() {
let previousPage
let nextPage
@@ -350,34 +328,6 @@ function newSuperalgosDocsDocumentPage() {
}
function buildOrderedTutorialPageIndex(tutorial) {
orderedTutorialPageIndexArray = []
let schemaArray = SCHEMAS_BY_PROJECT.get(UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project).array.docsTutorialSchema
for (let i = 0; i < schemaArray.length; i++) {
let arrayItem = schemaArray[i]
if (arrayItem.tutorial === tutorial) {
let itemAdded = false
if (orderedTutorialPageIndexArray.length === 0) {
orderedTutorialPageIndexArray.push(arrayItem)
itemAdded = true
} else {
for (let j = 0; j < orderedTutorialPageIndexArray.length; j++) {
let orderedArrayItem = orderedTutorialPageIndexArray[j]
if (Number(arrayItem.pageNumber) < Number(orderedArrayItem.pageNumber)) {
orderedTutorialPageIndexArray.splice(j, 0, arrayItem)
itemAdded = true
break
}
}
}
if (itemAdded === false) {
orderedTutorialPageIndexArray.push(arrayItem)
}
}
}
}
function generateTutorialPreviousAndNextPageNavigation() {
let previousPage
let nextPage
@@ -587,7 +537,11 @@ function newSuperalgosDocsDocumentPage() {
switch (category) {
case 'Topic': {
buildOrderedTopicPageIndex(chapterName)
orderedTopicPageIndexArray = UI.projects.superalgos.utilities.docs.buildOrderedPageIndex(
UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project,
'Topic',
chapterName
)
if (orderedTopicPageIndexArray.length === 0) {
return 'Chapter paragraph style Syntax Error. The Topic <i>' + chapterName + '</i> could not be found. Check the Docs Chapter Style Syntax. This error message will dissapear as soon as you fix the problem.'
@@ -595,7 +549,11 @@ function newSuperalgosDocsDocumentPage() {
break
}
case 'Tutorial': {
buildOrderedTutorialPageIndex(chapterName)
orderedTutorialPageIndexArray = UI.projects.superalgos.utilities.docs.buildOrderedPageIndex(
UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project,
'Tutorial',
chapterName
)
if (orderedTutorialPageIndexArray.length === 0) {
return 'Chapter paragraph style Syntax Error. The Tutorial <i>' + chapterName + '</i> could not be found. Check the Docs Chapter Style Syntax. This error message will dissapear as soon as you fix the problem.'
@@ -63,7 +63,7 @@ function newSuperalgosDocsFooter() {
HTML = HTML + '<strong>1. </strong>Switch to your language.<br/>'
HTML = HTML + '<strong>2. </strong>Edit any English content (title, paragraph, etc.) with your translation.<br/>'
HTML = HTML + '<strong>3. </strong>Save changes typing <code class="docs-code">docs.save</code> in the search/command box.<br/>'
HTML = HTML + '<strong>4. </strong>Update your fork and submit a PR.<br/>'
HTML = HTML + '<strong>4. </strong>Type <code class="docs-code">app.contribute</code> to update your fork and submit a PR.<br/>'
HTML = HTML + '</ol>'
HTML = HTML + '</div>'
HTML = HTML + '</div>'
+90 -264
View File
@@ -1,5 +1,6 @@
function newSuperalgosUtilitiesDocs() {
thisObject = {
buildOrderedPageIndex: buildOrderedPageIndex,
addWarningIfTranslationIsOutdated: addWarningIfTranslationIsOutdated,
getTextBasedOnLanguage: getTextBasedOnLanguage,
setTextBasedOnLanguage: setTextBasedOnLanguage,
@@ -26,6 +27,57 @@ function newSuperalgosUtilitiesDocs() {
return thisObject
function buildOrderedPageIndex(project, category, query) {
let array = []
let schemaArray
switch (category) {
case 'Topic': {
schemaArray = SCHEMAS_BY_PROJECT.get(project).array.docsTopicSchema
break
}
case 'Tutorial': {
schemaArray = SCHEMAS_BY_PROJECT.get(project).array.docsTutorialSchema
break
}
}
for (let i = 0; i < schemaArray.length; i++) {
let arrayItem = schemaArray[i]
switch (category) {
case 'Topic': {
if (arrayItem.topic !== query) { continue }
break
}
case 'Tutorial': {
if (arrayItem.tutorial !== query) { continue }
break
}
}
let itemAdded = false
if (array.length === 0) {
array.push(arrayItem)
itemAdded = true
} else {
for (let j = 0; j < array.length; j++) {
let orderedArrayItem = array[j]
if (Number(arrayItem.pageNumber) < Number(orderedArrayItem.pageNumber)) {
array.splice(j, 0, arrayItem)
itemAdded = true
break
}
}
}
if (itemAdded === false) {
array.push(arrayItem)
}
}
return array
}
function addWarningIfTranslationIsOutdated(paragraph) {
if (paragraph === undefined) { return '' }
if (paragraph.updated === undefined) { return '' }
@@ -534,294 +586,69 @@ function newSuperalgosUtilitiesDocs() {
/* Private Functions follow */
function tagDefinedTypes(text, excludedType) {
const MAX_NUMBER_OF_WORDS = 10
let cleanText = text.replace(/'/g, ' AMPERSAND ') // scaping ampersands, separating them from other words
.replaceAll('<', ' < ')
.replaceAll('>', ' > ')
.replaceAll(':', ' : ')
.replaceAll(',', ' , ')
.replaceAll('.', ' . ')
let words = cleanText.split(' ')
let taggedText = ''
for (let i = 0; i < words.length; i++) {
let phrase1 = words[i]
let phrase2 = words[i] + ' ' + words[i + 1]
let phrase3 = words[i] + ' ' + words[i + 1] + ' ' + words[i + 2]
let phrase4 = words[i] + ' ' + words[i + 1] + ' ' + words[i + 2] + ' ' + words[i + 3]
let phrase5 = words[i] + ' ' + words[i + 1] + ' ' + words[i + 2] + ' ' + words[i + 3] + ' ' + words[i + 4]
let cleanPhrase1 = cleanPhrase(phrase1)
let cleanPhrase2 = cleanPhrase(phrase2)
let cleanPhrase3 = cleanPhrase(phrase3)
let cleanPhrase4 = cleanPhrase(phrase4)
let cleanPhrase5 = cleanPhrase(phrase5)
let phrases = []
let cleanPhrases = []
let phrase = ''
for (let j = 0; j < MAX_NUMBER_OF_WORDS; j++) {
phrase = phrase + ' ' + words[i + j]
phrase = phrase.trim()
phrases.push(phrase)
cleanPhrases.push(cleanPhrase(phrase))
}
let found = false
for (let j = 0; j < PROJECTS_ARRAY.length; j++) {
let project = PROJECTS_ARRAY[j]
for (let j = MAX_NUMBER_OF_WORDS - 1; j >= 0; j--) {
for (let p = 0; p < PROJECTS_ARRAY.length; p++) {
let project = PROJECTS_ARRAY[p]
/* Search in docsNodeSchema */
if (SCHEMAS_BY_PROJECT.get(project).map.docsNodeSchema.get(cleanPhrase5) !== undefined) {
if (cleanPhrase5 !== excludedType) {
taggedText = taggedText + phrase5.replace(cleanPhrase5, TAGGING_STRING_SEPARATOR + 'Node' + '|' + cleanPhrase5 + '|' + project + TAGGING_STRING_SEPARATOR) + ' '
} else {
taggedText = taggedText + phrase5 + ' '
}
i = i + 4
found = true
break
}
if (SCHEMAS_BY_PROJECT.get(project).map.docsNodeSchema.get(cleanPhrase4) !== undefined) {
if (cleanPhrase4 !== excludedType) {
taggedText = taggedText + phrase4.replace(cleanPhrase4, TAGGING_STRING_SEPARATOR + 'Node' + '|' + cleanPhrase4 + '|' + project + TAGGING_STRING_SEPARATOR) + ' '
} else {
taggedText = taggedText + phrase4 + ' '
}
i = i + 3
found = true
break
}
if (SCHEMAS_BY_PROJECT.get(project).map.docsNodeSchema.get(cleanPhrase3) !== undefined) {
if (cleanPhrase3 !== excludedType) {
taggedText = taggedText + phrase3.replace(cleanPhrase3, TAGGING_STRING_SEPARATOR + 'Node' + '|' + cleanPhrase3 + '|' + project + TAGGING_STRING_SEPARATOR) + ' '
} else {
taggedText = taggedText + phrase3 + ' '
}
i = i + 2
found = true
break
}
if (SCHEMAS_BY_PROJECT.get(project).map.docsNodeSchema.get(cleanPhrase2) !== undefined) {
if (cleanPhrase2 !== excludedType) {
taggedText = taggedText + phrase2.replace(cleanPhrase2, TAGGING_STRING_SEPARATOR + 'Node' + '|' + cleanPhrase2 + '|' + project + TAGGING_STRING_SEPARATOR) + ' '
} else {
taggedText = taggedText + phrase2 + ' '
}
i = i + 1
found = true
break
}
if (SCHEMAS_BY_PROJECT.get(project).map.docsNodeSchema.get(cleanPhrase1) !== undefined) {
if (cleanPhrase1 !== excludedType) {
taggedText = taggedText + phrase1.replace(cleanPhrase1, TAGGING_STRING_SEPARATOR + 'Node' + '|' + cleanPhrase1 + '|' + project + TAGGING_STRING_SEPARATOR) + ' '
} else {
taggedText = taggedText + phrase1 + ' '
}
found = true
break
}
searchInSchema(SCHEMAS_BY_PROJECT.get(project).map.docsNodeSchema)
searchInSchema(SCHEMAS_BY_PROJECT.get(project).map.docsConceptSchema)
searchInSchema(SCHEMAS_BY_PROJECT.get(project).map.docsTopicSchema)
searchInSchema(SCHEMAS_BY_PROJECT.get(project).map.docsTutorialSchema)
searchInSchema(SCHEMAS_BY_PROJECT.get(project).map.docsBookSchema)
/* Search in docsConceptSchema */
if (SCHEMAS_BY_PROJECT.get(project).map.docsConceptSchema.get(cleanPhrase5) !== undefined) {
if (cleanPhrase5 !== excludedType) {
taggedText = taggedText + phrase5.replace(cleanPhrase5, TAGGING_STRING_SEPARATOR + 'Concept' + '|' + cleanPhrase5 + '|' + project + TAGGING_STRING_SEPARATOR) + ' '
} else {
taggedText = taggedText + phrase5 + ' '
}
i = i + 4
found = true
break
}
if (SCHEMAS_BY_PROJECT.get(project).map.docsConceptSchema.get(cleanPhrase4) !== undefined) {
if (cleanPhrase4 !== excludedType) {
taggedText = taggedText + phrase4.replace(cleanPhrase4, TAGGING_STRING_SEPARATOR + 'Concept' + '|' + cleanPhrase4 + '|' + project + TAGGING_STRING_SEPARATOR) + ' '
} else {
taggedText = taggedText + phrase4 + ' '
}
i = i + 3
found = true
break
}
if (SCHEMAS_BY_PROJECT.get(project).map.docsConceptSchema.get(cleanPhrase3) !== undefined) {
if (cleanPhrase3 !== excludedType) {
taggedText = taggedText + phrase3.replace(cleanPhrase3, TAGGING_STRING_SEPARATOR + 'Concept' + '|' + cleanPhrase3 + '|' + project + TAGGING_STRING_SEPARATOR) + ' '
} else {
taggedText = taggedText + phrase3 + ' '
}
i = i + 2
found = true
break
}
if (SCHEMAS_BY_PROJECT.get(project).map.docsConceptSchema.get(cleanPhrase2) !== undefined) {
if (cleanPhrase2 !== excludedType) {
taggedText = taggedText + phrase2.replace(cleanPhrase2, TAGGING_STRING_SEPARATOR + 'Concept' + '|' + cleanPhrase2 + '|' + project + TAGGING_STRING_SEPARATOR) + ' '
} else {
taggedText = taggedText + phrase2 + ' '
}
i = i + 1
found = true
break
}
if (SCHEMAS_BY_PROJECT.get(project).map.docsConceptSchema.get(cleanPhrase1) !== undefined) {
if (cleanPhrase1 !== excludedType) {
taggedText = taggedText + phrase1.replace(cleanPhrase1, TAGGING_STRING_SEPARATOR + 'Concept' + '|' + cleanPhrase1 + '|' + project + TAGGING_STRING_SEPARATOR) + ' '
} else {
taggedText = taggedText + phrase1 + ' '
}
found = true
break
}
function searchInSchema(docSchema) {
if (found === true) { return }
/* Search in docsTopicSchema */
if (SCHEMAS_BY_PROJECT.get(project).map.docsTopicSchema.get(cleanPhrase5) !== undefined) {
if (cleanPhrase5 !== excludedType) {
taggedText = taggedText + phrase5.replace(cleanPhrase5, TAGGING_STRING_SEPARATOR + 'Topic' + '|' + cleanPhrase5 + '|' + project + TAGGING_STRING_SEPARATOR) + ' '
} else {
taggedText = taggedText + phrase5 + ' '
if (docSchema.get(cleanPhrases[j]) !== undefined) {
if (cleanPhrases[j] !== excludedType) {
taggedText = taggedText + phrases[j].replace(
cleanPhrases[j],
TAGGING_STRING_SEPARATOR + 'Node' + '|' + cleanPhrases[j] + '|' + project + TAGGING_STRING_SEPARATOR) + ' '
} else {
taggedText = taggedText + phrases[j] + ' '
}
i = i + j
found = true
return
}
}
i = i + 4
found = true
break
}
if (SCHEMAS_BY_PROJECT.get(project).map.docsTopicSchema.get(cleanPhrase4) !== undefined) {
if (cleanPhrase4 !== excludedType) {
taggedText = taggedText + phrase4.replace(cleanPhrase4, TAGGING_STRING_SEPARATOR + 'Topic' + '|' + cleanPhrase4 + '|' + project + TAGGING_STRING_SEPARATOR) + ' '
} else {
taggedText = taggedText + phrase4 + ' '
}
i = i + 3
found = true
break
}
if (SCHEMAS_BY_PROJECT.get(project).map.docsTopicSchema.get(cleanPhrase3) !== undefined) {
if (cleanPhrase3 !== excludedType) {
taggedText = taggedText + phrase3.replace(cleanPhrase3, TAGGING_STRING_SEPARATOR + 'Topic' + '|' + cleanPhrase3 + '|' + project + TAGGING_STRING_SEPARATOR) + ' '
} else {
taggedText = taggedText + phrase3 + ' '
}
i = i + 2
found = true
break
}
if (SCHEMAS_BY_PROJECT.get(project).map.docsTopicSchema.get(cleanPhrase2) !== undefined) {
if (cleanPhrase2 !== excludedType) {
taggedText = taggedText + phrase2.replace(cleanPhrase2, TAGGING_STRING_SEPARATOR + 'Topic' + '|' + cleanPhrase2 + '|' + project + TAGGING_STRING_SEPARATOR) + ' '
} else {
taggedText = taggedText + phrase2 + ' '
}
i = i + 1
found = true
break
}
if (SCHEMAS_BY_PROJECT.get(project).map.docsTopicSchema.get(cleanPhrase1) !== undefined) {
if (cleanPhrase1 !== excludedType) {
taggedText = taggedText + phrase1.replace(cleanPhrase1, TAGGING_STRING_SEPARATOR + 'Topic' + '|' + cleanPhrase1 + '|' + project + TAGGING_STRING_SEPARATOR) + ' '
} else {
taggedText = taggedText + phrase1 + ' '
}
found = true
break
}
/* Search in docsTutorialSchema */
if (SCHEMAS_BY_PROJECT.get(project).map.docsTutorialSchema.get(cleanPhrase5) !== undefined) {
if (cleanPhrase5 !== excludedType) {
taggedText = taggedText + phrase5.replace(cleanPhrase5, TAGGING_STRING_SEPARATOR + 'Tutorial' + '|' + cleanPhrase5 + '|' + project + TAGGING_STRING_SEPARATOR) + ' '
} else {
taggedText = taggedText + phrase5 + ' '
}
i = i + 4
found = true
break
}
if (SCHEMAS_BY_PROJECT.get(project).map.docsTutorialSchema.get(cleanPhrase4) !== undefined) {
if (cleanPhrase4 !== excludedType) {
taggedText = taggedText + phrase4.replace(cleanPhrase4, TAGGING_STRING_SEPARATOR + 'Tutorial' + '|' + cleanPhrase4 + '|' + project + TAGGING_STRING_SEPARATOR) + ' '
} else {
taggedText = taggedText + phrase4 + ' '
}
i = i + 3
found = true
break
}
if (SCHEMAS_BY_PROJECT.get(project).map.docsTutorialSchema.get(cleanPhrase3) !== undefined) {
if (cleanPhrase3 !== excludedType) {
taggedText = taggedText + phrase3.replace(cleanPhrase3, TAGGING_STRING_SEPARATOR + 'Tutorial' + '|' + cleanPhrase3 + '|' + project + TAGGING_STRING_SEPARATOR) + ' '
} else {
taggedText = taggedText + phrase3 + ' '
}
i = i + 2
found = true
break
}
if (SCHEMAS_BY_PROJECT.get(project).map.docsTutorialSchema.get(cleanPhrase2) !== undefined) {
if (cleanPhrase2 !== excludedType) {
taggedText = taggedText + phrase2.replace(cleanPhrase2, TAGGING_STRING_SEPARATOR + 'Tutorial' + '|' + cleanPhrase2 + '|' + project + TAGGING_STRING_SEPARATOR) + ' '
} else {
taggedText = taggedText + phrase2 + ' '
}
i = i + 1
found = true
break
}
if (SCHEMAS_BY_PROJECT.get(project).map.docsTutorialSchema.get(cleanPhrase1) !== undefined) {
if (cleanPhrase1 !== excludedType) {
taggedText = taggedText + phrase1.replace(cleanPhrase1, TAGGING_STRING_SEPARATOR + 'Tutorial' + '|' + cleanPhrase1 + '|' + project + TAGGING_STRING_SEPARATOR) + ' '
} else {
taggedText = taggedText + phrase1 + ' '
}
found = true
break
}
/* Search in docsBookSchema */
if (SCHEMAS_BY_PROJECT.get(project).map.docsBookSchema.get(cleanPhrase5) !== undefined) {
if (cleanPhrase5 !== excludedType) {
taggedText = taggedText + phrase5.replace(cleanPhrase5, TAGGING_STRING_SEPARATOR + 'Book' + '|' + cleanPhrase5 + '|' + project + TAGGING_STRING_SEPARATOR) + ' '
} else {
taggedText = taggedText + phrase5 + ' '
}
i = i + 4
found = true
break
}
if (SCHEMAS_BY_PROJECT.get(project).map.docsBookSchema.get(cleanPhrase4) !== undefined) {
if (cleanPhrase4 !== excludedType) {
taggedText = taggedText + phrase4.replace(cleanPhrase4, TAGGING_STRING_SEPARATOR + 'Book' + '|' + cleanPhrase4 + '|' + project + TAGGING_STRING_SEPARATOR) + ' '
} else {
taggedText = taggedText + phrase4 + ' '
}
i = i + 3
found = true
break
}
if (SCHEMAS_BY_PROJECT.get(project).map.docsBookSchema.get(cleanPhrase3) !== undefined) {
if (cleanPhrase3 !== excludedType) {
taggedText = taggedText + phrase3.replace(cleanPhrase3, TAGGING_STRING_SEPARATOR + 'Book' + '|' + cleanPhrase3 + '|' + project + TAGGING_STRING_SEPARATOR) + ' '
} else {
taggedText = taggedText + phrase3 + ' '
}
i = i + 2
found = true
break
}
if (SCHEMAS_BY_PROJECT.get(project).map.docsBookSchema.get(cleanPhrase2) !== undefined) {
if (cleanPhrase2 !== excludedType) {
taggedText = taggedText + phrase2.replace(cleanPhrase2, TAGGING_STRING_SEPARATOR + 'Book' + '|' + cleanPhrase2 + '|' + project + TAGGING_STRING_SEPARATOR) + ' '
} else {
taggedText = taggedText + phrase2 + ' '
}
i = i + 1
found = true
break
}
if (SCHEMAS_BY_PROJECT.get(project).map.docsBookSchema.get(cleanPhrase1) !== undefined) {
if (cleanPhrase1 !== excludedType) {
taggedText = taggedText + phrase1.replace(cleanPhrase1, TAGGING_STRING_SEPARATOR + 'Book' + '|' + cleanPhrase1 + '|' + project + TAGGING_STRING_SEPARATOR) + ' '
} else {
taggedText = taggedText + phrase1 + ' '
}
found = true
break
}
}
if (found === false) {
taggedText = taggedText + phrase1 + ' '
taggedText = taggedText + phrases[0] + ' '
}
}
taggedText = taggedText.replaceAll(' AMPERSAND ', '\'')
.replaceAll(' < ', '<')
.replaceAll(' > ', '>')
.replaceAll(' : ', ':')
.replaceAll(' . ', '.')
.replaceAll(' , ', ',')
return taggedText
}
@@ -830,7 +657,6 @@ function newSuperalgosUtilitiesDocs() {
.replace(';', '')
.replace('(', '')
.replace(')', '')
.replace('-', '')
.replace('_', '')
.replace('.', '')
.replace('[', '')