« get me outta code hell

Pass YouTube playlist URLs directly to mtui - mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
path: root/general-util.js
diff options
context:
space:
mode:
authorFlorrie <towerofnix@gmail.com>2018-06-26 12:01:43 -0300
committerFlorrie <towerofnix@gmail.com>2018-06-26 12:01:45 -0300
commit992911a021e2f2cccfbc63e554a3f34bd997cd91 (patch)
treed0cfdce2b2a5b47b699befc830f8c0b204d19be5 /general-util.js
parent84ad73f638fe0b03e173b8ffb545d8edb43acc3c (diff)
Pass YouTube playlist URLs directly to mtui
Or any other crawler argument, and it'll (try to) guess which crawler
you want to use automatically. Handy!
Diffstat (limited to 'general-util.js')
-rw-r--r--general-util.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/general-util.js b/general-util.js
index 2ce7ed4..7156274 100644
--- a/general-util.js
+++ b/general-util.js
@@ -1,6 +1,10 @@
 const { spawn } = require('child_process')
+const { promisify } = require('util')
+const fs = require('fs')
 const npmCommandExists = require('command-exists')
 
+const readFile = promisify(fs.readFile)
+
 module.exports.promisifyProcess = function(proc, showLogging = true) {
   // Takes a process (from the child_process module) and returns a promise
   // that resolves when the process exits (or rejects, if the exit code is