Skip to content

Instantly share code, notes, and snippets.

@siscia
Created January 10, 2012 20:46
Show Gist options
  • Save siscia/1591076 to your computer and use it in GitHub Desktop.
Save siscia/1591076 to your computer and use it in GitHub Desktop.
prove su clojutag
(ns clojutag.core
(:gen-class)
(:import [org.jaudiotagger.audio AudioFileIO]
[org.jaudiotagger.tag Tag FieldKey])
(:require [clojure.string :as str]))
(defn -main [& args]
(let [fl (new java.io.File "C:/Users/mosciatti/Desktop/Rihanna Umbrella PARODY Chris Brown - Copy.mp3")
inputfile (new AudioFileIO)
audiofile (.readFile inputfile fl)
tag (.getTag audiofile)
artist (.getFirst tag (. FieldKey ARTIST))
title (.getFirst tag (. FieldKey TITLE))]
(do
(.deleteTag inputfile audiofile)
(.createDefaultTag audiofile)
(.setField tag (. FieldKey ARTIST) (str/upper-case artist))
(.setField tag (. FieldKey TITLE) (str/upper-case title))
(.commit audiofile)
(println title "byyyyyyyyyyyyyyyyyyyyy" artist))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment