How to streamline cd ripping without tagging track data

CD tower to rip

Since we recently stopped using Spotify (mainly because I think having everything at your fingertips influences brain in a negative way) we switched to borrowing CDs from the local library (which, in our case is only 200m away from our house).

Now, because the kids get CDs at least once a week, I needed a way to quickly import those CDs into our Sonos system without too much hassle. Since the kids only borrow children stories (spoken audio) which often are not on MusicBrainz, I needed an easy way to tag them myself. Because I don’t care about tagging every single track (because you usually listen to a story start to end anyway), I wanted to have a streamlined process. The following script does:

  • Rip the CD and convert it to m4a (AAC encoding, slightly better compression than mp3)
  • Eject the CD
  • Ask me for the album and artist name
  • Opens chrome so I can choose an artwork
  • Convert the artwork to JPG in a reasonable size
  • Copies the music to the directory on my NAS
  • Triggers Sonos to update the music library

How to mass convert mp3 files to aac (m3a)

Since aac has a slightly better compression rate than mp3 (and, geez, mp3 was standardized 1992, there must be better standards nowaday), I decided to mass convert my music library from mp3 to aac

Won’t the quality be just awful?

Of course, re-encoding sounds like a terrible idea. You’re converting from one lossfull format to another, similar when mass-converting gifs to jpegs. But on the other hand, for my setting it was just good enough. The library I converted we listen to at home over Sonos or in the car. So in both settings there are only half-decent speakers. Also, many of the tracks I converted from audio cassettes, so they were in a bad quality already. You can certainly play with the bitrate, but if you have invested into an expensive stereo you’d be better off converting from a lossless source.

Declutter

First things first: Almost everything in life is easier if you first reduce it to the absolute necessity. I recently spoke with a colleague who told me she has converted her whole CD stack into mp3 without first trashing the CDs she never listens to. That’s insane.

First, reduce your collection to, say the albums you listened in the past 12 months. Make it 24. But anything beyond is just an overly burden you don’t need to carry.

No words! I just want to copy-paste

Here you go: Once, you haved cded into the directory with the mp3 files you want to convert, do this:

1
2
3
4
5
detox *.mp3
fmpeg -i *.mp3([1]) artwork.jpg
for i in *.mp3; do ~/bin/ffmpeg -i $i -c:a libfdk_aac -b:a 128k -vf scale=1280:-2 ${i/mp3/m4a}; done
for i in *.m4a; do AtomicParsley $i --artwork artwork.jpg --overWrite; done
rm artwork.jpg && rm *.mp3

Feature phone with tethering (Nokia Asha 302) - tune out of Internet

Since the days of the iPhone finding the right way to handle the mobile phone is challenging to me. Working in web programming and being a father and husband at the same time is means that I need to be able to connect to my colleagues at work when not at my desk while being able to “tune out” while being with my family.

My latest try at the problem was to buy a “feature phone” which was good enough to support the bare minimum (apart phone calls and SMS this is WhatsApp and internet tethering for my tablet/laptop) but was dumb enough that it would not tempt me away to check any news/mails while being with my family. I came across the “Nokia Asha 302” which is no longer produced but IMO was selling bad enough that there are some in stock in the most countries (at least that was in case here in Switzerland).

I’m on this “feature phone” now since a few days and must say that I’m quite happy with it. When I am at work I just take my android tablet (nvidia shield k1) with me, if I want to tune out I can leave the house with my mobile only. As it is an outdated phone there are some tweaks you need to do which I documented below:

Tutorial: Django on Appengine using Google Cloud SQL - Adaptations for Python 2.5

Google App Engine has two Python runtimes, either 2.7.3 or 2.5.2. You should try to develop for 2.7, as it’s the current default on GAE and all the documentations often only describe this Python version.

Additionally: If you use Python 2.5 you can only use Django up to version 1.3. (At least I couldn’t find out how to get version 1.4 working, use_library('django', '1.3') would fail if setting 1.4

If you’re stuck with Python below 2.7 for any reason, that’s what you need to change following my tutorial in order to get it working for Python 2.5:

How to migrate your wordpress to tumblr. Including images and comments.

So I’ve decided to move my wordpress blogs to tumblr. Although apparently TechCrunch thinks that’s a bad idea. And although Moritz Adler would kill me for that. (Although: He doesn’t have a personal blog and hence has no licence to kill me). Anyway. With tumblr I don’t need to host a blog software myself. And I don’t end up having my blog hacked and then seeing my blog being displayed as a malware site in Chrome/Firefox (happened to me twice). And then with tumblr I create new blogs with subdomains within minutes. Cool stuff. Hail to the cloud, baby!

So here you go: A complete guide how to fully migrate your wordpress blog to tumblr. Including comments and pictures. And still supporting your old url scheme.

Update: I ran into a tool that claims to do a lot for you: import2.com/tumblr. It doesn’t migrate images and 302 redirects. Not sure about comments migration. And it costs 24$. Still, if you can leave out some of the steps below that’d be worth the money. Comments of the author on quora

How to fix Jambox’ “static noise and no bluetooth sound” problem(includes soldering)

fixed!

Jambox is a pretty cool device: The sound quality is very good, it is small, it has a battery. I liked it. Until it broke. It just didn’t play music over bluetooth any more but instead uttered static noise. This seems to be a quite severe production problem as many many many people have devices with the exact same problem. So going down the “Jambox please replace my device” way didn’t sound promising to me. The possibility that the replacement device is broken as well is just too high.

The problem lies in the aux in port. The device thinks there’s an aux cable plugged in and outputs the signal from the aux input when in fact it should play the bluetooth sound.

Python: Print list of dicts as ascii table

Sometimes I want to print list of dicts as an ascii table, like this:

  | Programming Language | Language Type | Years of Experience |
  +----------------------+---------------+---------------------+
  | python               | script        |                    4 |
  | php                  | script        |                    5 |
  | java                 | compiled      |                   11 |
  | assember             | compiled      |                   15 |

I searched on Google - but without luck.