   [& {:keys [zid zinvite] :as args}]
   (assert (xor zid zinvite))
   (let [zid (or zid (get-zid-from-zinvite zinvite))]
-    (load-conv zid)))
+    (db/load-conv zid)))
 
 
+(def cli-options
+  [["-z" "--zid ZID" "ZID on which to do a rerun" :parse-fn #(Integer/parseInt %)]
+   ["-Z" "--zinvite ZINVITE" "ZINVITE code on which to perform a rerun"]])
+
+
+(defn -main
+  [& args]
+  (let [{:keys [options arguments errors summary]} (parse-opts args cli-options)]
+    (apply-kwargs recompute options)))
+
+
+



(defn recompute
  [& args]
  (let [{:keys [options arguments errors summary]} (parse-opts args cli-options)
        {:keys [zid zinvite]} options
        _          (assert (xor zid zinvite))
        zid        (or zid (get-zid-from-zinvite zinvite))
        new-votes  (conv-poll zid)
        conv-agent ((cm/new-conv-agent-builder zid))]

            [clojure.tools.trace :as tr]
            [clojure.tools.logging :as log]
            [clojure.newtools.cli :refer [parse-opts]]))


(defn conv-poll
