diff options
author | Florrie <towerofnix@gmail.com> | 2017-10-27 10:36:11 -0300 |
---|---|---|
committer | Florrie <towerofnix@gmail.com> | 2017-10-27 10:36:49 -0300 |
commit | 735a18152295c081371b9bdccf78448f04765b36 (patch) | |
tree | 976515f0b0d23554bf0778f8ecc529f268cfd9e8 /src/crawl-http.js | |
parent | 7c125fb006af7f64043bd66305a3c41953a1b83c (diff) |
Add simple setup wizard (http-music setup)
..and create/update related man pages. Try it!
Diffstat (limited to 'src/crawl-http.js')
-rwxr-xr-x | src/crawl-http.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/crawl-http.js b/src/crawl-http.js index 4925f12..d3e1533 100755 --- a/src/crawl-http.js +++ b/src/crawl-http.js @@ -147,7 +147,7 @@ function getHTMLLinks(text) { }) } -async function main(args) { +async function main(args, shouldReturn = false) { if (args.length === 0) { console.log("Usage: crawl-http http://.../example/path/ [opts]") return @@ -202,7 +202,12 @@ async function main(args) { filterRegex: filterRegex }) - console.log(JSON.stringify(downloadedPlaylist, null, 2)) + const str = JSON.stringify(downloadedPlaylist, null, 2) + if (shouldReturn) { + return str + } else { + console.log(str) + } } module.exports = {main, crawl} |