Skip to content

Commit

Permalink
Shortening subcommands
Browse files Browse the repository at this point in the history
  • Loading branch information
dwysocki committed Apr 22, 2015
1 parent 97292f1 commit 8a17b52
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 38 deletions.
21 changes: 11 additions & 10 deletions src/hidden_markov_music/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,20 @@
Currently no such interface exists."
(:require [clojure.tools.cli :refer [parse-opts]]
[clojure.string :as string]
[hidden-markov-music.util :as util]
[hidden-markov-music.alphabet :as alphabet]
[hidden-markov-music.model.core :as model]
[hidden-markov-music.demo.core :as demo])
[hidden-markov-music.util :as util]
[hidden-markov-music.alphabet :as alphabet]
[hidden-markov-music.model.init :as init]
[hidden-markov-music.model.train :as train]
[hidden-markov-music.model.sample :as sample]
[hidden-markov-music.demo.core :as demo])
(:gen-class))

(def cli-arguments
{"alphabet" [alphabet/main
"Create an alphabet"]
"model" [model/main
"Perform an operation on a model"]
"demo" [demo/main
"Various demonstrations"]})
{"alphabet" [alphabet/main "Create an alphabet"],
"init" [init/main "Initialize a model"],
"train" [train/main "Train a model"],
"sample" [sample/main "Sample from a model"],
"demo" [demo/main "Various demonstrations"]})

(def description
"hidden-markov-music [<options>] <argument> [<args>]")
Expand Down
25 changes: 0 additions & 25 deletions src/hidden_markov_music/model/core.clj

This file was deleted.

2 changes: 1 addition & 1 deletion src/hidden_markov_music/model/init.clj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"Mode may either be 'random' or 'uniform', and determines whether"
"the probabilities are initialized randomly or uniformly."
""
"Usage: hidden-markov-music model init [<options>] <mode>"]
"Usage: hidden-markov-music init [<options>] <mode>"]
(string/join \newline))))

(def cli-options
Expand Down
2 changes: 1 addition & 1 deletion src/hidden_markov_music/model/sample.clj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
(->> ["Takes a model from standard input and writes a sample observation"
"sequence to a file."
""
"Usage: hidden-markov-music model sample [<options>] <file>"]
"Usage: hidden-markov-music sample [<options>] <file>"]
(string/join \newline))))

(def cli-options
Expand Down
2 changes: 1 addition & 1 deletion src/hidden_markov_music/model/train.clj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"appropriately, otherwise each line of the file is treated as an"
"observation symbol."
""
"Usage: hidden-markov-music model train [<options>] <observations>"]
"Usage: hidden-markov-music train [<options>] <observations>"]
(string/join \newline))))

(def cli-options
Expand Down

0 comments on commit 8a17b52

Please sign in to comment.