{"id":139,"date":"2012-04-04T03:45:08","date_gmt":"2012-04-04T03:45:08","guid":{"rendered":"http:\/\/www.gironsec.com\/blog\/?p=139"},"modified":"2012-06-04T19:45:45","modified_gmt":"2012-06-04T19:45:45","slug":"the-id3-tag-and-c","status":"publish","type":"post","link":"https:\/\/www.gironsec.com\/blog\/2012\/04\/the-id3-tag-and-c\/","title":{"rendered":"The ID3 tag and C++"},"content":{"rendered":"<p>I have close to 140 GB of music, all mp3&#8217;s. From time to time I get stuck with file names which make no sense. The title and tag info is there, but not the file name. Since this is windows, I can&#8217;t just run a perl \/ bash command. Instead I wrote about 400 lines of classy C++ to go through each file in a directory based on a search term and rename the files based on their ID3 tag:<\/p>\n<pre><code>\r\n<\/code><\/pre>\n<p><pre><code class=\"C++\">\nint HowDoYouWantIt()\n{\nint selection;\nlolwut:\ncout &lt;&lt; &quot;How do you want your files named?\\r\\n&quot; ;\ncout &lt;&lt; &quot;1. &amp;lt;Artist&amp;gt; - &amp;lt;Title&amp;gt; (default)\\r\\n&quot;;\ncout &lt;&lt; &quot;2. &amp;lt;Artist&amp;gt; - &amp;lt;Title&amp;gt; &amp;lt;Album&amp;gt;\\r\\n&quot;;\ncout &lt;&lt; &quot;3. &amp;lt;Artist&amp;gt; - &amp;lt;Album&amp;gt; - &amp;lt;Year&amp;gt;\\r\\n&quot;;\ncout &lt;&lt; &quot;4. &amp;lt;Album&amp;gt; - &amp;lt;Title&amp;gt;\\r\\n&quot;;\ncout &lt;&lt; &quot;5. &amp;lt;Title&amp;gt; - &amp;lt;Year&amp;gt;\\r\\n&quot;;\ncout &lt;&lt; &quot;6. &amp;lt;Title&amp;gt;\\r\\n&quot;;\ncin &gt;&gt; selection;\n<\/code><\/pre><br \/>\nThis is proof that I&#8217;m not all hax. I code too.<\/p>\n<p>See it here<\/p>\n<p><a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2012\/04\/MassMp3rename_sauce.zip\">MassMp3rename_sauce<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have close to 140 GB of music, all mp3&#8217;s. From time to time I get stuck with file names which make no sense. The title and tag info is there, but not the file name. Since this is windows, I can&#8217;t just run a perl \/ bash command. Instead I wrote about 400 lines [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[4],"tags":[],"_links":{"self":[{"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/posts\/139"}],"collection":[{"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/comments?post=139"}],"version-history":[{"count":6,"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/posts\/139\/revisions"}],"predecessor-version":[{"id":171,"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/posts\/139\/revisions\/171"}],"wp:attachment":[{"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/media?parent=139"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/categories?post=139"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/tags?post=139"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}