Created
May 14, 2017 22:55
-
-
Save gnardini/a199676fd96f03153b50ec6296ceed2e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
var opn = require('opn'); | |
const POSTFIX = 18 | |
var link = 'https://las.op.gg/multi/query=' | |
var total = 0 | |
var stdin = process.openStdin(); | |
stdin.addListener("data", function(d) { | |
var l = d.toString().trim() | |
link += l.substring(0, l.length-POSTFIX) + ',' | |
total++ | |
if (total == 5) { | |
console.log('\n\n' + link) | |
opn(link); | |
} | |
}); | |
console.log('Please paste the first lines of the game lobby.\n') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment