Created
April 29, 2020 00:05
-
-
Save Sciss/0765fc2b111e3bcb2fdb11ca36ec6d7b to your computer and use it in GitHub Desktop.
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
val mainSq = (userHome / "Downloads" / "rb").children(f => f.extL == "pdf" && f.base.startsWith("p-")).sorted(File.NameOrdering) | |
mainSq.foreach(f => println(f.base)) | |
def runMain(): Unit = { | |
val out = userHome / "Downloads" / "rb" / "main.pdf" | |
require (!out.exists()) | |
import scala.sys.process._ | |
val cmd = Seq("pdftk") ++ mainSq.map(_.path) ++ Seq("cat", "output", out.path) | |
val code: Int = cmd.! | |
require (code == 0) | |
} | |
runMain() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment