remove manual main definitions
This commit is contained in:
@@ -1,2 +1 @@
|
||||
(function :Void main []
|
||||
(print "Hello world!"))
|
||||
(print "Hello world!")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
(load "UtilMacros.kiss")
|
||||
(function :Void main []
|
||||
|
||||
(year 2018
|
||||
(Solutions2018.run))
|
||||
(year 2020
|
||||
(Solutions2020.run)))
|
||||
(Solutions2020.run))
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
(function :Void main []
|
||||
(print "Hello world!"))
|
||||
(print "Hello world!")
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
(function :Void main []
|
||||
(let [[jsonFile workingDir]
|
||||
(Sys.args)
|
||||
json
|
||||
@@ -13,4 +12,4 @@
|
||||
(versionParts.join ".")]
|
||||
(print "Bumping version of $jsonFile from $oldVersion -> $newVersion")
|
||||
(set json.version newVersion)
|
||||
(File.saveContent (joinPath workingDir jsonFile) (Json.stringify json "\t")))))
|
||||
(File.saveContent (joinPath workingDir jsonFile) (Json.stringify json "\t"))))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// External programs can load Lib.kiss with (loadFrom "nat-archive-tool" "src/nat/Lib.kiss")
|
||||
(load "Lib.kiss")
|
||||
|
||||
(function :Void main []
|
||||
(let [[archiveDir] (Sys.args)
|
||||
controller
|
||||
(new ArchiveController
|
||||
@@ -12,7 +12,7 @@
|
||||
(.trim (.toString (.readLine (Sys.stdin))))]
|
||||
(if (controller.commands.exists command)
|
||||
(controller.runCommand (dictGet controller.commands command))
|
||||
(Sys.println "$command is not a valid command"))))))
|
||||
(Sys.println "$command is not a valid command")))))
|
||||
|
||||
(defNew [])
|
||||
|
||||
|
||||
@@ -1,17 +1,12 @@
|
||||
// TODO external programs need to be able to find and (load) this path to get the macros:
|
||||
// ^ That should be solved by allowing an optional first argument to load that is a symbol
|
||||
// of a library name that can be used to resolve the source dir in the user's Haxelib maybe?
|
||||
// External programs can load Lib.kiss with (loadFrom "nat-archive-tool" "src/nat/Lib.kiss")
|
||||
(load "../nat/Lib.kiss")
|
||||
|
||||
|
||||
(function :Void main []
|
||||
(assert (BoolExpInterp.eval "true" []))
|
||||
(assert !(BoolExpInterp.eval "false" []))
|
||||
(assert !(BoolExpInterp.eval "flag" []))
|
||||
(assert (BoolExpInterp.eval "flag" ["flag"]))
|
||||
(assert !(BoolExpInterp.eval "(and flag false)" ["flag"]))
|
||||
(assert (BoolExpInterp.eval "(or flag otherFlag)" ["otherFlag"]))
|
||||
//trace(error);
|
||||
(let [archive
|
||||
(new Archive "src/test/example-archive")
|
||||
song1
|
||||
@@ -32,4 +27,4 @@
|
||||
[author Author
|
||||
name Name]
|
||||
(assert (= author "Rafael Krux"))
|
||||
(assert (= name "Adventure")))))
|
||||
(assert (= name "Adventure"))))
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
// TODO add sequentialPerPDF argument (which, when used, .shift()s pages from the beginning of PDFs)
|
||||
// TODO add chunkSize argument (default 1, which specifies how many pages in order to pull from a random PDF. value of -1 means take the whole PDF, and remove it from the list)
|
||||
// TODO make output page limit optional
|
||||
(function :Void main []
|
||||
(let [[sourceDir numPages] (Sys.args)]
|
||||
(loadAll (for file (Fs.readdirSync sourceDir) (+ sourceDir "/" file))
|
||||
(lambda [:Array<PDFDocument> inputPdfs]
|
||||
@@ -25,4 +24,4 @@
|
||||
(saladPdf.copyPages pdf [page]))))]
|
||||
(doFor page pages (saladPdf.addPage (first page)))
|
||||
(awaitLet [bytesOut (saladPdf.save)]
|
||||
(Fs.writeFileSync "out.pdf" bytesOut)))))))
|
||||
(Fs.writeFileSync "out.pdf" bytesOut))))))
|
||||
|
||||
Reference in New Issue
Block a user