So... to be quick, this is my core.clj file:
(ns ffmpeg-in-a-jar.core
(:gen-class)
(:require [ffmpeg-in-a-jar.encoder :as encoder]))
(defn -main
"ffmpeg autoencoder made with Clojure"
[& args]
(println "Files will begin encoding..." ))
on encoder.clj file i've defined an user-defined loop counter:
(defn loop-cnt []
(println "How many files to encode?")
(def loopnum (read-string (read-line)))
(println "\n""Files ready to encode"))
(loop-cnt)
it is right after used in a loop to again request the user for more input:
(defn queue []
(loop [loopnum loopnum
file-queue []]
(if (not= loopnum 0)
(do
(def file-queue [])
(println "\n""Write filenames one by one")
(def add-queue (read-line))
(recur (dec loopnum) (conj file-queue add-queue)))
file-queue)))
im calling these with:
(loop-cnt)
(def queue-result (queue))
(println "\n""Added to the Encoding Queue:" "\n" queue-result "\n")
The real doubt im having is, how in the world is encoder even working, i use require to make it available but i've yet to call it inside -main with i guess should be:
(encoder/loop-cnt)
(println "\n" "Added to the Encoding Queue:" "\n" encoder/queue-result "\n")
is the ns macro doing something im unaware of?