 (def ^:private cli-options
   [["-c" "--config CONFIG" "Path to configuration file in EDN"
     :parse-fn #(edn/read-string (slurp %))]
+   ["-t" "--task TASK" "Task to execute. Either 'questions' or 'difficulties'."
+    :validate [#{"questions" "difficulties"} "Task to execute must be either 'questions' or 'difficulties'."]]
    ["-h" "--help" "Display help message"]])
 
 ; ----- Public functions -----
 
 (defn -main
   [& args]
-  (let [{{:keys [config help]} :options
+  (let [{{:keys [config help task]} :options
          :keys [errors summary]} (parse-opts args cli-options)]
     (cond help (exit 0 (usage summary)) 
           errors (exit 1 (error-msg errors))
           :else (if-let [error (validate-config config)]
                     (exit 1 error)
-                    (prepare/execute config)))))
+                    (prepare/execute config task)))))


(def ^:private positive-number (s/both s/Int (s/pred pos? 'pos?)))

(def ^:private Config
  {:sparql-endpoint {:url sc/URI
                     :username s/Str

(defn- usage
  "Wrap usage `summary` in a description of the program."
  [summary]
  (join-lines ["DB-quiz data pre-processing tool"
               "Options:\n"
               summary]))

