/* * mMcsNew.mjs - it creates a-new file HitpMcs-senso-concept * The MIT License (MIT) * * Copyright (c) 2017-2026 Kaseluris.Nikos.1959 (hmnSngu) * kaseluris.nikos@gmail.com * https://synagonism.net/ * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * DOING: it creates a-new file senso-concept McsDir000000.last.html * - updates aPages.json * - creates McsDir000000.txt * - indexes new file * - uploads new and modified files * INPUT: * OUTPUT: McsDir000000.last.html * RUN: node Mcsmgr/mMcsNew.mjs pwd * * ISSUE: IF you want to recreate the-file, * you have to delete IT from aPages.json */ import moFs from 'fs' import * as moUtil from './mUtil.mjs' import {fNamidx} from './mNamidx.mjs' import {fSftp} from './mSftp.mjs' const // contains the-versions of mHitp.js aVersion = [ 'mMcsNew.mjs.1-3-11.2026-05-02: .specific', 'mMcsNew.mjs.1-3-10.2026-04-28: validator pass', 'mMcsNew.mjs.1-3-9.2026-04-12: Mcsmgr/sftp.json', 'mMcsNew.mjs.1-3-8.2026-04-11: script async', 'mMcsNew.mjs.1-3-7.2025-12-10: mMcsh2', 'mMcsNew.mjs.1-3-6.2024-07-04: parent-child-tree', 'mMcsNew.mjs.1-3-5.2024-02-27: parent-child-tree', 'mMcsNew.mjs.1-3-4.2023-12-12: title !=', 'mMcsNew.mjs.1-3-3.2023-12-12: title', 'mMcsNew.mjs.1-3-2.2023-11-29: evoluting-of', 'mMcsNew.mjs.1-3-1.2023-10-23: absolute-links', 'mMcsNew.mjs.1-3-0.2023-08-29: classification-trees', 'mMcsNew.mjs.1-2-0.2023-08-16: parent-child-tree', 'mMcsNew.mjs.1-1-3.2023-08-15: shorname!=name', 'mMcsNew.mjs.1-1-2.2022-07-30: filename on title', 'mMcsNew.mjs.1-1-1.2022-06-22: renamed to mMcsNew', 'mMcs.mjs.1-1-0.2022-01-09: filMcs to McsCor000002', 'mMcs.mjs.1-0-0.2021-12-12: ', 'version.0-15-0.2021-08-04: module rename from js-mcsAdd3.js', 'version.0-14-2.2020-12-04: no-steemit', 'version.0-14-1.2020-11-28: Infrsc', 'version.0-14-0.2020-07-05: hitp-files-local', 'version.0-13-0.2020-04-06: structure-doing', 'version.0-12-0.2020-02-19: whole-part-generic-tree', 'version.0-11-1.2020-02-19: whole-part-generic-tree', 'version.0-11-0.2020-01-12: versions', 'version.0-10-0.2019-12-28: generic-whole-trees', 'version.0-9-0.2019-12-25: whole-att', 'version.0-8-0.2019-12-23: entity-link', 'version.0-7-0.2019-09-06: comments on filMcsDirNam', 'version.0-6-4.2019-08-09: github', 'version.0-6-3.2019-07-30: idOverview', 'version.0-6-2.2019-06-29: misc', 'version.0-6-1.2019-05-05: misc', 'version.0-6-0.2018-06-29: disqus-dir', 'version.0-5-1.2018-03-17: filMcs', 'version.0-5-0.2018-02-18: steemit', 'version.0-4-0.2018-01-14: lower-case', 'version.0-3-0.2017-12-10: NameFileIdShort', 'version.0-2-1.2017-11-26: cpt.FilMcsId.last.html', 'version.0-1-3.2017-11-17: idHeadercrd', 'version.0-1-1.2017-09-27', 'version.0-1-0.2017-06-27' ] let n, s, //// INPUT VALUES //// //1. Add counter or not bCounter = true, //2. Directory of the-concept dirCor|dirEdu|dirHlth|dirHmn|dirLag|dirNtr| // dirOgm|dirStn|dirStnlaw|dirTch|dirTchCpgm|dirTchInf sDir = 'dirTchInf', //3. Name of the-title: Ethereum--blockchain-net sName = 'VSCode-command-ID', //4. SHORT-name: sysNet, ogn, DnChain, DnEth, Dchain-net, lagoSngu, sNameShort = 'VscCmdi', //5. Name for IDs, unique in this file: Net, Dtc, LTurk, SocGrca, sNameId = 'Vscodecmdid', sNameFile = '', sNameFileNaked = '', aPages, nFile = 0, sDirShort = sDir.substring(3) aPages = JSON.parse(moFs.readFileSync('../aPages.json')) // find file-name for (n = 0; n < aPages.length; n++) { //aPages contains the-counter files if (new RegExp('^Mcs'+sDirShort+'[0-9]+.txt').test(aPages[n][0])) nFile = nFile + 1 } // first file-number 000000 sNameFileNaked = 'Mcs' + sDirShort + nFile.toString().padStart(6, '0') sNameFile = sNameFileNaked + '.last.html' //if file exist exit s = '\n' + '\n' + '
\n' + ' \n' + ' \n' + 'description::\n' +
'
· \n' +
'
name::\n' +
'
* McsEngl.' + sNameFile + '//' + sDir + '//dirMcs!⇒' + sNameShort + ',\n' +
'
* McsEngl.' + sDir +'/' + sNameFile + '!⇒' + sNameShort + ',\n' +
'
* McsEngl.' + sName + '!⇒' + sNameShort + ',\n' +
'
* McsEngl.' + sNameShort + '!=' + sNameFileNaked + ',\n' +
'
* McsEngl.' + sNameShort + '!=' + sName + ',\n' +
'
name::\n' +
//'
* McsEngl.' + sNameShort + '\'structure,\n' +
//'
description::\n' +
'
× HitpMcs-creation: {' + moUtil.fDateYMD() + '}\n' +
'
* \n' +
'
description::\n' +
'
× HitpMcs-creation: {' + moUtil.fDateYMD() + '}\n' +
'
· creation of current concept.\n' +
'
name::\n' +
'
* McsEngl.evoluting-of-' + sNameShort + ',\n' +
'
* McsEngl.' + sNameShort + '\'evoluting,\n' +
'
description::\n' +
'
× HitpMcs-creation: {' + moUtil.fDateYMD() + '}\n' +
'
* \n' +
'
name::\n' +
'
* McsEngl.' + sNameShort + '\'parent-child-tree,\n' +
'
* McsEngl.' + sNameShort + '\'child-parent-tree,\n' +
'
parent-tree-of-' + sNameShort + '::\n' +
'
* ,\n' +
'
* McsEngl.' + sNameShort + '\'parent-tree,\n' +
'
child-tree-of-' + sNameShort + '::\n' +
'
* ,\n' +
'
* McsEngl.' + sNameShort + '\'child-tree,\n' +
'
description::\n' +
'
× HitpMcs-creation: {' + moUtil.fDateYMD() + '}\n' +
'
* \n' +
'
name::\n' +
'
* McsEngl.' + sNameShort + '\'whole-part-tree,\n' +
'
* McsEngl.' + sNameShort + '\'part-whole-tree,\n' +
'
whole-tree-of-' + sNameShort + '::\n' +
'
* ,\n' +
'
* ... Sympan.\n' +
'
* McsEngl.' + sNameShort + '\'whole-tree,\n' +
'
part-tree-of-' + sNameShort + '::\n' +
'
* ,\n' +
'
* McsEngl.' + sNameShort + '\'part-tree,\n' +
'
description::\n' +
'
× HitpMcs-creation: {' + moUtil.fDateYMD() + '}\n' +
'
* \n' +
'
name::\n' +
'
* McsEngl.' + sNameShort + '\'generic-specific-tree,\n' +
'
* McsEngl.' + sNameShort + '\'specific-specific-tree,\n' +
'
generic-tree-of-' + sNameShort + '::\n' +
'
* ,\n' +
'
* ... entity.\n' +
'
* McsEngl.' + sNameShort + '\'generic-tree,\n' +
'
specific-tree-of-' + sNameShort + '::\n' +
'
* ,\n' +
'
* McsEngl.' + sNameShort + '.specific-tree,\n' +
'
this page was-visited\n' + ' \n' + ' \n' + ' \n' + ' times since {' + moUtil.fDateYMD() + '}
\n'; } s = s + ' \n' + 'page-wholepath:\n' + ' synagonism.net /\n' + ' worldviewSngo /\n' + ' ' + sDir + ' /\n' + ' ' + sNameShort + '\n' + '
\n' + 'SEARCH::\n' +
'
· this page uses \'locator-names\', names that when you find them, you find the-LOCATION of the-concept they denote.\n' +
'
⊛ GLOBAL-SEARCH:\n' +
'
· clicking on the-green-BAR of a-page you have access to the-global--locator-names of my-site.\n' +
'
· use the-prefix \'' + sNameShort + '\' for senso-concepts related to current concept \'' + sName + '\'.\n' +
'
⊛ LOCAL-SEARCH:\n' +
'
· TYPE CTRL+F "McsLang.words-of-concept\'s-name", to go to the-LOCATION of the-concept.\n' +
'
· a-preview of the-description of a-global-name makes reading fast.\n' +
'
webpage-versions::\n' +
'
• version.last.dynamic: ' + sNameFile + ',\n' +
'
• version.draft.creation: ' + sNameFileNaked + '.0-1-0.' + moUtil.fDateYMD() + '.last.html,\n' +
'