Programming and Exciting Things

PlaylistGrabber 1.1 (UI Revisions)

July 26, 2014

icon_128@2xDue to the large response to the initial release of PlaylistGrabber, I have quickly revised some of the UI and functionality to bring it up to scratch with user expectations.

Changelog:

  • Added App Icon (Green iTunes yeah close enough)
  • You can now select a playlist by clicking the entire row, not just the checkbox
  • PlaylistGrabber now remembers what playlists you selected last time
  • You can save your progress of playlist selection by pressing “Save Selected”
  • PlaylistGrabber now remembers what XML File you last used. Quick and Easy Startup.
  • PlaylistGrabber skips copying files that already exist in the destination (good if you’re using a cloud service). It will however re-generate M3U Files so you will get playlist updates.
  • Tableview now has pretty icons
  • Tableview nests items inside folders at their level as depicted within itunes. Wish i could indent the icon too.
  • “About” window updated.
  • Auto build incrementing (current release is build 110)
  • Automatically quits app on window close.

Things I’d Like it to do better

  • Nest icons for folder indentation levels
  • Delete songs when a playlist is de-selected. This could prove quite tricky

I’m pretty happy with what I have achieved over the few hours I’ve worked on this project. And after all, I’ve learnt how to program for Mac OSX.

Help Me Out

I am currently a student, studying Computer Science at the University of New South Wales, Australia. If you like this app, please consider donating – The more donations, the more incentive for me to bring new features.









Download

You can download release 1.1 build 110 here:

  • PlaylistGrabber (.app, drag to your applications folder to install, run whenever you want to enumerate music on your device)

Screenshots

Screen Shot 2014-07-27 at 1.49.06 am

Screen Shot 2014-07-27 at 1.49.46 am

Screen Shot 2014-07-27 at 1.49.35 am

Screen Shot 2014-07-27 at 1.49.12 am

PlaylistGrabber for OSX/iTunes

July 26, 2014

Spotify was great. I had my music everywhere, could add new music without a computer, however it lacked in a major area – Playlists. It seems to be a growing trend of music players to suck at this. Being unable to shuffle all music on the device is also a massive drawback. I will be cancelling my Spotify subscription once my 3 month trial is over.

Screen Shot 2014-07-26 at 4.12.13 pmLet me introduce PlaylistGrabber for OSX. This is my first Cocoa application, targeted at 10.8 and upwards (not tested much). PlaylistGrabber reads your iTunes library XML file, and allows you to choose playlists to export. It creates a folder structure that you can drag and drop onto your device (or export directly to the device if you have mass storage capabilities). It exports playlists in M3U format and understands that the duplicate songs in different playlists are the SAME song – so no stupid duplicates in your library, just as iTunes handles it.

Due to the nature and simplicity of M3U playlists, most music players understand these, including PowerApp, Samsung Music App and Google Play Music. This is good news, as now you are free to roam to other solutions than DoubleTwist for all your iTunes Syncing needs.

Eventually I will tidy up the application, however at this present time, I do not have enough time to do so. Eventually I would like to make the app do the following:

  • Save Chosen Playlist Preferences for re-loading later on if a user decides they want to re-sync Implemented in newest version.
  • Sync Daemon – Watches when Library Changes, and writes changes to a sync directory, from where you could auto sync with google drive
  • Wifi Sync (With a client app on the phone)
  • Better Async Handling so the program doesn’t appear to “Lock Up”

If you want to download this and try it out, feel free to: PlaylistGrabber. If you come across any bugs or have any suggestions, let me know, it’ll be nice to track them in the future for new releases in summer this year.

Latest version is available here

Continue reading »

Flask, Flask-SQLAlchemy & Flask-Security

July 19, 2014

My last 3 weeks has mostly consisted of programming for a Flask Web Environment.

What is flask? Flask is a fancy python library allowing rapid web application, api, and interface development. It tackles many of the hard parts of programming web apps in nice and easy paradigms.

Flask has many extensions available, two being Flask-SQLAlchemy and Flask-Security. These two are must haves for any kind of application development involving a database and a level of security management.

Back in my PHP days, I would slave away and create a fancy PHP permissions structure for whatever web application I was writing. Horrible. Probably filled with vulnerabilities & all sorts of bad things. Flask-Security is made so you don’t need to do this.

How about SQLAlchemy? SQLAlchemy is a database interface wrapper, but it’s more than just a wrapper. It does ORM, which means you can represent your database entities as objects/classes. A very similar paradigm to both CoreData on iOS AND my own, NWRestful/NWManagedObjects framework.

So, how do we use all this?

As this isn’t a tutorial, I won’t go through it, however there are some AMAZING examples hosted on the Flask website and the Flask-SQLAlchemy website. I cannot say the same for Flask-Security however.

Over my first project, programming for Flask/Flask-security, I found the security library’s documentation to be greatly lacking. This was a slight drawback, however once I got my head around the library, everything went nicely.

I will aim to upload a Flask example package/boilerplate with the structure of how I use flask within the next few weeks.

From The Shard #tiltshift #view #london #blog

July 7, 2014


via Instagram ift.tt/1sn1Yrc…

Quadcopter Electronics Assembly Complete

June 22, 2014

So far i’ve almost completed all the electronics components of the quadcopter. I am now waiting for my 5v regulator to arrive. I will use this to drive the Raspberry Pi from the 7.2 Lipoly battery. Once this arrives the quad will be able to become fully wireless (currently 5v power inlet is requiring a cable).

I wrote a basic program to control the PWM speeds from the RPi. This is letting me test the power that the quad has. At the moment it can easily lift off at about 40/100 (however I’m not sure if this is linear).

This video shows me bringing the controller speed up to 30/100:

watch?v=lVxbO1KiBK8&feature=youtu.be

The next challenge is going to be mounting everything in such a way that it’s accessible and still lightweight. At the moment electrical tape is a great mounting tool.

DIY Quad Frame

June 17, 2014

I just ordered a cheap $30 56g lightweight frame off ebay, however, I need something in the mean time to get set up with. Instead of using the ugly and heavy (~250g) wooden frame, I have built this frame from some spare materials I found in the garage.

Next up, I will need to make all the electronic connections and determine where to house the RPi and battery on the quad. I am going to have to now be careful about positioning of the electronics as the entire frame is conductive :S

Here are a couple of picture of the new frame’s construction

IMG_0010

Assembled onto the new frame!

Close up of the material i'm using

Close up of the material i’m using

Quadcopter Arrived! (Most of it)

June 16, 2014

Today a majority of the electronic components of my quadcopter arrived. I received an email from the online shop saying that my order had been dispatched today and they included a tracking number. Upon checking the tracking, it turned out it had actually been posted on the 13th and it was “Delivered”. Being curious, I went downstairs, and there it was, a package on my door step. Excellent.

The items packed in the box

The items packed in the box

So it was a given I was going to have the rest of the afternoon off study – now that I had a new fun thing to play with.

As I am not building this from a kit, I had ordered all my parts individually and hoping for the best. For someone with such little hobby RC knowledge, google has definitely been my friend.

My package contained:

  • 4x 10A ESC Combo Kits with a 1700Kv motor (not Kilovolts, RPM in K per volt)
  • 1x Lipoly Balance Charger (For charging my Lipoly battery)
  • 1x 2100mAh Lipoly Battery (2S, 30C)
  • 1x Wooden Frame (Only cost $5, thought it would be worthwhile)
  • 3x Different packs of Propellors
  • 1x Power Distribution (Which I stupidly bought the one with the wrong plug)
IMG_0003

The contents of my package, laid out

So, Let’s get started. What on earth do all those numbers mean? I didn’t know – until I started looking them up. So, let me explain the motors to begin with.

Continue reading »

iTunes vs Spotify

June 15, 2014

So I just caved into starting a 3 month free trial of Spotify. What have I got to lose? It’s going to make syncing to my android device much easier, plus I can listen to any song I want wherever I am (provided Optus is decent).

Lots of PlaylistsUpon starting my Spotify experience, I needed to import my iTunes playlists. I needed to get all of my playlists out of iTunes. I have a LOT of playlists (Over 300). See the image to the left for example. That’s only just a minority of them (I’ve included the scroll bar for reference). Now, getting these outside of iTunes is a process on it’s own, and getting them into Spotify is even more difficult. This would be somewhat easier I suppose if Spotify’s “iTunes Import” feature wasn’t greyed out, however there clearly is a problem here:

Spotify's Broken iTunes Importer

Spotify’s Broken iTunes Importer

So the next best thing was to use the iTunes playlist export functionality. This can be done by right clicking a playlist and choosing “Export”. Tedious – yes. I only exported about 15 playlists before researching the next step – converting these playlists to a format Spotify can handle. Fortunately there are online tools to do this – however they’re slow, and can only do one playlist at a time. So this was clearly not an option.

I ended up settling for dragging and dropping playlists into Spotify. The flow was as follows:

  1. Create a new Spotify Playlist
  2. Drag Songs From iTunes into Spotify.
  3. Ensure you didn’t duplicate anything

Tedious, especially for 300 playlists. I’m not even sure if I can be bothered to export my entire library to a service I may not use forever. Anyway, we will see where I go with Spotify, and maybe I’ll end up building the tool that I previously wrote about here.

New Theme

June 13, 2014

It’s the time of year again I suppose. I have given my blog a good clean and given it a fresh new look. This year I have gone with a flattened design, using typography to get the message across (Yes, I just called Open Sans typography).

Hopefully this refreshment will entice me to write more blog posts, however, as usual, the novelty disappears after a short period of time.

Bridging the Gap: iTunes to Android

June 13, 2014

I hate proprietary things. Specifically iTunes. It’s a great music manager, it’s robust, stable, and has a brilliant store. It also offers fantastic integration with iOS devices. As much as that is great for iOS users, it sucks for anyone on Android. In my opinion this is driving people to move to streaming music services such as Google Play Music or Spotify (both of which I am contemplating).

There are various tools available which bridge the gap. Apps such as DoubleTwist for Mac & Android do the job, however they’re just too clunky.

For me, leaving my iTunes Library and picking up some new music management tool would be a big hassle. iTunes has all my music, including over 300 of my playlists. I need a program to bridge iTunes and my Android Device.

At the moment I’m on the verge of writing a tool to extract iTunes music, track playlists and keep music in sync onto my Android phone. My roadmap for the tool is as follows:

  1. Read iTunes Library & Copy Playlists onto device without duplicates
  2. Synchronise Playlists with the device, so songs removed in iTunes are removed on the Phone.
  3. Write metadata to the device for playlists
  4. OR Write a music playing app – however this may be overkill.

Anyway, this will be a learning process. I’m aware tools are available to do this task, however building one tailored to my needs to possibly the best solution in my case. Looking at the iTunes Library XML files, they look relatively easy to work with, and maybe eventually I’ll set up a auto importer for my “external purchases” to automatically add them to my Library and put them in the right folder on my computer.

© Nick Whyte 2014