Skip to content

Instantly share code, notes, and snippets.

View vsemozhetbyt's full-sized avatar

Vse Mozhe Buty vsemozhetbyt

View GitHub Profile
/******************************************************************************/
'use strict';
/******************************************************************************/
const fs = require('fs');
const path = require('path');
const execFileSync = require('child_process').execFileSync;
const dir = process.argv[2] || '.';
const files = fs.readdirSync(dir)
.map(f => path.join(dir, f))
'use strict';
/******************************************************************************/
const fpath = process.argv[2];
if (!fpath) {
console.error('Add the file path, please.');
process.exit(1);
}
/******************************************************************************/
const fs = require('fs');
'use strict';
/******************************************************************************/
const path = process.argv[2];
if (!path) {
console.log('Add the file path, please.');
process.exit();
}
/******************************************************************************/
const fs = require('fs');
const rl = require('readline');
'use strict';
/******************************************************************************/
const path = process.argv[2];
if (!path) {
console.log('Add the file path, please.');
process.exit();
}
/******************************************************************************/
const fs = require('fs');
'use strict';
/******************************************************************************/
const fpath = process.argv[2];
if (!fpath) {
console.error('Add the file path, please.');
process.exit(1);
}
/******************************************************************************/
const fs = require('fs');
'use strict';
/******************************************************************************/
const fpath = process.argv[2];
if (!fpath) {
console.error('Add the file path, please.');
process.exit(1);
}
/******************************************************************************/
const fs = require('fs');
const gcs = {
Lu: 'ABC',
Ll: 'абв',
Lt: 'ᾼῌῼ',
get LC(){return this.Lu + this.Ll + this.Lt},
Lm: 'ʰʱʲ',
Lo: 'אבג',
get L() {return Object.keys(this).filter(k => /^L[a-z]$/.test(k))
.map(k => this[k])
/******************************************************************************/
'use strict';
/******************************************************************************/
const path = require('path');
const fpath = process.argv[2] || '';
const fext = path.extname(fpath);
if (!fpath || process.argv[3] || !['.gls', '.ifo'].includes(fext)) {
const scriptName = path.basename(__filename);
/******************************************************************************/
'use strict';
/******************************************************************************/
// progress bar as a module
module.exports = function pb(edge = 0) {
const rl = require('readline');
const DEFAULT_FREQ = 500;
const HUNDRED_PERCENT = 100;
/******************************************************************************/
'use strict';
/******************************************************************************/
const r = String.raw;
const startOfString = '^';
const notEscapeSymbol = r`[^\x5c]`;
const escapedEscapeSymbols = r`(?:${startOfString}|${notEscapeSymbol})(?:\x5c{2})+`;
const tag = r`\x5b[^\x5d]+\x5d`;