Moved stuff around
authorJames Bunton <jamesbunton@fastmail.fm>
Sun, 2 Jan 2011 14:44:02 +0000 (01:44 +1100)
committerJames Bunton <jamesbunton@fastmail.fm>
Sun, 2 Jan 2011 14:44:02 +0000 (01:44 +1100)
English.lproj/NotiPod.xib
Info.plist
libnotipod.py [moved from libsyncitunes.py with 100% similarity]
main.m
notipod.xcodeproj/project.pbxproj
notipod_cli.py [moved from syncitunes.py with 89% similarity]
notipod_gui.py [moved from NotiPod.py with 96% similarity]

index 2c2bc5a..0039003 100644 (file)
                                <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
                        </object>
                        <object class="NSCustomObject" id="719278169">
-                               <string key="NSClassName">NotiPodAppDelegate</string>
+                               <string key="NSClassName">NotiPodController</string>
                        </object>
                        <object class="NSWindowTemplate" id="92204650">
                                <int key="NSWindowStyleMask">7</int>
                                                <int key="objectID">425</int>
                                                <reference key="object" ref="719278169"/>
                                                <reference key="parent" ref="0"/>
-                                               <string key="objectName">NotiPodAppDelegate</string>
+                                               <string key="objectName">NotiPodController</string>
                                        </object>
                                        <object class="IBObjectRecord">
                                                <int key="objectID">428</int>
                                        </object>
                                </object>
                                <object class="IBPartialClassDescription">
-                                       <string key="className">NotiPodAppDelegate</string>
+                                       <string key="className">NotiPodController</string>
                                        <string key="superclassName">NSObject</string>
                                        <object class="NSMutableDictionary" key="actions">
                                                <bool key="EncodedWithXMLCoder">YES</bool>
                                        <reference key="sourceIdentifier" ref="344772374"/>
                                </object>
                                <object class="IBPartialClassDescription">
-                                       <string key="className">NotiPodAppDelegate</string>
+                                       <string key="className">NotiPodController</string>
                                        <string key="superclassName">NSObject</string>
                                        <object class="IBClassDescriptionSource" key="sourceIdentifier">
                                                <string key="majorKey">IBUserSource</string>
index b69e141..19278a5 100644 (file)
        <key>CFBundlePackageType</key>
        <string>APPL</string>
        <key>CFBundleShortVersionString</key>
-       <string>1.1</string>
+       <string>1.2</string>
        <key>CFBundleSignature</key>
        <string>????</string>
        <key>CFBundleVersion</key>
-       <string>1.1</string>
+       <string>1.2</string>
        <key>NSMainNibFile</key>
        <string>NotiPod</string>
        <key>NSPrincipalClass</key>
similarity index 100%
rename from libsyncitunes.py
rename to libnotipod.py
diff --git a/main.m b/main.m
index d9f789b..9368789 100644 (file)
--- a/main.m
+++ b/main.m
@@ -20,7 +20,7 @@ main(int argc, char** argv)
        NSString* mainFilePath = nil;
 
        for(NSString* possibleMainExtension in possibleMainExtensions) {
-               mainFilePath = [mainBundle pathForResource: @"NotiPod" ofType: possibleMainExtension];
+               mainFilePath = [mainBundle pathForResource: @"notipod_gui" ofType: possibleMainExtension];
                if(mainFilePath != nil) break;
        }
 
index 7d61add..08adab1 100644 (file)
@@ -12,8 +12,9 @@
                8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
                8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
                8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
-               93D64A9A12D030190093DEC9 /* libsyncitunes.py in Resources */ = {isa = PBXBuildFile; fileRef = 93D64A9912D030190093DEC9 /* libsyncitunes.py */; };
-               93D64AB212D037890093DEC9 /* NotiPod.py in Resources */ = {isa = PBXBuildFile; fileRef = 93D64AB112D037890093DEC9 /* NotiPod.py */; };
+               93EE29F312D0C5450002BB95 /* libnotipod.py in Resources */ = {isa = PBXBuildFile; fileRef = 93EE29F012D0C5450002BB95 /* libnotipod.py */; };
+               93EE29F412D0C5450002BB95 /* notipod_cli.py in Resources */ = {isa = PBXBuildFile; fileRef = 93EE29F112D0C5450002BB95 /* notipod_cli.py */; };
+               93EE29F512D0C5450002BB95 /* notipod_gui.py in Resources */ = {isa = PBXBuildFile; fileRef = 93EE29F212D0C5450002BB95 /* notipod_gui.py */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXFileReference section */
@@ -27,8 +28,9 @@
                77C8C1F80C07829500965286 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/NotiPod.xib; sourceTree = "<group>"; };
                8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
                8D1107320486CEB800E47090 /* notipod.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = notipod.app; sourceTree = BUILT_PRODUCTS_DIR; };
-               93D64A9912D030190093DEC9 /* libsyncitunes.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = libsyncitunes.py; sourceTree = "<group>"; };
-               93D64AB112D037890093DEC9 /* NotiPod.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = NotiPod.py; sourceTree = "<group>"; };
+               93EE29F012D0C5450002BB95 /* libnotipod.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = libnotipod.py; sourceTree = "<group>"; };
+               93EE29F112D0C5450002BB95 /* notipod_cli.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = notipod_cli.py; sourceTree = "<group>"; };
+               93EE29F212D0C5450002BB95 /* notipod_gui.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = notipod_gui.py; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
                        isa = PBXGroup;
                        children = (
                                32CA4F630368D1EE00C91783 /* notipod_Prefix.pch */,
+                               93EE29F012D0C5450002BB95 /* libnotipod.py */,
+                               93EE29F112D0C5450002BB95 /* notipod_cli.py */,
+                               93EE29F212D0C5450002BB95 /* notipod_gui.py */,
                                29B97316FDCFA39411CA2CEA /* main.m */,
-                               93D64AB112D037890093DEC9 /* NotiPod.py */,
-                               93D64A9912D030190093DEC9 /* libsyncitunes.py */,
                        );
                        name = Sources;
                        sourceTree = "<group>";
                        files = (
                                8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */,
                                77C8C1F90C07829500965286 /* NotiPod.xib in Resources */,
-                               93D64A9A12D030190093DEC9 /* libsyncitunes.py in Resources */,
-                               93D64AB212D037890093DEC9 /* NotiPod.py in Resources */,
+                               93EE29F312D0C5450002BB95 /* libnotipod.py in Resources */,
+                               93EE29F412D0C5450002BB95 /* notipod_cli.py in Resources */,
+                               93EE29F512D0C5450002BB95 /* notipod_gui.py in Resources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
similarity index 89%
rename from syncitunes.py
rename to notipod_cli.py
index 32ed08c..0acad1b 100755 (executable)
@@ -1,13 +1,13 @@
 #!/usr/bin/env python
 
-VERSION = "0.1"
+VERSION = "1.2"
 
 import logging
 import optparse
 import os
 import sys
 
-import libsyncitunes
+import libnotipod
 
 
 def parse_options():
@@ -52,7 +52,7 @@ def main():
                sys.exit(1)
 
        logging.info("Loading library")
-       library = libsyncitunes.ITunesLibrary.alloc().init()
+       library = libnotipod.ITunesLibrary.alloc().init()
        gen = library.load_(opts.itunes_library)
        for msg in gen:
                logging.debug(msg)
@@ -67,11 +67,11 @@ def main():
        for playlist in opts.playlists:
                tracks = library.get_playlist_name(playlist).tracks
                all_tracks.extend(tracks)
-               libsyncitunes.export_m3u(opts.dry_run, opts.dest,
+               libnotipod.export_m3u(opts.dry_run, opts.dest,
                        opts.path_prefix, playlist, tracks)
 
        logging.info("Synchronising")
-       gen = libsyncitunes.sync(opts.dry_run, library.folder, opts.dest, all_tracks)
+       gen = libnotipod.sync(opts.dry_run, library.folder, opts.dest, all_tracks)
        for msg in gen:
                logging.debug(msg)
 
similarity index 96%
rename from NotiPod.py
rename to notipod_gui.py
index 3ea25bf..ee97365 100644 (file)
@@ -9,7 +9,7 @@ from Foundation import *
 from AppKit import *
 from PyObjCTools import AppHelper
 
-import libsyncitunes
+import libnotipod
 
 
 class PlaylistModel(NSObject):
@@ -103,7 +103,7 @@ class FolderModel(NSObject):
                        self.folderPopup.selectItemAtIndex_(self.lastIndex)
 
 
-class NotiPodAppDelegate(NSObject):
+class NotiPodController(NSObject):
        window = objc.IBOutlet()
        playlistModel = objc.IBOutlet()
        folderModel = objc.IBOutlet()
@@ -118,7 +118,7 @@ class NotiPodAppDelegate(NSObject):
                pass
 
        def applicationDidFinishLaunching_(self, _):
-               self.library = libsyncitunes.ITunesLibrary.alloc().init()
+               self.library = libnotipod.ITunesLibrary.alloc().init()
                def finish():
                        self.playlistModel.setPlaylists(self.library.get_playlists())
                self.runGenerator(lambda: self.library.load_(None), finish)
@@ -163,14 +163,14 @@ class NotiPodAppDelegate(NSObject):
                all_tracks = []
                for playlist in playlists:
                        all_tracks.extend(playlist.tracks)
-                       libsyncitunes.export_m3u(dry_run=False, dest=folder, path_prefix="",
+                       libnotipod.export_m3u(dry_run=False, dest=folder, path_prefix="",
                                        playlist_name=playlist.name, files=playlist.tracks)
 
                def finish():
                        NSRunAlertPanel("Complete!", "Synchronisation is complete", "Ok", None, None)
                self.runGenerator(
                        lambda:
-                               libsyncitunes.sync(
+                               libnotipod.sync(
                                        dry_run=False,
                                        source=self.library.folder,
                                        dest=folder,