Created
January 10, 2012 20:46
-
-
Save siscia/1591076 to your computer and use it in GitHub Desktop.
prove su clojutag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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