Skip to content

Commit

Permalink
Upload to S3. That was *too* easy.
Browse files Browse the repository at this point in the history
  • Loading branch information
mwunsch committed Jan 19, 2016
1 parent a2722b9 commit 2ac3273
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/sonic_sketches/core.clj
Expand Up @@ -82,6 +82,12 @@

(defn -main
[& args]
(let [tempfile (java.io.File/createTempFile "test" ".wav")
path (.getPath tempfile)]
(make-recording path (play (metronome 120) auld-lang-syne))))
(let [aws-credentials {:profile "sonic-sketch"}
tempfile (java.io.File/createTempFile "test" ".wav")
path (.getPath tempfile)
recorded-path (make-recording path (play (metronome 120) auld-lang-syne))
recording (java.io.File. recorded-path)]
(s3/put-object aws-credentials
:bucket-name "sonic-sketches"
:key (.getName recording)
:file recording)))

0 comments on commit 2ac3273

Please sign in to comment.