Walking Home Drunk Simulator
- Comments:
- here.
Funniest thing I’ve seen. Ever.
Funniest thing I’ve seen. Ever.
Just surfing around, I found this site. Some guy has set up his computer so that you can choose songs to cue up on his system. I might just have to try something similar with my Xbox…
Seeing as how XBMC won’t read the id3 tags from AAC files, I had to grab the artwork from each album and place it in a file (folder.jpg/folder.png) inside the album folder. This was actually easier with Windows (aargh!), since iTunes for Windows exports album art as BMP files, which can then be processed. Still, it took me most of the afternoon to do that by hand. I had had a bash at doing it with an AppleScript, but could not work out how to get the data from a <<class PNG/JPEG *>> structure into an image file. Until I came across a script that does that. It was then a trivial matter to make it so that it worked for multiple files, and only processed those files it needed to, and ignored those without artwork. Tip: iTunes will give you an Out Of Memory Error if you try to get the data from a song that has no artworks! (Took me a while to figure this out!) So, the finished script can be found below. I optimised it a bit, but it still takes a while to run, especially if you run it on lots of tracks. Since it’s not something you’ll want to run every day, this shouldn’t be too much of a problem.
I also thought it would be neat to get the playlists I use in iTunes (I use mostly smart playlists, such as 50’s - 00’s Music, Not Played Today, Recently Added and so on), and use them on XBMC. So, I wrote a script that does this, and then ftp’s the resulting files to the xbox. You will need to edit the first few lines: it should be obvious what needs to go where. Anyway, you can download Export Artwork and Export Playlists. You can also download Bracket Change, a small script that swaps the round & square brackets in a track name. (Right-click and choose to download them, else they will just open in your browser window). All of these files should go into ~/Library/iTunes/Scripts (User only) or /Library/iTunes/Scripts (System-wide) for best effect. Note: The first Script is no longer required, since more recent builds of XBMC can handle the data from AAC files.
I typed schinckel.blogpsot.com into my browser, wanting to check out the links I had made, but got the address wrong. Have a look - it’s funny if you look at my post a little while ago. I thought some vengeful god was hacking me.
It’s ironic, how disorganised I am, because I love to organise things.
For instance, I have had a ball importing all of my CDs (okay, not all of them, yet) into iTunes, then finding all of the cover art (or eventually, scanning it so it was of a suitable quality), and making sure all of the tags were good.
Then re-importing them as AAC files because they are smaller (and better quality) than MP3.
Then getting all of the cases out for the fourth time to change the year of most songs, especially if they came from a compilation CD.
Then I discovered iPhoto, and have since been importing all of my digital images into that, and organising them. Eventually, I’ll scan all of my old photos, and add them in.
And check all of the dates (luckily, most of my photos are APS/Advantix, so they have a date associated with them!).
Even more recently (let’s be honest, importing the digital photos didn’t take that long. The scanning of the old photos will) I discovered Books, an OSX program that acts as a repository for storing info about your paper library.
And I have a fairly large library. I built a custom bookshelf in my study (two walls worth) and have filled it up. The great feature about Books, other than it is free is that it can do an on-line search for books according to the ISBN of the book. Even better, it can handle barcode inputs, not that I have a barcode scanner.
But it’s fun typing in the number, and letting Amazon.com give me the data.
What’s really fun is seeing how many of my old books (most of my library comes from 2nd hand stores, and I don’t ever throw out or sell a book. I don’t even like to lend them out) are in the Amazon database.
My earliest successes so far include some vintage Frank Herbert (e.g., The Santaroga Barrier, April 1971, ISBN 0-450-00823-1).
The funniest thing I have found is a book without an ISBN: Hulme, H.R., (1969) Nuclear Fusion, Wykeham Publications, London. Not sure if it pre-dates ISBNs, or this publisher just didn’t get one for this series (The Wykeham Science Series: For schools and universities).
Well, back to entering ISBNs.
After all of the mucking around with getting an AppleScript to work, and then using python anyway, I discovered a far faster method of adding tracks to iTunes: just drag the folder they all live in, and iTunes will only add the songs that aren’t in the Library yet! Probably well documented, but I didn’t find it! What you may need to do, particularly if multiple people need to be able to change MP3 Tags or artwork, is do the following:
Code to do this should be easy: find ~shared/Music -name *.m* -not -perm 664 -exec chmod 664 {}; find ~shared/Music -name *.m* -not -owner shared -exec chown shared:admin {}; But bash interprets the ; itself, and gives the following error: find: -exec: no terminating ";" Bitch. Can’t be bothered figuring out how to use another shell, so knock up a script in python: UpdateShared.py This script also updates the owner/group and permissions for files in ~shared/Movies and ~shared/iPhotoLibrary. Update: the ; must be \; for the bash commands to work.
Well, my four week stint of wearing a pedometer is over. I must say, I really enjoyed it, and it shows me I am not only quite active during the week, but pretty damn inactive over the weekends - unless I have Touch on. And even then, coaching means I walk a hell of a lot less than playing. But I guess I don’t really need a pedometer to tell me that! My highest step count was 20,022 steps: this was on a Thursday (when I play Touch) - I ran out of money and bus ticket, and had to walk home! My lowest step count was 1,415 steps - the Sunday after a 21st. You figure out why. My average over the whole month was 11,709 steps per day - more than the target of 10,000. My weekday average was 13,662; on the weekends (including public holidays) I averaged 7500. Over the whole time period, I did about 328,000 steps: the equivalent of walking to Kingston, S.E. Shame I didn’t make it to Robe.
Click on the image above to see a breakdown of my daily step counts.
I finally got around to downloading the 10.3.4 OS X update, SharePoints, and Xbox Media Centre (XBMC). My aim for some time has been to share my iTunes library to my Xbox, which is connected up to the TV and Stereo in the lounge.
The MacOS X update provided (apparently) updated Samba sharing, but I still couldn’t get XMP (Xbox Media Player - the previous incarnation of XBMC) to connect to the SMB share I had set up, with all of my MP3s on it. SharePoints fixed that - all I had to do was create a publicly available share.
Setting up XBMC was a breeze, and it even has a cool interface! UnleashX is (almost) banished from my system, and XBMC is my main Dash.
Then I discovered that XCMC can play AAC files! So, I started (and have not yet finished) converting all of my MP3s to AAC. And not just converting, but re-importing, at a bitrate of 128 (small file size, but apparently equivalent to 256 in MP3). See this hint for some tips (and my comments).
I also wanted to re-jig how I had set up sharing my iTunes songs between users - I had a couple of links to the relevant files in each user’s ~/Music/iTunes, and all files were located in ~shared/Music (which all of admin can RW, and all of the world can R). I needed to have seperate Library files, so that we can have our own ratings (I hate Abba, and she isn’t that big a fan of Paul Kelly, for instance). So, I knocked up a script that scanned the ~shared/Music folder and compared any files found to the iTunes LIbrary. If they weren’t in it, it added them.
Here we go:
|
|
Which worked, but was a bit slow. So I came up with the following system instead:
Create a file called ~/.last_check
Enter the following into a script, and then run it. (I’ve had to modify some lines to get it to look good - particularly the fp=os.popen… line).
|
|
Should be pretty quick - I only tested it with a few files, but seems to work okay. iTunes is even smart enough to not re-add files that are already there (I think!), so it won’t add duplicates!
My library lives in ~shared/Music, yours may vary!
You will, however, need to use something like Super Remove Dead Tracks if you update one library with a new encoder!
I accept no responsibility if it screws up your iTunes Library file!
Just for fun (actually, to see if Google I plugged in “Life According To Matt” (notice the quotes). I was happy to say that this blog came top of the results list, but I was amused to see the remainder:
From then on in, everything is bible related. Without the quotes, I come in number 3. Like anyone cares.
iTunes stores most of the meta-data about songs as id3 tags when you have MP3 files in your collection. I’m not sure what it does with AAC - probably they can have id3 tags or similar as well. However, some important bits of data are not stored - the play count, the rating and the added/played dates. Rating Writer (written by Cornelius Qualley) fixes some of this, but I thought I would expand it so that it stores the other bits. And so that it is smart about not overwriting comments. Enter iTunes MetaData BackUp.scpt. Once again I am reminded of how crap AppleScript is if you are not just doing something really basic. Python so rocks. Finally, though, I managed to get everything working, with one exception: you do not seem to be able to convert back into a date from a string, unless you just typed it in as code. I’ve tried, several times, including stripping out trailing newlines, and then finally by creating a function/subroutine to do it manually. But guess what. None of them actually work. iTunes will not accept any type of date back in. So, it only backs up and restores the rating and the played count. Hardly three hours work, in the end. Swears under breath.