This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
/******************************************************************************/ | |
const path = process.argv[2]; | |
if (!path) { | |
console.log('Add the file path, please.'); | |
process.exit(); | |
} | |
/******************************************************************************/ | |
const fs = require('fs'); | |
const stringWidth = require('string-width'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
/******************************************************************************/ | |
const path = process.argv[2]; | |
let linesPerPage = Number(process.argv[3]); | |
if (!path || !linesPerPage) { | |
console.log('Add the file path and lines per page number, please.'); | |
process.exit(); | |
} | |
linesPerPage -= 2; | |
/******************************************************************************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
/******************************************************************************/ | |
const path = process.argv[2]; | |
if (!path) { | |
console.log('Add the file path, please.'); | |
process.exit(); | |
} | |
/******************************************************************************/ | |
const fs = require('fs'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
/******************************************************************************/ | |
const path = process.argv[2]; | |
const linesPerPage = Number(process.argv[3]); | |
const splitByPages = Number(process.argv[4]); | |
if (!path || !linesPerPage || !splitByPages) { | |
console.log( | |
'Add the file path, lines per page and split by pages numbers, please.'); | |
process.exit(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
/******************************************************************************/ | |
const hrstart = process.hrtime(); | |
const fs = require('fs'); | |
const readline = require('readline'); | |
const getByteLength = Buffer.byteLength; | |
const inputPath = process.argv[2]; | |
const outputPath = process.argv[3]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
/******************************************************************************/ | |
console.log('Requiring modules...'); | |
const fs = require('fs'); | |
const path = require('path'); | |
const readline = require('readline'); | |
const execSync = require('child_process').execFileSync; | |
const urlParser = require('url'); | |
const jsdom = require('jsdom'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset='UTF-8'> | |
<title>Save WordSpy.com</title> | |
<style> | |
body * {margin-bottom: 10px; font-family: monospace;} | |
label {white-space: pre;} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/******************************************************************************/ | |
'use strict'; | |
const fs = require('fs'); | |
const pth = require('path'); | |
const readline = require('readline'); | |
const nwWin = nw.Window.get(); | |
const nwDoc = window.document; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/******************************************************************************/ | |
'use strict'; | |
/******************************************************************************/ | |
const fs = require('fs'); | |
const path = require('path'); | |
const outCoding = 'utf8'; | |
process.argv.slice(2).forEach(processSRT); | |
/******************************************************************************/ |