]> git.lizzy.rs Git - horimiya-dl.git/blobdiff - init.js
Style fixes
[horimiya-dl.git] / init.js
diff --git a/init.js b/init.js
index f1428cdc4c6bc906650d0865c7c200632a2b5b68..c64f6d78b71d51891695ce1563b09ca615b492b5 100644 (file)
--- a/init.js
+++ b/init.js
@@ -1,4 +1,3 @@
-// GPLv3 License
 const fs = require("fs")
 const download = require("download")
 const cliProgress = require("cli-progress")
@@ -9,7 +8,7 @@ const url = "http://images.mangafreak.net/downloads/Horimiya_"
 const chapters = 124
 
 const bar = new cliProgress.SingleBar({}, cliProgress.Presets.legacy)
-bar.start(chapters, 0, { speed: "N/A" })
+bar.start(chapters, 0, {speed: "N/A"})
 
 const doc = new pdfkit({autoFirstPage: false})
 doc.pipe(fs.createWriteStream("Horimiya.pdf"))
@@ -20,7 +19,7 @@ fs.promises.rm("pages", {recursive: true, force: true})
                .fill(null)
                .map((_, i) => i + 1)
                .map(n => download(url + n)
-                       .pipe(unzipper.Extract({ path: "pages" }))
+                       .pipe(unzipper.Extract({path: "pages"}))
                        .promise()
                        .then(_ => bar.increment())     
                )
@@ -28,7 +27,7 @@ fs.promises.rm("pages", {recursive: true, force: true})
        .then(_ => bar.stop())
        .then(_ => fs.promises.readdir("pages"))
        .then(files => files
-               .sort(new Intl.Collator(undefined, { numeric: true }).compare)
+               .sort(new Intl.Collator(undefined, {numeric: true}).compare)
                .map(file => "pages/" + file)
                .map(file => doc.openImage(file))
                .forEach(img => doc.addPage({size: [img.width, img.height]}).image(img, 0, 0))