Overview
Comment: | [njs] Add TF option Chg how to set option |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | njs | nodejs |
Files: | files | file ages | folders |
SHA3-256: |
ee5d07774071340ca0e7cd8abeb77a97 |
User & Date: | IllusionPerdu on 2018-10-16 10:16:56 |
Original Comment: | [js] Add TF option Chg how to set option |
Other Links: | branch diff | manifest | tags |
Context
2018-10-17
| ||
13:30 | [graphspell][js] fix time calculation for suggestions check-in: ed091d83b9 user: olr tags: graphspell, nodejs | |
2018-10-16
| ||
10:16 | [njs] Add TF option Chg how to set option check-in: ee5d077740 user: IllusionPerdu tags: njs, nodejs | |
2018-10-15
| ||
21:00 | [njs] Minor change check-in: c5b6c3d6cb user: IllusionPerdu tags: njs, nodejs | |
Changes
Modified gc_lang/fr/nodejs/cli/bin/gramma-cli.js from [c328932d14] to [82063d3e76].
︙ | |||
19 20 21 22 23 24 25 | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | + - - + + + + + - + + - + + - + + - - - - - + + + + + + + + + + + + + + + + + + + | //Initialisation des messages const msgStart = "\x1b[31mBienvenu sur Grammalecte pour NodeJS!!!\x1b[0m\n"; const msgPrompt = "\x1b[36mGrammaJS\x1b[33m>\x1b[0m "; const msgSuite = "\x1b[33m…\x1b[0m "; const msgEnd = "\x1b[31m\x1b[5m\x1b[5mBye bye!\x1b[0m"; var repPreference = { |
︙ | |||
136 137 138 139 140 141 142 | 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 | - + | function toTitle(aStr) { return aStr.charAt(0).toUpperCase() + aStr.slice(1); } function repToText(oRep) { //console.log(oRep); let repText = ""; |
︙ | |||
314 315 316 317 318 319 320 | 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 | + - - - - - + + + + + - - - - + - - + + - - - - - - - - - + + + + + + + + + + + + + + | if (!isBool(aArg.text)) { sText = aArg.text; } repAction["text"] = sText; for (const action of ["json", "perf"]) { |
︙ | |||
369 370 371 372 373 374 375 | 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 | - + - + - + | repAction["help"].push(" * pour le client exemple: «gramma-cli --command \"mot/texte\"»."); repAction["help"].push(" * le serveur se lance avec la commande «gramma-cli --server --port 8085»."); repAction["help"].push(""); repAction["help"].push("========================= Les commandes/arguments: ========================"); repAction["help"].push(""); for (const action in cmdAction) { |
︙ |
Modified gc_lang/fr/nodejs/cli/data/script.gramma from [17bbb1df80] to [52bce34189].
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | - + - + - + - + + + + + | json false perf true spell salut suggest salut morph salut lemma salut |
Modified gc_lang/fr/nodejs/cli/readme.md from [d51a9c9fff] to [a056264171].
︙ | |||
10 11 12 13 14 15 16 | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | + + - - - - - - - - - - - + + + + + + + + + + + + - - + + | ## Installation > npm install grammalecte-cli -g ## Commandes | Commande | Argument | Description | | --------- | -------- | ------------------------------------------------------------- | |
︙ |
Modified gc_lang/fr/nodejs/core/api.js from [b4423d8bc1] to [a38bf9a7cd].
︙ | |||
128 129 130 131 132 133 134 135 136 | 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | + - + | if (!this.isInit.Grammalecte) { this.load(["Grammalecte"]); } if (sOptName) { this._oGce.setOption(sOptName, bValue); return this._helpers.mapToObject(this._oGce.getOptions()); } return false; } |
︙ | |||
230 231 232 233 234 235 236 237 238 239 240 241 242 243 | 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | formatText(sText){ if (!this.isInit.TextFormatter) { this.load(["TextFormatter"]); } return this.oTextFormatter.formatText(sText); } setTfOptions(dOptions) { if (!this.isInit.TextFormatter) { this.load(["TextFormatter"]); } this.oTextFormatter.setUsedOptions(dOptions); return this._helpers.mapToObject(this.oTextFormatter.getUsedOptions()); } setTfOption(sOptName, bValue) { if (!this.isInit.TextFormatter) { this.load(["TextFormatter"]); } if (sOptName) { let optionsTF = this.oTextFormatter.getUsedOptions(); optionsTF.set(sOptName, bValue); return this._helpers.mapToObject(this.oTextFormatter.getUsedOptions()); } return false; } resetTfOptions() { if (!this.isInit.TextFormatter) { this.load(["TextFormatter"]); } let optionsTF = this.oTextFormatter.getDefaultOptions(); this.oTextFormatter.setUsedOptions(optionsTF); return this._helpers.mapToObject(this.oTextFormatter.getUsedOptions()); } //fonctions concernant plussieurs parties verifParagraph(sText, bSuggest = true){ if (!this.isInit.Grammalecte || !this.isInit.Graphspell) { this.load(["Grammalecte"]); } return { |
︙ |