{"id":422,"date":"2009-10-15T18:41:10","date_gmt":"2009-10-15T13:11:10","guid":{"rendered":"http:\/\/judepereira.com\/blog\/?p=422"},"modified":"2009-10-15T18:41:10","modified_gmt":"2009-10-15T13:11:10","slug":"easily-sort-your-music-library","status":"publish","type":"post","link":"https:\/\/judepereira.com\/blog\/easily-sort-your-music-library\/","title":{"rendered":"Easily Sort Your Music Library"},"content":{"rendered":"<p>Here is a very simple script to sort your whole music library according to their artists,<br \/>\n[sourcecode language=&#8217;bash&#8217;]<br \/>\n#!\/bin\/bash<br \/>\n# sortMusic v0.4<br \/>\n# make sure this script in in the music directory and you execute this script from there<br \/>\n# know issue: will display many errors, but it does it fine, those errors are not to be bothered about<br \/>\n# still needs a workaround<br \/>\necho &#8220;$(ls -l *.mp3 | wc -l) Files will be sorted according to their Artists&#8221;<br \/>\necho &#8220;Make sure all your song artists are correct, will wait for 3 seconds&#8230;&#8221;<br \/>\nsleep 3<br \/>\nfor i in .\/*; do<br \/>\n\tartist=$(mp3info &#8220;$i&#8221; | sed -n &#8216;s\/Artist: *\/\/p&#8217;)<br \/>\n\tif [ -d &#8220;$artist&#8221; ]; then<br \/>\n\t\tmv &#8220;$i&#8221; &#8220;$artist&#8221;<br \/>\n\telse<br \/>\n\t\tmkdir &#8220;$artist&#8221;<br \/>\n\t\tmv &#8220;$i&#8221; &#8220;$artist&#8221;<br \/>\n\tfi<br \/>\ndone<br \/>\n# To move all the incorrect id3 artists<br \/>\nmkdir &#8220;Z Singles Z&#8221;<br \/>\nmv *.mp3 &#8220;Z Singles Z&#8221;<\/p>\n<p># That was very simple, wasn&#8217;t it?<br \/>\n[\/sourcecode]<br \/>\nJust make a file called <em>sortMusic-v0.4<\/em> in your main music folder, paste the above code into that file, then do <em>$ chmod +x sortMusic-v0.4<\/em> and then do a<em> $ .\/sortMusic-v0.4<\/em> in the music folder. Please download <a href=\"http:\/\/www.ibiblio.org\/mp3info\/\" target=\"_blank\"><em>mp3info<\/em><\/a> as this uses that package. Please note that this is very case-sensitive, so if your artists are same but differ in case, it will make a new directory for that one, so please take care until I have a workaround for this.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here is a very simple script to sort your whole music library according to their artists, [sourcecode language=&#8217;bash&#8217;] #!\/bin\/bash # sortMusic v0.4 # make sure this script in in the music directory and you execute this script from there # know issue: will display many errors, but it does it fine, those errors are not [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[52],"tags":[82,83,80,81],"class_list":["post-422","post","type-post","status-publish","format-standard","hentry","category-code","tag-artist","tag-library","tag-music","tag-sort"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pqtyx-6O","jetpack-related-posts":[{"id":1675,"url":"https:\/\/judepereira.com\/blog\/sending-notifications-via-apples-new-http2-api-using-jetty-9-3-6\/","url_meta":{"origin":422,"position":0},"title":"Sending notifications via Apple&#8217;s new HTTP\/2 API (using Jetty 9.3.6)","author":"Jude Pereira","date":"January 9, 2016","format":false,"excerpt":"HTTP\/2 is still very much new to Java, and as such, there are just two libraries who support it - Jetty (from 9.3), and Netty (in alpha). If you're going the Jetty way (as I have), you'll need to add their ALPN library to your boot classpath. Note: Jetty 9.3.x\u2026","rel":"","context":"In &quot;another snippet | code&quot;","block_context":{"text":"another snippet | code","link":"https:\/\/judepereira.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1635,"url":"https:\/\/judepereira.com\/blog\/discover-my-second-ios-app\/","url_meta":{"origin":422,"position":1},"title":"Discover &#8211; my second iOS app","author":"Jude Pereira","date":"July 5, 2015","format":false,"excerpt":"iTunes Genius is a great feature. However, it lacks music discovery outside your own music library. Sure, you can always do a Google search for similar tunes, but let's face it - who has time to do this anymore? There weren't any great music discovery apps on the App Store\u2026","rel":"","context":"In &quot;ios&quot;","block_context":{"text":"ios","link":"https:\/\/judepereira.com\/blog\/category\/code\/ios\/"},"img":{"alt_text":"Highlights of Discover","src":"https:\/\/i0.wp.com\/judepereira.com\/blog\/wp-content\/uploads\/feature-both-small.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/judepereira.com\/blog\/wp-content\/uploads\/feature-both-small.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/judepereira.com\/blog\/wp-content\/uploads\/feature-both-small.png?resize=525%2C300 1.5x, https:\/\/i0.wp.com\/judepereira.com\/blog\/wp-content\/uploads\/feature-both-small.png?resize=700%2C400 2x"},"classes":[]},{"id":1936,"url":"https:\/\/judepereira.com\/blog\/taming-a-throttled-api-with-dynamic-proxies-in-java\/","url_meta":{"origin":422,"position":2},"title":"Taming a throttled API with Dynamic Proxies in Java","author":"Jude Pereira","date":"January 20, 2021","format":false,"excerpt":"Recently, at CleverTap, we've begun migrating some of our largest clusters to a new protocol (for starters, think ~115 instances at a time). One of the most fun things I've had my hands on during this migration was the AWS Systems Manager API. When we scaled up our migrations gradually\u2026","rel":"","context":"In &quot;another snippet | code&quot;","block_context":{"text":"another snippet | code","link":"https:\/\/judepereira.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1659,"url":"https:\/\/judepereira.com\/blog\/clion-and-openframeworks\/","url_meta":{"origin":422,"position":3},"title":"CLion 1.1.1 and openFrameworks 0.8.4","author":"Jude Pereira","date":"October 2, 2015","format":false,"excerpt":"A basic template to start building oF projects using CMake within CLion. It's here on GitHub! All credits go to kureta for the CMake files. I've just pieced it together as a project which can be imported.","rel":"","context":"In &quot;another snippet | code&quot;","block_context":{"text":"another snippet | code","link":"https:\/\/judepereira.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1665,"url":"https:\/\/judepereira.com\/blog\/openframeworks-and-appcode\/","url_meta":{"origin":422,"position":4},"title":"openFrameworks and AppCode","author":"Jude Pereira","date":"November 8, 2015","format":false,"excerpt":"Developing an openFrameworks app with AppCode is pretty easy. However, if you just open and run the project created by the project generator, you might see the following errors: Why doesn't it just work? This is because openFrameworks doesn't support 64 bit builds yet on the Mac, due to a\u2026","rel":"","context":"In &quot;another snippet | code&quot;","block_context":{"text":"another snippet | code","link":"https:\/\/judepereira.com\/blog\/category\/code\/"},"img":{"alt_text":"Building a stock openFrameworks app results in these errors","src":"https:\/\/i0.wp.com\/judepereira.com\/blog\/wp-content\/uploads\/fails_by_default-1024x407.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/judepereira.com\/blog\/wp-content\/uploads\/fails_by_default-1024x407.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/judepereira.com\/blog\/wp-content\/uploads\/fails_by_default-1024x407.png?resize=525%2C300 1.5x"},"classes":[]},{"id":1918,"url":"https:\/\/judepereira.com\/blog\/sending-ota-updates-over-wifi-to-your-esp8266\/","url_meta":{"origin":422,"position":5},"title":"Sending OTA updates over WiFi to your ESP8266","author":"Jude Pereira","date":"December 21, 2020","format":false,"excerpt":"This Christmas, I added a whole bunch of lights powered by 5V power sources. My goal was to switch them on at sunset, and switch them off on sunrise, by using a MOSFET for power control :) While I was doing this, I wanted to send OTA updates of my\u2026","rel":"","context":"In &quot;another snippet | code&quot;","block_context":{"text":"another snippet | code","link":"https:\/\/judepereira.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/judepereira.com\/blog\/wp-json\/wp\/v2\/posts\/422","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/judepereira.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/judepereira.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/judepereira.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/judepereira.com\/blog\/wp-json\/wp\/v2\/comments?post=422"}],"version-history":[{"count":9,"href":"https:\/\/judepereira.com\/blog\/wp-json\/wp\/v2\/posts\/422\/revisions"}],"predecessor-version":[{"id":431,"href":"https:\/\/judepereira.com\/blog\/wp-json\/wp\/v2\/posts\/422\/revisions\/431"}],"wp:attachment":[{"href":"https:\/\/judepereira.com\/blog\/wp-json\/wp\/v2\/media?parent=422"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/judepereira.com\/blog\/wp-json\/wp\/v2\/categories?post=422"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/judepereira.com\/blog\/wp-json\/wp\/v2\/tags?post=422"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}