Skip to content

Instantly share code, notes, and snippets.

@jebberjeb
Last active December 25, 2015 15:39
Show Gist options
  • Save jebberjeb/6999689 to your computer and use it in GitHub Desktop.
Save jebberjeb/6999689 to your computer and use it in GitHub Desktop.
(ns cli-tools-app.core
(:require [clojure.tools.cli :refer [cli]])
(:gen-class))
(defn parse-args
[args]
(cli args
["-u" "--username" "PropSol API username" :default
"rentpath@trinitypm"]
["-p" "--password" "PropSol API password" :default
"rentpathtrinity"]
["-d" "--domain-prefix" "PropSol API domain prefix ":default
"trinitypm"]
["-k" "--kingsley-file" "Name of Kingsley CSV file" :default
"kingsley.csv"]
["-v" "--vijaya-file" "Name of Vijaya XML file" :default
"vijaya.xml"]
["-h" "--help" "Show this help" :default false :flag true]))
(defn -main
[& args]
(let [[options args banner] (parse-args args)]
(when (:help options)
(println banner))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment