Created
November 29, 2012 20:45
-
-
Save mschmitt/4171792 to your computer and use it in GitHub Desktop.
m4a.nonymize - Strip tags from purchased and/or matched M4A files.
This file contains hidden or 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
#!/usr/bin/perl -w | |
use strict; | |
use diagnostics; | |
use Audio::M4P::QuickTime; | |
# m4a.nonymize | |
# | |
# Strip tags from purchased and/or matched M4A files. | |
# | |
# Use: m4a.nonymize file [file] [file] ... | |
# | |
# Modifies the specified files in-place. | |
# | |
# e.g.: | |
# find ~/Music/iTunes/ -name '*.m4a' -print0 | xargs -0 m4a.nonymize | |
# | |
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | |
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | |
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
foreach my $file (@ARGV){ | |
my $qt = Audio::M4P::QuickTime->new(file => $file); | |
$qt->CleanAppleM4aPersonalData(); | |
$qt->WriteFile($file); | |
print "Cleaned: $file\n"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment