Skip to content

smarts-uz/js-core-scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

js_ai_category — Method Runner Reference

Auto-generated by runs/_gen-readme.mjs. Do not edit by hand — change the JSDoc in utils/<Class>.js and re-run node runs/_gen-readme.mjs.

Every public static method of every class under utils/ has a dedicated runner at runs/<Class>/<method>.mjs, generated by runs/_generate.mjs. Each runner parses CLI args (via the shared runs/_lib.mjs engine — alias flags like --file/-f, positionals, array & object params), maps them to the method's parameters by reflection, wraps the call in the CmdLine.TryCatch config toggle with exit-timeout sleeps and numbered Start/Done logs, and prints the return value.

Invoke a runner directly:

node runs/Homoglyph/word.mjs --file "report.docx" --chars "STy"
node runs/Markdown/merge.mjs one.md two.md
node runs/Scanner/run.mjs --sourceFolder "d:\\Statistic" --maxLevel 5

The Windows right-click menus (shell/) and VS Code debug configs (.vscode/launch.json) each point at these per-method runners.

Coverage: 23 classes, 289 runnable methods.


Category

Runners: runs/Category/ — 10 public static method(s).

displayPath(target, fields, SourceFolder, absolutePath)

Returns a short display path for logging. Prefers relative_path + target if SourceFolder is absent.

Run:

node runs/Category/displayPath.mjs --target <target>
Parameter Optional Description
target no
fields no
SourceFolder no
absolutePath no

ensureDir(dirPath, tag)

Ensures a directory exists, creating it recursively if needed.

Run:

node runs/Category/ensureDir.mjs --file "<path>"
Parameter Optional Description
dirPath no
tag no

findFileRecursively(dir, filename)

Finds a file by name recursively in a directory. Returns full path or null.

Run:

node runs/Category/findFileRecursively.mjs --dir <dir>
Parameter Optional Description
dir no
filename no

loadYaml(filePath, tag)

Reads and parses a YAML file.

Run:

node runs/Category/loadYaml.mjs --file "<path>"
Parameter Optional Description
filePath no
tag no

moveFile(src, dest, tag)

Moves a file from src to dest. If dest exists, renames the existing file by appending a timestamp before its extension. Returns true on success, false if src not found.

Run:

node runs/Category/moveFile.mjs --src <src>
Parameter Optional Description
src no
dest no
tag no

removeEmptyDirs(dirPath, limitPath, tag)

Recursively removes empty directories starting from dirPath upwards, stopping at limitPath (exclusive).

Run:

node runs/Category/removeEmptyDirs.mjs --file "<path>"
Parameter Optional Description
dirPath no
limitPath no
tag no

resolveTargetPath(template, target, fields, SourceFolder, domain_name)

Resolves a TargetPath template string using top-level YAML values and per-entry fields. Available placeholders: {source_file}, {category_path}, {category}, {relative_path}, {domain_name}, {SourceFolder}, and any entry field key.

Run:

node runs/Category/resolveTargetPath.mjs --template <template>
Parameter Optional Description
template no
target no
fields no
SourceFolder no
domain_name no

revert(yamlPath)

Revert: moves each file back from its TargetPath-resolved location to its original source_path. Empty directories created during run are removed. Requires TargetPath in YAML — shows Windows error dialog and exits if missing.

Run:

node runs/Category/revert.mjs --file "<path>"
Parameter Optional Description
yamlPath no

run(yamlPath)

Full pipeline: moves each entry's source file to its TargetPath-resolved destination. Requires TargetPath in YAML — shows Windows error dialog and exits if missing.

Run:

node runs/Category/run.mjs --file "<path>"
Parameter Optional Description
yamlPath no

timestamp()

Returns a timestamp string in YYYY-MM-DD_HH-MM format.

Run:

node runs/Category/timestamp.mjs

Chromes

Runners: runs/Chromes/ — 26 public static method(s).

cleanCache()

Run:

node runs/Chromes/cleanCache.mjs

closeBrowsers()

Run:

node runs/Chromes/closeBrowsers.mjs

closeChrome()

Run:

node runs/Chromes/closeChrome.mjs

convertFolderMhtToHtm(folderPath, [deleteMht])

Run:

node runs/Chromes/convertFolderMhtToHtm.mjs --file "<path>"
Parameter Optional Description
folderPath no
deleteMht yes (default true)

download(url, options, owner, fileType, [duration], [replace])

Run:

node runs/Chromes/download.mjs --url <url>
Parameter Optional Description
url no
options no
owner no
fileType no
duration yes (default this.Duration.Hour10)
replace yes (default [])

fetcher(url, options, owner, [duration], [replace])

Run:

node runs/Chromes/fetcher.mjs --url <url>
Parameter Optional Description
url no
options no
owner no
duration yes (default this.Duration.Hour10)
replace yes (default [])

finish()

Run:

node runs/Chromes/finish.mjs

getRandomFloat(min, max)

Run:

node runs/Chromes/getRandomFloat.mjs --min <min>
Parameter Optional Description
min no
max no

getUrlFromFile(filePath)

Run:

node runs/Chromes/getUrlFromFile.mjs --file "<path>"
Parameter Optional Description
filePath no

getUrlFromFileClean(filePath)

Run:

node runs/Chromes/getUrlFromFileClean.mjs --file "<path>"
Parameter Optional Description
filePath no

hideChrome()

Run:

node runs/Chromes/hideChrome.mjs

initFolders(app)

Run:

node runs/Chromes/initFolders.mjs --app <app>
Parameter Optional Description
app no

killChrome()

Run:

node runs/Chromes/killChrome.mjs

mhtToHtmConvert(mhtPath, [deleteMht])

Run:

node runs/Chromes/mhtToHtmConvert.mjs --file "<path>"
Parameter Optional Description
mhtPath no
deleteMht yes (default true)

pageGo(url, [params], [hideChrome])

Run:

node runs/Chromes/pageGo.mjs --url <url>
Parameter Optional Description
url no
params yes (default { waitUntil: "networkidle2" })
hideChrome yes (default false)

pageMetrics()

Run:

node runs/Chromes/pageMetrics.mjs

pageSetup()

Run:

node runs/Chromes/pageSetup.mjs

processPathsToClipboard(paths)

Run:

node runs/Chromes/processPathsToClipboard.mjs <item1> <item2>
Parameter Optional Description
paths no

randomInt(min, max)

Run:

node runs/Chromes/randomInt.mjs --min <min>
Parameter Optional Description
min no
max no

runBrowser([isCmdGo], [hideChrome])

Run:

node runs/Chromes/runBrowser.mjs --isCmdGo <isCmdGo>
Parameter Optional Description
isCmdGo yes (default false)
hideChrome yes (default false)

runIxbrowser([isCmdGo])

Run:

node runs/Chromes/runIxbrowser.mjs --isCmdGo <isCmdGo>
Parameter Optional Description
isCmdGo yes (default false)

saveHtmlFromMht(mhtPath, [deleteMht])

Run:

node runs/Chromes/saveHtmlFromMht.mjs --file "<path>"
Parameter Optional Description
mhtPath no
deleteMht yes (default true)

saveUrlFile(filePath, url)

Run:

node runs/Chromes/saveUrlFile.mjs --file "<path>"
Parameter Optional Description
filePath no
url no

saveUrlFileFromMht(mhtPath, filePath)

Run:

node runs/Chromes/saveUrlFileFromMht.mjs --file "<path>"
Parameter Optional Description
mhtPath no
filePath no

showChrome()

Run:

node runs/Chromes/showChrome.mjs

userAgent()

Run:

node runs/Chromes/userAgent.mjs

Com

Runners: runs/Com/ — 5 public static method(s).

killOrphans(imageName, before)

Kills any process of imageName whose PID is NOT in before — i.e. an instance this run spawned that Quit()/winax.release() failed to close (the orphaned-process case after a COM error). PIDs present before the run are left untouched so a user's own open Office app is never killed.

Run:

node runs/Com/killOrphans.mjs --imageName <imageName>
Parameter Optional Description
imageName no Process image name, e.g. "WINWORD.EXE".
before no PIDs captured before the COM object was created.

Returns: How many orphaned processes were killed.

openPresentation(pptApp, filePath, [{ readOnly])

Opens a presentation via a passed-in PowerPoint.Application COM object, falling back to a read-only open when a plain open fails (the closest PowerPoint analogue to repair mode — PowerPoint has no CorruptLoad flag).

Run:

node runs/Com/openPresentation.mjs --pptApp <pptApp>
Parameter Optional Description
pptApp no A PowerPoint.Application COM object.
filePath no Path to the .pptx.
{ readOnly yes (default false } = {})

Returns: The opened Presentation.

openWord(wordApp, filePath, [{ readOnly])

Opens a Word document via a passed-in Word.Application COM object, falling back to OpenAndRepair when a plain open fails on a mildly damaged file.

Run:

node runs/Com/openWord.mjs --wordApp <wordApp>
Parameter Optional Description
wordApp no A Word.Application COM object.
filePath no Path to the .docx.
{ readOnly yes (default false } = {})

Returns: The opened Document.

openWorkbook(excelApp, filePath, [{ updateLinks], [readOnly])

Opens an Excel workbook via a passed-in Excel.Application COM object, silently falling back to Excel's repair/extract-data recovery modes when the file has problematic content (the modes Excel's "We found a problem… recover?" dialog offers). CorruptLoad: 0 = xlNormalLoad, 1 = xlRepairFile, 2 = xlExtractData.

Run:

node runs/Com/openWorkbook.mjs --excelApp <excelApp>
Parameter Optional Description
excelApp no A Excel.Application COM object.
filePath no Path to the .xlsx.
{ updateLinks yes (default 0)
readOnly yes (default false } = {})

Returns: The opened Workbook.

pidsOf(imageName)

Returns the set of currently-running PIDs for a given image name (e.g. "WINWORD.EXE"). Reads tasklist CSV — empty set when none run or on any error (non-Windows, tasklist absent, …).

Run:

node runs/Com/pidsOf.mjs --imageName <imageName>
Parameter Optional Description
imageName no Process image name, e.g. "WINWORD.EXE".

Returns: The PIDs currently running that image.


Dates

Runners: runs/Dates/ — 16 public static method(s).

addDays(dateStr, days)

Run:

node runs/Dates/addDays.mjs --dateStr <dateStr>
Parameter Optional Description
dateStr no
days no

addYearsGetLastDate(dateStr, years)

Run:

node runs/Dates/addYearsGetLastDate.mjs --dateStr <dateStr>
Parameter Optional Description
dateStr no
years no

compareDatesDMY(a, b)

Run:

node runs/Dates/compareDatesDMY.mjs --a <a>
Parameter Optional Description
a no
b no

didoxToExcel(date)

Run:

node runs/Dates/didoxToExcel.mjs --date <date>
Parameter Optional Description
date no

excelToDidox(date)

Run:

node runs/Dates/excelToDidox.mjs --date <date>
Parameter Optional Description
date no

futureDateByMonth(months, [prevMonthLastDate])

Run:

node runs/Dates/futureDateByMonth.mjs --months <months>
Parameter Optional Description
months no
prevMonthLastDate yes (default false)

getMinusOneDay(dateStr)

Run:

node runs/Dates/getMinusOneDay.mjs --dateStr <dateStr>
Parameter Optional Description
dateStr no

normalizeUzAccordingToRule(raw)

Run:

node runs/Dates/normalizeUzAccordingToRule.mjs --raw <raw>
Parameter Optional Description
raw no

parseDMY(dateStr)

Run:

node runs/Dates/parseDMY.mjs --dateStr <dateStr>
Parameter Optional Description
dateStr no

parseDMYExcel(dateStr)

Run:

node runs/Dates/parseDMYExcel.mjs --dateStr <dateStr>
Parameter Optional Description
dateStr no

randomInt(min, max)

Berilgan minimum (min) va maksimum (max) qiymatlar oralig'ida tasodifiy butun sonni hosil qiladi (min va max o'z ichiga olgan holda).

Run:

node runs/Dates/randomInt.mjs --min <min>
Parameter Optional Description
min no Kiritilishi mumkin bo'lgan eng kichik butun son.
max no Kiritilishi mumkin bo'lgan eng katta butun son.

Returns: Tasodifiy butun son.

randomIntOne(value)

Run:

node runs/Dates/randomIntOne.mjs --value <value>
Parameter Optional Description
value no

run()

Run:

node runs/Dates/run.mjs

sleep(ms, [random])

Run:

node runs/Dates/sleep.mjs --ms <ms>
Parameter Optional Description
ms no
random yes (default true)

sleepOne(ms)

Run:

node runs/Dates/sleepOne.mjs --ms <ms>
Parameter Optional Description
ms no

sleepSync(ms)

Run:

node runs/Dates/sleepSync.mjs --ms <ms>
Parameter Optional Description
ms no

Dialogs

Runners: runs/Dialogs/ — 6 public static method(s).

errorBox(message, [title], [icon], [buttons], [stop])

Run:

node runs/Dialogs/errorBox.mjs --message <message>
Parameter Optional Description
message no
title yes (default "Error")
icon yes (default this.Icons.Stop)
buttons yes (default this.Buttons.OK)
stop yes (default false)

inputBox([prompt], [title], [defaultValue])

Show a native Windows input dialog and return the entered text. Returns null if the user cancels or leaves the field empty.

Run:

node runs/Dialogs/inputBox.mjs --prompt <prompt>
Parameter Optional Description
prompt yes (default 'Enter value:') The message shown to the user.
title yes (default 'Input') Dialog window title.
defaultValue yes (default '') Pre-filled value in the input field.

messageBox(message, [title])

Run:

node runs/Dialogs/messageBox.mjs --message <message>
Parameter Optional Description
message no
title yes (default 'Message')

multilineInputBox([prompt], [title], [defaultValue])

Show a native Windows multi-line input dialog (a resizable WinForms window with a multi-line text box) and return the entered text, preserving internal line breaks. Enter inserts a new line; the user submits with the OK button. Returns null if the user cancels or leaves the field empty.

Run:

node runs/Dialogs/multilineInputBox.mjs --prompt <prompt>
Parameter Optional Description
prompt yes (default 'Enter text:') The message shown above the text box.
title yes (default 'Input') Dialog window title.
defaultValue yes (default '') Pre-filled value in the text box.

openFileDialog([initialDir])

Run:

node runs/Dialogs/openFileDialog.mjs --initialDir <initialDir>
Parameter Optional Description
initialDir yes (default "D:\\Projects")

warningBox(message, [title], [icon], [buttons], [stop])

Run:

node runs/Dialogs/warningBox.mjs --message <message>
Parameter Optional Description
message no
title yes (default "Warning")
icon yes (default this.Icons.Exclamation)
buttons yes (default this.Buttons.OK)
stop yes (default false)

ES

Runners: runs/ES/ — 3 public static method(s).

execute(command)

Run:

node runs/ES/execute.mjs --command <command>
Parameter Optional Description
command no

find(name, [instance])

Run:

node runs/ES/find.mjs --name <name>
Parameter Optional Description
name no
instance yes (default "One")

findIn(name, folder, [instance])

Run:

node runs/ES/findIn.mjs --name <name>
Parameter Optional Description
name no
folder no
instance yes (default "One")

Excels

Runners: runs/Excels/ — 41 public static method(s).

changeFont(filePath, [fontName], [sheetFilter])

Run:

node runs/Excels/changeFont.mjs --file "<path>"
Parameter Optional Description
filePath no
fontName yes (default 'Arial')
sheetFilter yes (default '')

checkWinax(methodName)

Run:

node runs/Excels/checkWinax.mjs --methodName <methodName>
Parameter Optional Description
methodName no

convertXltxToXlsx(inputPath, outputPath)

Convert a .xltx template file to a .xlsx workbook.

Run:

node runs/Excels/convertXltxToXlsx.mjs --file "<path>"
Parameter Optional Description
inputPath no Full path to the source .xltx file
outputPath no Full path for the output .xlsx file

Returns: The resolved output path

convertXltxToXlsxAuto(inputPath)

Convert a .xltx template to .xlsx, placing the output beside the input with the same base name but .xlsx extension.

Run:

node runs/Excels/convertXltxToXlsxAuto.mjs --file "<path>"
Parameter Optional Description
inputPath no Full path to the source .xltx file

Returns: The resolved output path

fileClose()

Run:

node runs/Excels/fileClose.mjs

fileOpen(fileName)

Run:

node runs/Excels/fileOpen.mjs --file "<path>"
Parameter Optional Description
fileName no

fileSave()

Run:

node runs/Excels/fileSave.mjs

findColumn(search)

Run:

node runs/Excels/findColumn.mjs --search <search>
Parameter Optional Description
search no

generate(ymlFile)

Run:

node runs/Excels/generate.mjs --file "<path>"
Parameter Optional Description
ymlFile no

getProtectedPath(filename)

Run:

node runs/Excels/getProtectedPath.mjs --file "<path>"
Parameter Optional Description
filename no

hide(filename, [sheetName], [veryHidden])

Hide a worksheet in the given workbook file.

Run:

node runs/Excels/hide.mjs --file "<path>"
Parameter Optional Description
filename no Path to the .xlsx file.
sheetName yes (default ['ALL']) Name of the sheet to hide.
veryHidden yes (default true) true → xlSheetVeryHidden (2), false → xlSheetHidden (0).

hideProtectSheet(filename, password, [sheetName], [veryHidden])

Hide a worksheet and then protect all worksheets.

Run:

node runs/Excels/hideProtectSheet.mjs --file "<path>"
Parameter Optional Description
filename no Path to the .xlsx file.
password no Password to protect the worksheets.
sheetName yes (default ['ALL']) Name(s) of the sheet(s) to hide.
veryHidden yes (default true) true → xlSheetVeryHidden (2), false → xlSheetHidden (0).

Returns: The path to the protected file.

hideProtectSheetAsk(filename, [sheetName])

Prompt the user for password, then hide and protect.

Run:

node runs/Excels/hideProtectSheetAsk.mjs --file "<path>"
Parameter Optional Description
filename no Path to the .xlsx file.
sheetName yes (default ['ALL']) Name(s) of the sheet(s) to hide.

isHidden(filename, sheetName)

Check whether a worksheet is hidden (or very-hidden).

Run:

node runs/Excels/isHidden.mjs --file "<path>"
Parameter Optional Description
filename no Path to the .xlsx file.
sheetName no Name of the sheet to inspect.

Returns: Visibility state.

mergeFiles(files, mergedName)

Run:

node runs/Excels/mergeFiles.mjs <item1> <item2>
Parameter Optional Description
files no
mergedName no

mergeFolder(folderPaths, [mergedName])

Merges workbooks folder-by-folder: from each given folder it picks the latest .xlsx by modification time (skipping ~$ temp files), then merges that set via Excels.mergeFiles (every sheet copied, name collisions suffixed). Mirrors Word.mergeFolder / PowerPoints.mergeFolder.

Run:

node runs/Excels/mergeFolder.mjs <item1> <item2>
Parameter Optional Description
folderPaths no One or more folders, each contributing its newest .xlsx.
mergedName yes (default '') Optional output name/path passed through to mergeFiles.

Returns: The resolved path to the saved merged workbook.

openExcel(filePath)

Run:

node runs/Excels/openExcel.mjs --file "<path>"
Parameter Optional Description
filePath no

openWorkbookSafely(excelApp, filePath, [opts])

Open a workbook, silently falling back to Excel's repair/extract-data recovery modes when the file has problematic content (the same modes Excel's "We found a problem… recover?" dialog offers). CorruptLoad: 0 = xlNormalLoad, 1 = xlRepairFile, 2 = xlExtractData.

Run:

node runs/Excels/openWorkbookSafely.mjs --excelApp <excelApp>
Parameter Optional Description
excelApp no
filePath no
opts yes (default {})

processFolders(folder, found)

Run:

node runs/Excels/processFolders.mjs --file "<path>"
Parameter Optional Description
folder no
found no

processPricing(yamlData)

Run:

node runs/Excels/processPricing.mjs --file "<path>"
Parameter Optional Description
yamlData no

protectFile(filename, password)

Run:

node runs/Excels/protectFile.mjs --file "<path>"
Parameter Optional Description
filename no
password no

protectFileAsk(filename)

Prompt the user for a password then protect the workbook.

Run:

node runs/Excels/protectFileAsk.mjs --file "<path>"
Parameter Optional Description
filename no Path to the .xlsx file.

protectSheet(filename, password)

Run:

node runs/Excels/protectSheet.mjs --file "<path>"
Parameter Optional Description
filename no
password no

protectSheetAsk(filename)

Prompt the user for a password then protect all worksheets.

Run:

node runs/Excels/protectSheetAsk.mjs --file "<path>"
Parameter Optional Description
filename no Path to the .xlsx file.

recalculate(filePath, [sheetFilter])

Run:

node runs/Excels/recalculate.mjs --file "<path>"
Parameter Optional Description
filePath no
sheetFilter yes (default '')

repairToFile(inputPath, outputPath)

Open a problem-content workbook via Excel COM in repair mode and SaveAs a clean .xlsx to outputPath. Used as a fallback when other parsers (e.g. SheetJS) can't read the original file.

Run:

node runs/Excels/repairToFile.mjs --file "<path>"
Parameter Optional Description
inputPath no
outputPath no

replaceFormula(filePath, [searchStr], [replaceStr], [recalc], [sheetFilter])

Run:

node runs/Excels/replaceFormula.mjs --file "<path>"
Parameter Optional Description
filePath no
searchStr yes (default '@')
replaceStr yes (default '')
recalc yes (default false)
sheetFilter yes (default '')

replaceFormula2(filePath, [searchStr], [replaceStr], [recalc], [sheetFilter])

Run:

node runs/Excels/replaceFormula2.mjs --file "<path>"
Parameter Optional Description
filePath no
searchStr yes (default '@')
replaceStr yes (default '')
recalc yes (default false)
sheetFilter yes (default '')

replaceFormulaAll(filePath, [searchStr], [replaceStr], [recalc], [sheetFilter])

Run:

node runs/Excels/replaceFormulaAll.mjs --file "<path>"
Parameter Optional Description
filePath no
searchStr yes (default '@')
replaceStr yes (default '')
recalc yes (default true)
sheetFilter yes (default '')

replaceFormulaArray(filePath, [searchStr], [replaceStr], [recalc], [sheetFilter])

Run:

node runs/Excels/replaceFormulaArray.mjs --file "<path>"
Parameter Optional Description
filePath no
searchStr yes (default '@')
replaceStr yes (default '')
recalc yes (default false)
sheetFilter yes (default '')

replaceInSheet(search, replace)

Run:

node runs/Excels/replaceInSheet.mjs --search <search>
Parameter Optional Description
search no
replace no

replaceStandart(filePath, [searchStr], [replaceStr], [recalc], [sheetFilter])

Run:

node runs/Excels/replaceStandart.mjs --file "<path>"
Parameter Optional Description
filePath no
searchStr yes (default '@')
replaceStr yes (default '')
recalc yes (default true)
sheetFilter yes (default '')

scanSubFilesTxt(folderPath)

Run:

node runs/Excels/scanSubFilesTxt.mjs --file "<path>"
Parameter Optional Description
folderPath no

scanSubFolder(folderPath)

Run:

node runs/Excels/scanSubFolder.mjs --file "<path>"
Parameter Optional Description
folderPath no

unHideUnProtectSheet(filename, password, [sheetName])

Unprotect all worksheets and then unhide a worksheet.

Run:

node runs/Excels/unHideUnProtectSheet.mjs --file "<path>"
Parameter Optional Description
filename no Path to the .xlsx file.
password no Password to unprotect the worksheets.
sheetName yes (default ['ALL']) Name(s) of the sheet(s) to unhide.

unHideUnProtectSheetAsk(filename, [sheetName])

Prompt the user for password, then unprotect and unhide.

Run:

node runs/Excels/unHideUnProtectSheetAsk.mjs --file "<path>"
Parameter Optional Description
filename no Path to the .xlsx file.
sheetName yes (default ['ALL']) Name(s) of the sheet(s) to unhide.

unProtectFile(filename, password)

Run:

node runs/Excels/unProtectFile.mjs --file "<path>"
Parameter Optional Description
filename no
password no

unProtectFileAsk(filename)

Prompt the user for a password then unprotect the workbook.

Run:

node runs/Excels/unProtectFileAsk.mjs --file "<path>"
Parameter Optional Description
filename no Path to the .xlsx file.

unProtectSheet(filename, password)

Run:

node runs/Excels/unProtectSheet.mjs --file "<path>"
Parameter Optional Description
filename no
password no

unProtectSheetAsk(filename)

Prompt the user for a password then unprotect all worksheets.

Run:

node runs/Excels/unProtectSheetAsk.mjs --file "<path>"
Parameter Optional Description
filename no Path to the .xlsx file.

unhide(filename, [sheetName])

Unhide (make visible) a worksheet in the given workbook file.

Run:

node runs/Excels/unhide.mjs --file "<path>"
Parameter Optional Description
filename no Path to the .xlsx file.
sheetName yes (default ['ALL']) Name of the sheet to unhide.

ExcelsJS

Runners: runs/ExcelsJS/ — 2 public static method(s).

readWorkbookSafely(filePath, [opts])

Read a workbook, silently falling back through progressively more tolerant strategies when the file has problematic content: 1. Normal SheetJS read with the requested options. 2. Lenient SheetJS read (WTF=true, no styles, no type coercion). 3. Repair via Excel COM (if winax is available): open with CorruptLoad=xlRepairFile, SaveAs a temp .xlsx, then read that.

Run:

node runs/ExcelsJS/readWorkbookSafely.mjs --file "<path>"
Parameter Optional Description
filePath no
opts yes (default {})

replaceFormula(filePath, [searchStr], [replaceStr], [recalc], [sheetFilter])

Run:

node runs/ExcelsJS/replaceFormula.mjs --file "<path>"
Parameter Optional Description
filePath no
searchStr yes (default '@')
replaceStr yes (default '')
recalc yes (default true)
sheetFilter yes (default '')

Files

Runners: runs/Files/ — 40 public static method(s).

archiveFolder(folder, fileName)

Files.archiveFolder('c:\App\js-scraper-olx.uz\parseMHTMLs\', 'AL1313L'); Files.archiveFolder('c:\App\js-scraper-olx.uz\parseMHTMLs\', c:\\App\\js-scraper-olx.uz\\App);

Run:

node runs/Files/archiveFolder.mjs --file "<path>"
Parameter Optional Description
folder no
fileName no

backupFile(filePath, [deletes], [backupDir])

Run:

node runs/Files/backupFile.mjs --file "<path>"
Parameter Optional Description
filePath no
deletes yes (default false)
backupDir yes (default path.join(path.dirname(filePath)

backupFolder(folderPath, [deletes])

Run:

node runs/Files/backupFolder.mjs --file "<path>"
Parameter Optional Description
folderPath no
deletes yes (default true)

backupFolderZip(folderPath, [deletes])

Run:

node runs/Files/backupFolderZip.mjs --file "<path>"
Parameter Optional Description
folderPath no
deletes yes (default true)

cleanPath(p)

Run:

node runs/Files/cleanPath.mjs --p <p>
Parameter Optional Description
p no

cleanupFileName(filename, [replaceWith])

Run:

node runs/Files/cleanupFileName.mjs --file "<path>"
Parameter Optional Description
filename no
replaceWith yes (default ' ')

combineJsonFiles(folder, [fileName])

Run:

node runs/Files/combineJsonFiles.mjs --file "<path>"
Parameter Optional Description
folder no
fileName yes (default 'ALL')

copyFileWithRetry(source, destination, [maxRetries], [delay])

Run:

node runs/Files/copyFileWithRetry.mjs --file "<path>"
Parameter Optional Description
source no
destination no
maxRetries yes (default 1)
delay yes (default 1000)

copyFolderRecursiveSync(source, target)

Run:

node runs/Files/copyFolderRecursiveSync.mjs --file "<path>"
Parameter Optional Description
source no
target no

currentDir()

Run:

node runs/Files/currentDir.mjs

deleteInfo(folder, filename)

Run:

node runs/Files/deleteInfo.mjs --file "<path>"
Parameter Optional Description
folder no
filename no

exists(path)

Run:

node runs/Files/exists.mjs --file "<path>"
Parameter Optional Description
path no

findAllContractFiles(dir)

Run:

node runs/Files/findAllContractFiles.mjs --dir <dir>
Parameter Optional Description
dir no

findRecursive(dir, condition)

Run:

node runs/Files/findRecursive.mjs --dir <dir>
Parameter Optional Description
dir no
condition no

findRecursiveFull(dir, condition, [ignoreFolderCondition])

Run:

node runs/Files/findRecursiveFull.mjs --dir <dir>
Parameter Optional Description
dir no
condition no
ignoreFolderCondition yes (default null)

findRelevantDirectories(rootDir)

Finds all directories that need to be checked for duplicates

Run:

node runs/Files/findRelevantDirectories.mjs --rootDir <rootDir>
Parameter Optional Description
rootDir no The project root directory

Returns: - Array of paths to directories

getBaseName(filePath, ext)

Run:

node runs/Files/getBaseName.mjs --file "<path>"
Parameter Optional Description
filePath no
ext no

getDateFromTXT(folderCompan)

Run:

node runs/Files/getDateFromTXT.mjs --file "<path>"
Parameter Optional Description
folderCompan no

getDirName(filePath)

Run:

node runs/Files/getDirName.mjs --file "<path>"
Parameter Optional Description
filePath no

getLatestMatchingFile(folder, [ext])

Finds the "latest" file inside a folder whose name matches the increment-versioning rule "Basename N" (e.g. "MD 5.docx", "MD TOC 12.docx"). Matching rules (same regex family as incrementFileName): - The basename (without extension) must end in " " — /^(.*?)\s+(\d+)$/. - When ext is given (e.g. ".docx"), only files with that extension qualify. - Sub-folders and meta folders (e.g. "@ Other") are ignored — only files in the folder's top level are considered. The file with the HIGHEST trailing number wins (latest version). On a tie the later-modified file wins. When null, any extension qualifies.

Run:

node runs/Files/getLatestMatchingFile.mjs --file "<path>"
Parameter Optional Description
folder no Folder to scan.
ext yes (default null) Optional extension filter, e.g. ".docx" or ".md".

Returns: Absolute path of the latest matching file, or null.

getPINFLFromTXT(folderCompan)

Run:

node runs/Files/getPINFLFromTXT.mjs --file "<path>"
Parameter Optional Description
folderCompan no

getTINFromTXT(folderCompan)

Run:

node runs/Files/getTINFromTXT.mjs --file "<path>"
Parameter Optional Description
folderCompan no

incrementFileName(filePath)

Increments a file name if it already exists (e.g., file.yml -> file 1.yml)

Run:

node runs/Files/incrementFileName.mjs --file "<path>"
Parameter Optional Description
filePath no Path to the desired file

Returns: - Available file path

isEmpty(value)

Run:

node runs/Files/isEmpty.mjs --value <value>
Parameter Optional Description
value no

mkdirIfNotExists(dirPath)

Run:

node runs/Files/mkdirIfNotExists.mjs --file "<path>"
Parameter Optional Description
dirPath no

moveFolder(src, dest, [rename])

Run:

node runs/Files/moveFolder.mjs --src <src>
Parameter Optional Description
src no
dest no
rename yes (default false)

openFile(file)

Run:

node runs/Files/openFile.mjs --file "<path>"
Parameter Optional Description
file no

openFileQoder(file)

Run:

node runs/Files/openFileQoder.mjs --file "<path>"
Parameter Optional Description
file no

pickRandomFile(folder, extension)

Run:

node runs/Files/pickRandomFile.mjs --file "<path>"
Parameter Optional Description
folder no
extension no

readJson(filePath)

Run:

node runs/Files/readJson.mjs --file "<path>"
Parameter Optional Description
filePath no

readLines(filePath)

Reads a text file and returns an array of non-empty trimmed lines.

Run:

node runs/Files/readLines.mjs --file "<path>"
Parameter Optional Description
filePath no Path to the text file.

Returns: Array of lines.

readProfilesFromFile(filePath)

Reads profile directories from text file

Run:

node runs/Files/readProfilesFromFile.mjs --file "<path>"
Parameter Optional Description
filePath no

readTextFile(filePath)

Run:

node runs/Files/readTextFile.mjs --file "<path>"
Parameter Optional Description
filePath no

readUrlsFromDirectory(dirPath)

Reads .url files from directory

Run:

node runs/Files/readUrlsFromDirectory.mjs --file "<path>"
Parameter Optional Description
dirPath no

removeFile(file)

Run:

node runs/Files/removeFile.mjs --file "<path>"
Parameter Optional Description
file no

removeFilesWithExtension(dir, extension)

Run:

node runs/Files/removeFilesWithExtension.mjs --dir <dir>
Parameter Optional Description
dir no
extension no

safeCopy(src, dest)

Run:

node runs/Files/safeCopy.mjs --src <src>
Parameter Optional Description
src no
dest no

saveInfoToFile(folder, filename)

Run:

node runs/Files/saveInfoToFile.mjs --file "<path>"
Parameter Optional Description
folder no
filename no

urlExistsInDirectories(url, currentSaveDir)

Checks if a URL already exists in any relevant directory

Run:

node runs/Files/urlExistsInDirectories.mjs --url <url>
Parameter Optional Description
url no The URL to check
currentSaveDir no The current save directory to exclude from checking

Returns: - True if URL exists, false otherwise

writeJson(filePath, data)

Run:

node runs/Files/writeJson.mjs --file "<path>"
Parameter Optional Description
filePath no
data no

Homoglyph

Runners: runs/Homoglyph/ — 8 public static method(s).

excel(fileName, [chars])

Replaces Latin characters in every text cell of an Excel workbook with Cyrillic homoglyphs (COM). Excluded sheets are skipped.

Run:

node runs/Homoglyph/excel.mjs --file "<path>"
Parameter Optional Description
fileName no Path to the source .xlsx file.
chars yes (default null) If null, all mapped chars are replaced.

Returns: Path to the saved output file.

excelAsk(fileName)

Interactive Excel homoglyph: prompts for characters, persists the choice.

Run:

node runs/Homoglyph/excelAsk.mjs --file "<path>"
Parameter Optional Description
fileName no

markdown(fileName, [chars])

Replaces Latin characters in a Markdown file with Cyrillic homoglyphs. Plain UTF-8 text — no COM/winax required.

Run:

node runs/Homoglyph/markdown.mjs --file "<path>"
Parameter Optional Description
fileName no Path to the source .md file.
chars yes (default null) If null, all mapped chars are replaced.

Returns: Path to the saved output file.

markdownAsk(fileName)

Interactive Markdown homoglyph: prompts for characters, persists the choice.

Run:

node runs/Homoglyph/markdownAsk.mjs --file "<path>"
Parameter Optional Description
fileName no

powerpoint(fileName, [chars])

Replaces Latin characters in every text shape of a PowerPoint presentation with Cyrillic homoglyphs (COM).

Run:

node runs/Homoglyph/powerpoint.mjs --file "<path>"
Parameter Optional Description
fileName no Path to the source .pptx file.
chars yes (default null) If null, all mapped chars are replaced.

Returns: Path to the saved output file.

powerpointAsk(fileName)

Interactive PowerPoint homoglyph: prompts for characters, persists the choice.

Run:

node runs/Homoglyph/powerpointAsk.mjs --file "<path>"
Parameter Optional Description
fileName no

word(fileName, [chars])

Replaces Latin characters in a Word document with Cyrillic homoglyphs (COM).

Run:

node runs/Homoglyph/word.mjs --file "<path>"
Parameter Optional Description
fileName no Path to the source .docx file.
chars yes (default null) If null, all mapped chars are replaced.

Returns: Path to the saved output file.

wordAsk(fileName)

Interactive Word homoglyph: prompts for characters, persists the choice.

Run:

node runs/Homoglyph/wordAsk.mjs --file "<path>"
Parameter Optional Description
fileName no

IjaraSoliq

Runners: runs/IjaraSoliq/ — 3 public static method(s).

contracts([owner], [rentType], [state], [page], [size])

Run:

node runs/IjaraSoliq/contracts.mjs --owner <owner>
Parameter Optional Description
owner yes (default Owner.SRental)
rentType yes (default RentType.Out)
state yes (default IjaraState.Confirmed)
page yes (default 0)
size yes (default 1000)

download([owner], docId, startDate, endDate)

Run:

node runs/IjaraSoliq/download.mjs --owner <owner>
Parameter Optional Description
owner yes (default Owner.SRental)
docId no
startDate no
endDate no

testing()

Run:

node runs/IjaraSoliq/testing.mjs

KapitalBank

Runners: runs/KapitalBank/ — 2 public static method(s).

payments([owner], [page], [size], [state])

Run:

node runs/KapitalBank/payments.mjs --owner <owner>
Parameter Optional Description
owner yes (default IjaraSoliq.Owner.SRental)
page yes (default 1)
size yes (default 1000)
state yes (default this.KapitalState.Conducted)

testing()

Run:

node runs/KapitalBank/testing.mjs

Markdown

Runners: runs/Markdown/ — 4 public static method(s).

convertToHtml(filePath)

Run:

node runs/Markdown/convertToHtml.mjs --file "<path>"
Parameter Optional Description
filePath no

convertToWord(filePath, [genPdf], [templatePath])

Converts a Markdown file to Word .docx (plain template, no TOC). The .docx is saved in a DOC folder next to the source .md file. If genPdf is true (default) a PDF is also exported to a PDF folder. Template config key: Templates.WordMd (a FOLDER — latest file is picked).

Run:

node runs/Markdown/convertToWord.mjs --file "<path>"
Parameter Optional Description
filePath no
genPdf yes (default true) =true] Also export a PDF alongside the .docx
templatePath yes (default null) Explicit template file/folder override.

Returns: Absolute path of the generated .docx

convertToWordTOC(filePath, [genPdf], [templatePath])

Converts a Markdown file to a Word .docx using a TOC-enabled template. The template must contain the literal placeholder text "{Content}" where the converted content should be inserted. After insertion the existing Table of Contents field in the document is refreshed automatically. The .docx is saved in a DOC folder next to the source .md file. If genPdf is true (default) a PDF is also exported to a PDF folder. Template config key: Templates.WordMdTOC (a FOLDER — latest file is picked).

Run:

node runs/Markdown/convertToWordTOC.mjs --file "<path>"
Parameter Optional Description
filePath no
genPdf yes (default true) =true] Also export a PDF alongside the .docx
templatePath yes (default null) Explicit template file/folder override.

Returns: Absolute path of the generated .docx

merge(files, [lineBetween])

Merges an array of Markdown files into a single .md file. Output location : the same folder that contains the first file. Output filename : 1.md, auto-incremented if it already exists (e.g. "Diagnose 1.md", "Diagnose 2.md", …). Between each file's content, lineBetween empty lines are inserted so the sections are visually separated when the result is opened in an editor or converted to another format. files to merge, in the desired order. each file's content. When null (default) the value is read from config key Markdown.LineBetween (fallback: 20). or undefined on error / empty input.

Run:

node runs/Markdown/merge.mjs <item1> <item2>
Parameter Optional Description
files no Absolute (or resolvable) paths to the .md
lineBetween yes (default null) Number of empty lines to insert between

Returns: Absolute path of the written output file,


MySoliq

Runners: runs/MySoliq/ — 6 public static method(s).

companyInfo(tin)

Run:

node runs/MySoliq/companyInfo.mjs --tin <tin>
Parameter Optional Description
tin no

companyInfoAPI(tin)

Run:

node runs/MySoliq/companyInfoAPI.mjs --tin <tin>
Parameter Optional Description
tin no

entrepreneurInfo(pinfl, passportSeries, passportNumber)

Run:

node runs/MySoliq/entrepreneurInfo.mjs --pinfl <pinfl>
Parameter Optional Description
pinfl no
passportSeries no
passportNumber no

entrepreneurInfoAPI(pinfl, passportSeries, passportNumber)

Run:

node runs/MySoliq/entrepreneurInfoAPI.mjs --pinfl <pinfl>
Parameter Optional Description
pinfl no
passportSeries no
passportNumber no

vatInfo(tin)

Run:

node runs/MySoliq/vatInfo.mjs --tin <tin>
Parameter Optional Description
tin no

vatInfoAPI(tin)

Run:

node runs/MySoliq/vatInfoAPI.mjs --tin <tin>
Parameter Optional Description
tin no

Phone

Runners: runs/Phone/ — 19 public static method(s).

actualizePhoneFolder(paths)

Run:

node runs/Phone/actualizePhoneFolder.mjs <item1> <item2>
Parameter Optional Description
paths no

appCalculateCountOnline()

Run:

node runs/Phone/appCalculateCountOnline.mjs

appFindPhones()

Run:

node runs/Phone/appFindPhones.mjs

appMergePhones()

Run:

node runs/Phone/appMergePhones.mjs

collectRegions(folder)

Run:

node runs/Phone/collectRegions.mjs --file "<path>"
Parameter Optional Description
folder no

extractUzbekPhones(text)

Run:

node runs/Phone/extractUzbekPhones.mjs --text <text>
Parameter Optional Description
text no

getNoPhones()

Run:

node runs/Phone/getNoPhones.mjs

getPhoneStatus(userDir, [fullPath])

Run:

node runs/Phone/getPhoneStatus.mjs --userDir <userDir>
Parameter Optional Description
userDir no
fullPath yes (default false)

getPhones(userDir, [fullPath])

Run:

node runs/Phone/getPhones.mjs --userDir <userDir>
Parameter Optional Description
userDir no
fullPath yes (default false)

getRegions(userDir, [fullPath])

Run:

node runs/Phone/getRegions.mjs --userDir <userDir>
Parameter Optional Description
userDir no
fullPath yes (default false)

innerMovePhoneFolder(userDir, phoneFolder)

Run:

node runs/Phone/innerMovePhoneFolder.mjs --userDir <userDir>
Parameter Optional Description
userDir no
phoneFolder no

isPhone(file)

Run:

node runs/Phone/isPhone.mjs --file "<path>"
Parameter Optional Description
file no

isPhoneStatus(file)

Run:

node runs/Phone/isPhoneStatus.mjs --file "<path>"
Parameter Optional Description
file no

isRegion(file)

Run:

node runs/Phone/isRegion.mjs --file "<path>"
Parameter Optional Description
file no

itemCalculateCountOnline(folder)

Run:

node runs/Phone/itemCalculateCountOnline.mjs --file "<path>"
Parameter Optional Description
folder no

itemMergePhones(folder)

Run:

node runs/Phone/itemMergePhones.mjs --file "<path>"
Parameter Optional Description
folder no

itemRemoveCountOnline(name)

Run:

node runs/Phone/itemRemoveCountOnline.mjs --name <name>
Parameter Optional Description
name no

phoneToFolder(phones)

Run:

node runs/Phone/phoneToFolder.mjs --phones <phones>
Parameter Optional Description
phones no

phoneToFolderItem(phone)

Run:

node runs/Phone/phoneToFolderItem.mjs --phone <phone>
Parameter Optional Description
phone no

PowerPoints

Runners: runs/PowerPoints/ — 8 public static method(s).

checkWinax(methodName)

Run:

node runs/PowerPoints/checkWinax.mjs --methodName <methodName>
Parameter Optional Description
methodName no

getProtectedPath(filename)

Returns a suffixed, auto-incremented path for the protected output file. Reads 'PowerPoint.ProtectSuffix' from config.yml (falls back to ' Protected'). If the stem already contains the suffix the original path is returned as-is.

Run:

node runs/PowerPoints/getProtectedPath.mjs --file "<path>"
Parameter Optional Description
filename no

merge(filePaths, [mergedName])

Merges several .pptx presentations into one, appending every slide from each source (in order) onto a fresh copy of the first file. Uses COM Slides.InsertFromFile, which carries each source slide's own design/layout across — the merged deck keeps each part's formatting. The output is written beside the first file, named after that folder, auto-incremented on collision (mirrors Word.merge / Excels.mergeFiles).

Run:

node runs/PowerPoints/merge.mjs <item1> <item2>
Parameter Optional Description
filePaths no Two or more .pptx paths (the first is the base).
mergedName yes (default '') Optional output name/path; default = ".pptx".

Returns: The resolved path to the saved merged presentation.

mergeFolder(folderPaths)

Merges presentations folder-by-folder: from each given folder it picks the latest .pptx by modification time (skipping ~$ temp files), then merges that set via PowerPoints.merge. No template — the first folder's latest file is the base (mirrors Word.mergeFolder).

Run:

node runs/PowerPoints/mergeFolder.mjs <item1> <item2>
Parameter Optional Description
folderPaths no One or more folders, each contributing its newest .pptx.

Returns: The resolved path to the saved merged presentation.

protectFile(filename, password, [writePassword])

Protects a PowerPoint presentation with an open-password and/or a write-password. Saves the result to a new suffixed file via getProtectedPath (original untouched).

Run:

node runs/PowerPoints/protectFile.mjs --file "<path>"
Parameter Optional Description
filename no Path to the source .pptx file.
password no Password required to open the file.
writePassword yes (default '') =''] - Password required to edit/save the file.

Returns: Path to the saved protected file.

protectFileAsk(filename)

Prompt the user for a password then protect the presentation.

Run:

node runs/PowerPoints/protectFileAsk.mjs --file "<path>"
Parameter Optional Description
filename no Path to the .pptx file.

unProtectFile(filename, password)

Removes open-password and write-password from a PowerPoint presentation, saving in-place.

Run:

node runs/PowerPoints/unProtectFile.mjs --file "<path>"
Parameter Optional Description
filename no Path to the protected .pptx file.
password no Open password set on the presentation.

unProtectFileAsk(filename)

Prompt the user for a password then unprotect the presentation.

Run:

node runs/PowerPoints/unProtectFileAsk.mjs --file "<path>"
Parameter Optional Description
filename no Path to the .pptx file.

Puppe

Runners: runs/Puppe/ — 23 public static method(s).

appSaveOffers()

Run:

node runs/Puppe/appSaveOffers.mjs

appSavePages()

Run:

node runs/Puppe/appSavePages.mjs

appSavePagination()

Run:

node runs/Puppe/appSavePagination.mjs

appSavePhones()

Run:

node runs/Puppe/appSavePhones.mjs

autoScroll([step], [delay])

Run:

node runs/Puppe/autoScroll.mjs --step <step>
Parameter Optional Description
step yes (default 400)
delay yes (default 150)

extractApp(pattern, page)

Run:

node runs/Puppe/extractApp.mjs --pattern <pattern>
Parameter Optional Description
pattern no
page no

extractAppPhone(pattern, page)

Run:

node runs/Puppe/extractAppPhone.mjs --pattern <pattern>
Parameter Optional Description
pattern no
page no

extractContent(page)

Run:

node runs/Puppe/extractContent.mjs --page <page>
Parameter Optional Description
page no

extractID(page)

Run:

node runs/Puppe/extractID.mjs --page <page>
Parameter Optional Description
page no

extractOffers()

Run:

node runs/Puppe/extractOffers.mjs

extractUserId()

Run:

node runs/Puppe/extractUserId.mjs

humanScroll()

Run:

node runs/Puppe/humanScroll.mjs

itemSavePagination(url)

Run:

node runs/Puppe/itemSavePagination.mjs --url <url>
Parameter Optional Description
url no

offersCount(fullPath)

Run:

node runs/Puppe/offersCount.mjs --file "<path>"
Parameter Optional Description
fullPath no

pageTitle()

Run:

node runs/Puppe/pageTitle.mjs

saveAsMhtml(filePath)

Run:

node runs/Puppe/saveAsMhtml.mjs --file "<path>"
Parameter Optional Description
filePath no

scrapeOffers(url)

Run:

node runs/Puppe/scrapeOffers.mjs --url <url>
Parameter Optional Description
url no

scrapePages(url)

Run:

node runs/Puppe/scrapePages.mjs --url <url>
Parameter Optional Description
url no

scrapePhone(url, userIdPath)

Run:

node runs/Puppe/scrapePhone.mjs --url <url>
Parameter Optional Description
url no
userIdPath no

scrapeUser(url, userIdPath, match)

Run:

node runs/Puppe/scrapeUser.mjs --url <url>
Parameter Optional Description
url no
userIdPath no
match no

scrollAds()

Run:

node runs/Puppe/scrollAds.mjs

scrollUntilSelector(selector, [{

  step], [delay], [maxScrolls])

Run:

node runs/Puppe/scrollUntilSelector.mjs --selector <selector>
Parameter Optional Description
selector no
`{
  step` | yes (default `500`) | — |

| delay | yes (default 300) | — | | maxScrolls | yes (default 30 } = {}) | — |

showPhone()

Run:

node runs/Puppe/showPhone.mjs

Registry

Runners: runs/Registry/ — 1 public static method(s).

clean([hives], [backup], [broadcast])

Clean dead entries out of the Windows PATH-family environment variables in the registry. Deterministic and Windows-only. For the chosen hive(s) it scans the Path value and every Path_* helper variable and removes tokens that are either a %VAR% reference to an undefined variable or a literal directory that no longer exists, keeping everything that still resolves. Each value's registry type is preserved (so Path stays REG_EXPAND_SZ and the references keep expanding). Both environment keys are exported to %USERPROFILE%\registry-path-backup-<timestamp>\ first (unless disabled), and a WM_SETTINGCHANGE broadcast lets already-running apps pick up the new value without a reboot. System (HKLM) changes require an elevated process; when not elevated only User (HKCU) values are touched and a note is shown. Pass null (the default) for any argument to fall back to the config.yml Registry.clean section; pass an explicit value to override.

Run:

node runs/Registry/clean.mjs --hives <hives>
Parameter Optional Description
hives yes (default null) 'System'
backup yes (default null) Export keys before changing, or null → config Registry.clean.Backup
broadcast yes (default null) Notify running apps, or null → config Registry.clean.Broadcast

Returns: { scope, changes, errors, removedCount, backup, elevated, broadcast } or null on failure.


Scanner

Runners: runs/Scanner/ — 10 public static method(s).

flattenTreeForTable(tree, [currentPath], [list])

Run:

node runs/Scanner/flattenTreeForTable.mjs --tree <tree>
Parameter Optional Description
tree no
currentPath yes (default "")
list yes (default [])

generateTreeMarkdown(tree, [indent])

Run:

node runs/Scanner/generateTreeMarkdown.mjs --tree <tree>
Parameter Optional Description
tree no
indent yes (default 0)

getIncrementedPath(dir, baseName, extension)

Run:

node runs/Scanner/getIncrementedPath.mjs --dir <dir>
Parameter Optional Description
dir no
baseName no
extension no

getTimestamp()

Run:

node runs/Scanner/getTimestamp.mjs

isExcluded(name, exclusions)

Run:

node runs/Scanner/isExcluded.mjs --name <name>
Parameter Optional Description
name no
exclusions no

notify(message, title, timeoutSeconds, [type])

Run:

node runs/Scanner/notify.mjs --message <message>
Parameter Optional Description
message no
title no
timeoutSeconds no
type yes (default 64)

run({ sourceFolder, aicFolder, maxLevel, exclusions })

Run the scanner

Run:

node runs/Scanner/run.mjs --sourceFolder <sourceFolder> --aicFolder <aicFolder>

Object parameter — pass each key as --key value:

Key Description
--sourceFolder
--aicFolder
--maxLevel
--exclusions

safeWriteFile(filePath, content, aicFolder)

Run:

node runs/Scanner/safeWriteFile.mjs --file "<path>"
Parameter Optional Description
filePath no
content no
aicFolder no

scanRecursive(currentPath, depth, maxDepth, exclusions)

Run:

node runs/Scanner/scanRecursive.mjs --file "<path>"
Parameter Optional Description
currentPath no
depth no
maxDepth no
exclusions no

toYaml(obj, [indent])

Run:

node runs/Scanner/toYaml.mjs --obj <obj>
Parameter Optional Description
obj no
indent yes (default 0)

Secrets

Runners: runs/Secrets/ — 2 public static method(s).

env(name)

Run:

node runs/Secrets/env.mjs --name <name>
Parameter Optional Description
name no

get(section, [owner])

Run:

node runs/Secrets/get.mjs --section <section>
Parameter Optional Description
section no
owner yes (default '')

Word

Runners: runs/Word/ — 18 public static method(s).

checkWinax(methodName)

Run:

node runs/Word/checkWinax.mjs --methodName <methodName>
Parameter Optional Description
methodName no

cleanCompanyName(name)

Run:

node runs/Word/cleanCompanyName.mjs --name <name>
Parameter Optional Description
name no

contractNumFromFormat(data)

Run:

node runs/Word/contractNumFromFormat.mjs --data <data>
Parameter Optional Description
data no

extractDate(date)

Run:

node runs/Word/extractDate.mjs --date <date>
Parameter Optional Description
date no

getComNameInitials(name)

Run:

node runs/Word/getComNameInitials.mjs --name <name>
Parameter Optional Description
name no

getNumberWordOnly(num)

Run:

node runs/Word/getNumberWordOnly.mjs --num <num>
Parameter Optional Description
num no

getProtectedPath(filename)

Returns a suffixed, auto-incremented path for the protected output file. Reads 'Word.ProtectSuffix' from config.yml (falls back to ' Protected'). If the stem already contains the suffix the original path is returned as-is.

Run:

node runs/Word/getProtectedPath.mjs --file "<path>"
Parameter Optional Description
filename no

getRussianMonthName(monthNumber)

Run:

node runs/Word/getRussianMonthName.mjs --monthNumber <monthNumber>
Parameter Optional Description
monthNumber no

initFolders(ymlFile)

Run:

node runs/Word/initFolders.mjs --file "<path>"
Parameter Optional Description
ymlFile no

makeContract(ymlFile)

Run:

node runs/Word/makeContract.mjs --file "<path>"
Parameter Optional Description
ymlFile no

merge(filePaths, [pageBreak], [targetDir])

Run:

node runs/Word/merge.mjs <item1> <item2>
Parameter Optional Description
filePaths no
pageBreak yes (default true)
targetDir yes (default null)

mergeFolder(folderPaths, [pageBreak])

Run:

node runs/Word/mergeFolder.mjs <item1> <item2>
Parameter Optional Description
folderPaths no
pageBreak yes (default true)

protectFile(filename, password, [protectionType])

Protects a Word document against editing. Saves the result to a new suffixed file via getProtectedPath (original untouched). Protection type constants (wdProtectionType): 0 = wdAllowOnlyRevisions — Tracked changes only 1 = wdAllowOnlyComments — Comments only 2 = wdAllowOnlyFormFields — Filling in forms only 3 = wdAllowOnlyReading — No changes (Read only) ← default

Run:

node runs/Word/protectFile.mjs --file "<path>"
Parameter Optional Description
filename no Path to the source .docx file.
password no Password required to remove protection.
protectionType yes (default 3) =3] - wdProtectionType constant (0–3).

Returns: Path to the saved protected file.

protectFileAsk(filename, [protectionType])

Prompt the user for a password then protect the document.

Run:

node runs/Word/protectFileAsk.mjs --file "<path>"
Parameter Optional Description
filename no Path to the .docx file.
protectionType yes (default 3) =3] - wdProtectionType constant (0–3).

unProtectFile(filename, password)

Removes editing protection from a Word document, saving in-place.

Run:

node runs/Word/unProtectFile.mjs --file "<path>"
Parameter Optional Description
filename no Path to the protected .docx file.
password no Password used when the document was protected.

unProtectFileAsk(filename)

Prompt the user for a password then unprotect the document.

Run:

node runs/Word/unProtectFileAsk.mjs --file "<path>"
Parameter Optional Description
filename no Path to the .docx file.

wordReplace(data, templatePath, outputDocxPath, outputPdfPath)

Run:

node runs/Word/wordReplace.mjs --data <data>
Parameter Optional Description
data no
templatePath no
outputDocxPath no
outputPdfPath no

wordToMD(filename)

Run:

node runs/Word/wordToMD.mjs --file "<path>"
Parameter Optional Description
filename no

Yamls

Runners: runs/Yamls/ — 13 public static method(s).

extractFirstNumber(str)

Run:

node runs/Yamls/extractFirstNumber.mjs --str <str>
Parameter Optional Description
str no

fillYamlWithInfo(ymlFile, [yamlData], [backup], [rewrite])

Run:

node runs/Yamls/fillYamlWithInfo.mjs --file "<path>"
Parameter Optional Description
ymlFile no
yamlData yes (default null)
backup yes (default true)
rewrite yes (default true)

findTextLine(filePath, text)

Run:

node runs/Yamls/findTextLine.mjs --file "<path>"
Parameter Optional Description
filePath no
text no

getConfig(keyPath, [type], [defaultValue])

Run:

node runs/Yamls/getConfig.mjs --file "<path>"
Parameter Optional Description
keyPath no
type yes (default null)
defaultValue yes (default null)

getPrepayMonth(yamlData)

Run:

node runs/Yamls/getPrepayMonth.mjs --file "<path>"
Parameter Optional Description
yamlData no

getYamlValue(filePath, keyPath, [defaultValue])

Load YAML and return value by dot-notated path

Run:

node runs/Yamls/getYamlValue.mjs --file "<path>"
Parameter Optional Description
filePath no path to yaml file
keyPath no e.g. "Contract.Format"
defaultValue yes (default undefined) optional fallback

loadAndParseYaml(ymlFile)

Run:

node runs/Yamls/loadAndParseYaml.mjs --file "<path>"
Parameter Optional Description
ymlFile no

loadYamlWithDeps(ymlFile)

Run:

node runs/Yamls/loadYamlWithDeps.mjs --file "<path>"
Parameter Optional Description
ymlFile no

mergeYamlsInFolder(folderPath)

Run:

node runs/Yamls/mergeYamlsInFolder.mjs --file "<path>"
Parameter Optional Description
folderPath no

replaceTextLine(filePath, key, value)

Run:

node runs/Yamls/replaceTextLine.mjs --file "<path>"
Parameter Optional Description
filePath no
key no
value no

replaceYaml(ymlFile, yamlData, companyInfo)

Run:

node runs/Yamls/replaceYaml.mjs --file "<path>"
Parameter Optional Description
ymlFile no
yamlData no
companyInfo no

setConfig(keyPath, value)

Write a value at a nested dot-path into config.yml. e.g. setConfig('ChoosedChars.Word', 'ABCabc') Preserves all other keys in the file.

Run:

node runs/Yamls/setConfig.mjs --file "<path>"
Parameter Optional Description
keyPath no Dot-notated key path, e.g. 'ChoosedChars.Word'
value no Value to set

update(ymlFile)

Run:

node runs/Yamls/update.mjs --file "<path>"
Parameter Optional Description
ymlFile no

didox

Runners: runs/didox/ — 23 public static method(s).

bankByCode(code)

Run:

node runs/didox/bankByCode.mjs --code <code>
Parameter Optional Description
code no

carInfoByPinfl(tin)

Run:

node runs/didox/carInfoByPinfl.mjs --tin <tin>
Parameter Optional Description
tin no

contracts(owner, rentType, state, [page], [size])

Run:

node runs/didox/contracts.mjs --owner <owner>
Parameter Optional Description
owner no
rentType no
state no
page yes (default 0)
size yes (default 1000)

districtsByCode(regionId, districtCode)

Run:

node runs/didox/districtsByCode.mjs --regionId <regionId>
Parameter Optional Description
regionId no
districtCode no

documentList()

Run:

node runs/didox/documentList.mjs

documentPDF(docId)

Run:

node runs/didox/documentPDF.mjs --docId <docId>
Parameter Optional Description
docId no

frauds()

Run:

node runs/didox/frauds.mjs

fraudsByTin(tin)

Run:

node runs/didox/fraudsByTin.mjs --tin <tin>
Parameter Optional Description
tin no

getRegionInfo()

Run:

node runs/didox/getRegionInfo.mjs

getTaxpayerType()

Run:

node runs/didox/getTaxpayerType.mjs

infoByTinPinfl(tin, [personFolder])

Run:

node runs/didox/infoByTinPinfl.mjs --tin <tin>
Parameter Optional Description
tin no
personFolder yes (default globalThis.folderDirector)

login()

Run:

node runs/didox/login.mjs

profileIKPUCodes()

Run:

node runs/didox/profileIKPUCodes.mjs

profileInfo()

Run:

node runs/didox/profileInfo.mjs

regionsByCode(code)

Run:

node runs/didox/regionsByCode.mjs --code <code>
Parameter Optional Description
code no

saveBanks()

Run:

node runs/didox/saveBanks.mjs

saveDistricts()

Run:

node runs/didox/saveDistricts.mjs

saveMeasures()

Run:

node runs/didox/saveMeasures.mjs

saveRailwayStations()

Run:

node runs/didox/saveRailwayStations.mjs

saveRegions()

Run:

node runs/didox/saveRegions.mjs

saveRegionsTTN()

Run:

node runs/didox/saveRegionsTTN.mjs

searchIKPUCode(text)

Run:

node runs/didox/searchIKPUCode.mjs --text <text>
Parameter Optional Description
text no

vatRegStatus(tin, date)

Run:

node runs/didox/vatRegStatus.mjs --tin <tin>
Parameter Optional Description
tin no
date no

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages