]> code.delx.au - notipod/commitdiff
Initial checkin
authorJames Bunton <jamesbunton@fastmail.fm>
Sun, 2 Jan 2011 03:48:49 +0000 (14:48 +1100)
committerJames Bunton <jamesbunton@fastmail.fm>
Sun, 2 Jan 2011 03:48:49 +0000 (14:48 +1100)
.hgignore [new file with mode: 0644]
English.lproj/InfoPlist.strings [new file with mode: 0644]
English.lproj/NotiPod.xib [new file with mode: 0644]
Info.plist [new file with mode: 0644]
NotiPodAppDelegate.py [new file with mode: 0644]
NotiPodController.py [new file with mode: 0644]
itunes.py [new file with mode: 0644]
main.m [new file with mode: 0644]
main.py [new file with mode: 0644]
notipod.xcodeproj/project.pbxproj [new file with mode: 0644]
sync.py [new file with mode: 0755]

diff --git a/.hgignore b/.hgignore
new file mode 100644 (file)
index 0000000..12c0927
--- /dev/null
+++ b/.hgignore
@@ -0,0 +1,7 @@
+syntax: glob
+build
+.*.swp
+*.pyc
+*.mode1v3
+*.pbxuser
+*.pch
diff --git a/English.lproj/InfoPlist.strings b/English.lproj/InfoPlist.strings
new file mode 100644 (file)
index 0000000..534be77
Binary files /dev/null and b/English.lproj/InfoPlist.strings differ
diff --git a/English.lproj/NotiPod.xib b/English.lproj/NotiPod.xib
new file mode 100644 (file)
index 0000000..817f256
--- /dev/null
@@ -0,0 +1,1334 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.03">
+       <data>
+               <int key="IBDocument.SystemTarget">1050</int>
+               <string key="IBDocument.SystemVersion">9L30</string>
+               <string key="IBDocument.InterfaceBuilderVersion">677</string>
+               <string key="IBDocument.AppKitVersion">949.54</string>
+               <string key="IBDocument.HIToolboxVersion">353.00</string>
+               <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+                       <bool key="EncodedWithXMLCoder">YES</bool>
+                       <integer value="29"/>
+                       <integer value="372"/>
+               </object>
+               <object class="NSArray" key="IBDocument.PluginDependencies">
+                       <bool key="EncodedWithXMLCoder">YES</bool>
+                       <string>com.apple.InterfaceBuilderKit</string>
+                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+               </object>
+               <object class="NSMutableDictionary" key="IBDocument.Metadata">
+                       <bool key="EncodedWithXMLCoder">YES</bool>
+                       <object class="NSArray" key="dict.sortedKeys">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                       </object>
+                       <object class="NSMutableArray" key="dict.values">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                       </object>
+               </object>
+               <object class="NSMutableArray" key="IBDocument.RootObjects" id="1048">
+                       <bool key="EncodedWithXMLCoder">YES</bool>
+                       <object class="NSCustomObject" id="1021">
+                               <string key="NSClassName">NSApplication</string>
+                       </object>
+                       <object class="NSCustomObject" id="1014">
+                               <string key="NSClassName">FirstResponder</string>
+                       </object>
+                       <object class="NSCustomObject" id="1050">
+                               <string key="NSClassName">NSApplication</string>
+                       </object>
+                       <object class="NSMenu" id="649796088">
+                               <string key="NSTitle">AMainMenu</string>
+                               <object class="NSMutableArray" key="NSMenuItems">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                       <object class="NSMenuItem" id="694149608">
+                                               <reference key="NSMenu" ref="649796088"/>
+                                               <string key="NSTitle">NotiPod</string>
+                                               <string key="NSKeyEquiv"/>
+                                               <int key="NSKeyEquivModMask">1048576</int>
+                                               <int key="NSMnemonicLoc">2147483647</int>
+                                               <object class="NSCustomResource" key="NSOnImage" id="653914662">
+                                                       <string key="NSClassName">NSImage</string>
+                                                       <string key="NSResourceName">NSMenuCheckmark</string>
+                                               </object>
+                                               <object class="NSCustomResource" key="NSMixedImage" id="708543162">
+                                                       <string key="NSClassName">NSImage</string>
+                                                       <string key="NSResourceName">NSMenuMixedState</string>
+                                               </object>
+                                               <string key="NSAction">submenuAction:</string>
+                                               <object class="NSMenu" key="NSSubmenu" id="110575045">
+                                                       <string key="NSTitle">NotiPod</string>
+                                                       <object class="NSMutableArray" key="NSMenuItems">
+                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                               <object class="NSMenuItem" id="238522557">
+                                                                       <reference key="NSMenu" ref="110575045"/>
+                                                                       <string key="NSTitle">About NotiPod</string>
+                                                                       <string key="NSKeyEquiv"/>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="653914662"/>
+                                                                       <reference key="NSMixedImage" ref="708543162"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="304266470">
+                                                                       <reference key="NSMenu" ref="110575045"/>
+                                                                       <bool key="NSIsDisabled">YES</bool>
+                                                                       <bool key="NSIsSeparator">YES</bool>
+                                                                       <string key="NSTitle"/>
+                                                                       <string key="NSKeyEquiv"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="653914662"/>
+                                                                       <reference key="NSMixedImage" ref="708543162"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="1046388886">
+                                                                       <reference key="NSMenu" ref="110575045"/>
+                                                                       <string key="NSTitle">Services</string>
+                                                                       <string key="NSKeyEquiv"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="653914662"/>
+                                                                       <reference key="NSMixedImage" ref="708543162"/>
+                                                                       <string key="NSAction">submenuAction:</string>
+                                                                       <object class="NSMenu" key="NSSubmenu" id="752062318">
+                                                                               <string key="NSTitle">Services</string>
+                                                                               <object class="NSMutableArray" key="NSMenuItems">
+                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                               </object>
+                                                                               <string key="NSName">_NSServicesMenu</string>
+                                                                       </object>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="646227648">
+                                                                       <reference key="NSMenu" ref="110575045"/>
+                                                                       <bool key="NSIsDisabled">YES</bool>
+                                                                       <bool key="NSIsSeparator">YES</bool>
+                                                                       <string key="NSTitle"/>
+                                                                       <string key="NSKeyEquiv"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="653914662"/>
+                                                                       <reference key="NSMixedImage" ref="708543162"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="755159360">
+                                                                       <reference key="NSMenu" ref="110575045"/>
+                                                                       <string key="NSTitle">Hide NotiPod</string>
+                                                                       <string key="NSKeyEquiv">h</string>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="653914662"/>
+                                                                       <reference key="NSMixedImage" ref="708543162"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="342932134">
+                                                                       <reference key="NSMenu" ref="110575045"/>
+                                                                       <string key="NSTitle">Hide Others</string>
+                                                                       <string key="NSKeyEquiv">h</string>
+                                                                       <int key="NSKeyEquivModMask">1572864</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="653914662"/>
+                                                                       <reference key="NSMixedImage" ref="708543162"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="908899353">
+                                                                       <reference key="NSMenu" ref="110575045"/>
+                                                                       <string key="NSTitle">Show All</string>
+                                                                       <string key="NSKeyEquiv"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="653914662"/>
+                                                                       <reference key="NSMixedImage" ref="708543162"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="1056857174">
+                                                                       <reference key="NSMenu" ref="110575045"/>
+                                                                       <bool key="NSIsDisabled">YES</bool>
+                                                                       <bool key="NSIsSeparator">YES</bool>
+                                                                       <string key="NSTitle"/>
+                                                                       <string key="NSKeyEquiv"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="653914662"/>
+                                                                       <reference key="NSMixedImage" ref="708543162"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="632727374">
+                                                                       <reference key="NSMenu" ref="110575045"/>
+                                                                       <string key="NSTitle">Quit NotiPod</string>
+                                                                       <string key="NSKeyEquiv">q</string>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="653914662"/>
+                                                                       <reference key="NSMixedImage" ref="708543162"/>
+                                                               </object>
+                                                       </object>
+                                                       <string key="NSName">_NSAppleMenu</string>
+                                               </object>
+                                       </object>
+                                       <object class="NSMenuItem" id="391199113">
+                                               <reference key="NSMenu" ref="649796088"/>
+                                               <string key="NSTitle">Help</string>
+                                               <string key="NSKeyEquiv"/>
+                                               <int key="NSKeyEquivModMask">1048576</int>
+                                               <int key="NSMnemonicLoc">2147483647</int>
+                                               <reference key="NSOnImage" ref="653914662"/>
+                                               <reference key="NSMixedImage" ref="708543162"/>
+                                               <string key="NSAction">submenuAction:</string>
+                                               <object class="NSMenu" key="NSSubmenu" id="374024848">
+                                                       <string key="NSTitle">Help</string>
+                                                       <object class="NSMutableArray" key="NSMenuItems">
+                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                               <object class="NSMenuItem" id="238773614">
+                                                                       <reference key="NSMenu" ref="374024848"/>
+                                                                       <string key="NSTitle">NotiPod Help</string>
+                                                                       <string key="NSKeyEquiv">?</string>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="653914662"/>
+                                                                       <reference key="NSMixedImage" ref="708543162"/>
+                                                               </object>
+                                                       </object>
+                                               </object>
+                                       </object>
+                               </object>
+                               <string key="NSName">_NSMainMenu</string>
+                       </object>
+                       <object class="NSWindowTemplate" id="972006081">
+                               <int key="NSWindowStyleMask">7</int>
+                               <int key="NSWindowBacking">2</int>
+                               <string key="NSWindowRect">{{335, 417}, {288, 333}}</string>
+                               <int key="NSWTFlags">1946157056</int>
+                               <string key="NSWindowTitle">NotiPod</string>
+                               <string key="NSWindowClass">NSWindow</string>
+                               <nil key="NSViewClass"/>
+                               <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
+                               <object class="NSView" key="NSWindowView" id="439893737">
+                                       <reference key="NSNextResponder"/>
+                                       <int key="NSvFlags">256</int>
+                                       <object class="NSMutableArray" key="NSSubviews">
+                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                               <object class="NSTextField" id="818249148">
+                                                       <reference key="NSNextResponder" ref="439893737"/>
+                                                       <int key="NSvFlags">268</int>
+                                                       <string key="NSFrame">{{17, 296}, {161, 17}}</string>
+                                                       <reference key="NSSuperview" ref="439893737"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSTextFieldCell" key="NSCell" id="574520385">
+                                                               <int key="NSCellFlags">67239488</int>
+                                                               <int key="NSCellFlags2">272630784</int>
+                                                               <string key="NSContents">Step 1 - Select a playlist:</string>
+                                                               <object class="NSFont" key="NSSupport" id="822023840">
+                                                                       <string key="NSName">LucidaGrande</string>
+                                                                       <double key="NSSize">1.300000e+01</double>
+                                                                       <int key="NSfFlags">1044</int>
+                                                               </object>
+                                                               <reference key="NSControlView" ref="818249148"/>
+                                                               <object class="NSColor" key="NSBackgroundColor" id="439689891">
+                                                                       <int key="NSColorSpace">6</int>
+                                                                       <string key="NSCatalogName">System</string>
+                                                                       <string key="NSColorName">controlColor</string>
+                                                                       <object class="NSColor" key="NSColor" id="22211674">
+                                                                               <int key="NSColorSpace">3</int>
+                                                                               <bytes key="NSWhite">MC42NjY2NjY2OQA</bytes>
+                                                                       </object>
+                                                               </object>
+                                                               <object class="NSColor" key="NSTextColor" id="888276067">
+                                                                       <int key="NSColorSpace">6</int>
+                                                                       <string key="NSCatalogName">System</string>
+                                                                       <string key="NSColorName">controlTextColor</string>
+                                                                       <object class="NSColor" key="NSColor" id="815326389">
+                                                                               <int key="NSColorSpace">3</int>
+                                                                               <bytes key="NSWhite">MAA</bytes>
+                                                                       </object>
+                                                               </object>
+                                                       </object>
+                                               </object>
+                                               <object class="NSTextField" id="524945726">
+                                                       <reference key="NSNextResponder" ref="439893737"/>
+                                                       <int key="NSvFlags">268</int>
+                                                       <string key="NSFrame">{{17, 105}, {254, 17}}</string>
+                                                       <reference key="NSSuperview" ref="439893737"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSTextFieldCell" key="NSCell" id="959016606">
+                                                               <int key="NSCellFlags">67239488</int>
+                                                               <int key="NSCellFlags2">272630784</int>
+                                                               <string key="NSContents">Step 2 - Output folder or device:</string>
+                                                               <reference key="NSSupport" ref="822023840"/>
+                                                               <reference key="NSControlView" ref="524945726"/>
+                                                               <reference key="NSBackgroundColor" ref="439689891"/>
+                                                               <reference key="NSTextColor" ref="888276067"/>
+                                                       </object>
+                                               </object>
+                                               <object class="NSButton" id="703636579">
+                                                       <reference key="NSNextResponder" ref="439893737"/>
+                                                       <int key="NSvFlags">268</int>
+                                                       <string key="NSFrame">{{118, 12}, {120, 32}}</string>
+                                                       <reference key="NSSuperview" ref="439893737"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSButtonCell" key="NSCell" id="1061036965">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">134217728</int>
+                                                               <string key="NSContents">Synchronise!</string>
+                                                               <reference key="NSSupport" ref="822023840"/>
+                                                               <reference key="NSControlView" ref="703636579"/>
+                                                               <int key="NSButtonFlags">-2038284033</int>
+                                                               <int key="NSButtonFlags2">129</int>
+                                                               <string key="NSAlternateContents"/>
+                                                               <string key="NSKeyEquivalent"/>
+                                                               <int key="NSPeriodicDelay">200</int>
+                                                               <int key="NSPeriodicInterval">25</int>
+                                                       </object>
+                                               </object>
+                                               <object class="NSPopUpButton" id="997567970">
+                                                       <reference key="NSNextResponder" ref="439893737"/>
+                                                       <int key="NSvFlags">268</int>
+                                                       <string key="NSFrame">{{29, 73}, {206, 26}}</string>
+                                                       <reference key="NSSuperview" ref="439893737"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSPopUpButtonCell" key="NSCell" id="467826865">
+                                                               <int key="NSCellFlags">-2076049856</int>
+                                                               <int key="NSCellFlags2">2048</int>
+                                                               <reference key="NSSupport" ref="822023840"/>
+                                                               <reference key="NSControlView" ref="997567970"/>
+                                                               <int key="NSButtonFlags">109199615</int>
+                                                               <int key="NSButtonFlags2">1</int>
+                                                               <string key="NSAlternateContents"/>
+                                                               <string key="NSKeyEquivalent"/>
+                                                               <int key="NSPeriodicDelay">400</int>
+                                                               <int key="NSPeriodicInterval">75</int>
+                                                               <object class="NSMenuItem" key="NSMenuItem" id="178047326">
+                                                                       <reference key="NSMenu" ref="398390192"/>
+                                                                       <string key="NSTitle">Choose folder...</string>
+                                                                       <string key="NSKeyEquiv"/>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <int key="NSState">1</int>
+                                                                       <reference key="NSOnImage" ref="653914662"/>
+                                                                       <reference key="NSMixedImage" ref="708543162"/>
+                                                                       <string key="NSAction">_popUpItemAction:</string>
+                                                                       <reference key="NSTarget" ref="467826865"/>
+                                                               </object>
+                                                               <bool key="NSMenuItemRespectAlignment">YES</bool>
+                                                               <object class="NSMenu" key="NSMenu" id="398390192">
+                                                                       <string key="NSTitle">OtherViews</string>
+                                                                       <object class="NSMutableArray" key="NSMenuItems">
+                                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                               <reference ref="178047326"/>
+                                                                               <object class="NSMenuItem" id="122068822">
+                                                                                       <reference key="NSMenu" ref="398390192"/>
+                                                                                       <bool key="NSIsDisabled">YES</bool>
+                                                                                       <bool key="NSIsSeparator">YES</bool>
+                                                                                       <string key="NSTitle"/>
+                                                                                       <string key="NSKeyEquiv"/>
+                                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                                       <reference key="NSOnImage" ref="653914662"/>
+                                                                                       <reference key="NSMixedImage" ref="708543162"/>
+                                                                                       <string key="NSAction">_popUpItemAction:</string>
+                                                                                       <reference key="NSTarget" ref="467826865"/>
+                                                                               </object>
+                                                                       </object>
+                                                               </object>
+                                                               <int key="NSPreferredEdge">1</int>
+                                                               <bool key="NSUsesItemFromMenu">YES</bool>
+                                                               <bool key="NSAltersState">YES</bool>
+                                                               <int key="NSArrowPosition">2</int>
+                                                       </object>
+                                               </object>
+                                               <object class="NSTextField" id="323617138">
+                                                       <reference key="NSNextResponder" ref="439893737"/>
+                                                       <int key="NSvFlags">268</int>
+                                                       <string key="NSFrame">{{17, 22}, {105, 17}}</string>
+                                                       <reference key="NSSuperview" ref="439893737"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSTextFieldCell" key="NSCell" id="295895067">
+                                                               <int key="NSCellFlags">67239488</int>
+                                                               <int key="NSCellFlags2">272630784</int>
+                                                               <string key="NSContents">Step 3:</string>
+                                                               <reference key="NSSupport" ref="822023840"/>
+                                                               <reference key="NSControlView" ref="323617138"/>
+                                                               <reference key="NSBackgroundColor" ref="439689891"/>
+                                                               <reference key="NSTextColor" ref="888276067"/>
+                                                       </object>
+                                               </object>
+                                               <object class="NSScrollView" id="1066664982">
+                                                       <reference key="NSNextResponder" ref="439893737"/>
+                                                       <int key="NSvFlags">268</int>
+                                                       <object class="NSMutableArray" key="NSSubviews">
+                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                               <object class="NSClipView" id="499395455">
+                                                                       <reference key="NSNextResponder" ref="1066664982"/>
+                                                                       <int key="NSvFlags">2304</int>
+                                                                       <object class="NSMutableArray" key="NSSubviews">
+                                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                               <object class="NSOutlineView" id="695882538">
+                                                                                       <reference key="NSNextResponder" ref="499395455"/>
+                                                                                       <int key="NSvFlags">256</int>
+                                                                                       <string key="NSFrameSize">{219, 102}</string>
+                                                                                       <reference key="NSSuperview" ref="499395455"/>
+                                                                                       <bool key="NSEnabled">YES</bool>
+                                                                                       <object class="NSTableHeaderView" key="NSHeaderView" id="603767070">
+                                                                                               <reference key="NSNextResponder" ref="175727283"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrameSize">{219, 17}</string>
+                                                                                               <reference key="NSSuperview" ref="175727283"/>
+                                                                                               <reference key="NSTableView" ref="695882538"/>
+                                                                                       </object>
+                                                                                       <object class="_NSCornerView" key="NSCornerView" id="389160094">
+                                                                                               <reference key="NSNextResponder" ref="1066664982"/>
+                                                                                               <int key="NSvFlags">256</int>
+                                                                                               <string key="NSFrame">{{220, 0}, {16, 17}}</string>
+                                                                                               <reference key="NSSuperview" ref="1066664982"/>
+                                                                                       </object>
+                                                                                       <object class="NSMutableArray" key="NSTableColumns">
+                                                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                                               <object class="NSTableColumn" id="888804271">
+                                                                                                       <double key="NSWidth">1.010000e+02</double>
+                                                                                                       <double key="NSMinWidth">1.600000e+01</double>
+                                                                                                       <double key="NSMaxWidth">1.000000e+03</double>
+                                                                                                       <object class="NSTableHeaderCell" key="NSHeaderCell">
+                                                                                                               <int key="NSCellFlags">75628032</int>
+                                                                                                               <int key="NSCellFlags2">0</int>
+                                                                                                               <string key="NSContents"/>
+                                                                                                               <object class="NSFont" key="NSSupport" id="26">
+                                                                                                                       <string key="NSName">LucidaGrande</string>
+                                                                                                                       <double key="NSSize">1.100000e+01</double>
+                                                                                                                       <int key="NSfFlags">3100</int>
+                                                                                                               </object>
+                                                                                                               <object class="NSColor" key="NSBackgroundColor" id="46157304">
+                                                                                                                       <int key="NSColorSpace">3</int>
+                                                                                                                       <bytes key="NSWhite">MC4zMzMzMzI5OQA</bytes>
+                                                                                                               </object>
+                                                                                                               <object class="NSColor" key="NSTextColor" id="974793769">
+                                                                                                                       <int key="NSColorSpace">6</int>
+                                                                                                                       <string key="NSCatalogName">System</string>
+                                                                                                                       <string key="NSColorName">headerTextColor</string>
+                                                                                                                       <reference key="NSColor" ref="815326389"/>
+                                                                                                               </object>
+                                                                                                       </object>
+                                                                                                       <object class="NSTextFieldCell" key="NSDataCell" id="904798784">
+                                                                                                               <int key="NSCellFlags">337772096</int>
+                                                                                                               <int key="NSCellFlags2">2048</int>
+                                                                                                               <string key="NSContents">Text Cell</string>
+                                                                                                               <reference key="NSSupport" ref="822023840"/>
+                                                                                                               <reference key="NSControlView" ref="695882538"/>
+                                                                                                               <object class="NSColor" key="NSBackgroundColor" id="928689894">
+                                                                                                                       <int key="NSColorSpace">6</int>
+                                                                                                                       <string key="NSCatalogName">System</string>
+                                                                                                                       <string key="NSColorName">controlBackgroundColor</string>
+                                                                                                                       <reference key="NSColor" ref="22211674"/>
+                                                                                                               </object>
+                                                                                                               <reference key="NSTextColor" ref="888276067"/>
+                                                                                                       </object>
+                                                                                                       <int key="NSResizingMask">3</int>
+                                                                                                       <bool key="NSIsResizeable">YES</bool>
+                                                                                                       <bool key="NSIsEditable">YES</bool>
+                                                                                                       <reference key="NSTableView" ref="695882538"/>
+                                                                                               </object>
+                                                                                               <object class="NSTableColumn" id="870866881">
+                                                                                                       <double key="NSWidth">1.120000e+02</double>
+                                                                                                       <double key="NSMinWidth">4.000000e+01</double>
+                                                                                                       <double key="NSMaxWidth">1.000000e+03</double>
+                                                                                                       <object class="NSTableHeaderCell" key="NSHeaderCell">
+                                                                                                               <int key="NSCellFlags">75628032</int>
+                                                                                                               <int key="NSCellFlags2">0</int>
+                                                                                                               <string key="NSContents"/>
+                                                                                                               <reference key="NSSupport" ref="26"/>
+                                                                                                               <reference key="NSBackgroundColor" ref="46157304"/>
+                                                                                                               <reference key="NSTextColor" ref="974793769"/>
+                                                                                                       </object>
+                                                                                                       <object class="NSTextFieldCell" key="NSDataCell" id="661397302">
+                                                                                                               <int key="NSCellFlags">337772096</int>
+                                                                                                               <int key="NSCellFlags2">2048</int>
+                                                                                                               <string key="NSContents">Text Cell</string>
+                                                                                                               <reference key="NSSupport" ref="822023840"/>
+                                                                                                               <reference key="NSControlView" ref="695882538"/>
+                                                                                                               <reference key="NSBackgroundColor" ref="928689894"/>
+                                                                                                               <reference key="NSTextColor" ref="888276067"/>
+                                                                                                       </object>
+                                                                                                       <int key="NSResizingMask">3</int>
+                                                                                                       <bool key="NSIsResizeable">YES</bool>
+                                                                                                       <bool key="NSIsEditable">YES</bool>
+                                                                                                       <reference key="NSTableView" ref="695882538"/>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <double key="NSIntercellSpacingWidth">3.000000e+00</double>
+                                                                                       <double key="NSIntercellSpacingHeight">2.000000e+00</double>
+                                                                                       <object class="NSColor" key="NSBackgroundColor">
+                                                                                               <int key="NSColorSpace">3</int>
+                                                                                               <bytes key="NSWhite">MQA</bytes>
+                                                                                       </object>
+                                                                                       <object class="NSColor" key="NSGridColor">
+                                                                                               <int key="NSColorSpace">6</int>
+                                                                                               <string key="NSCatalogName">System</string>
+                                                                                               <string key="NSColorName">gridColor</string>
+                                                                                               <object class="NSColor" key="NSColor">
+                                                                                                       <int key="NSColorSpace">3</int>
+                                                                                                       <bytes key="NSWhite">MC41AA</bytes>
+                                                                                               </object>
+                                                                                       </object>
+                                                                                       <double key="NSRowHeight">1.700000e+01</double>
+                                                                                       <int key="NSTvFlags">-767557632</int>
+                                                                                       <int key="NSColumnAutoresizingStyle">4</int>
+                                                                                       <int key="NSDraggingSourceMaskForLocal">15</int>
+                                                                                       <int key="NSDraggingSourceMaskForNonLocal">0</int>
+                                                                                       <bool key="NSAllowsTypeSelect">YES</bool>
+                                                                               </object>
+                                                                       </object>
+                                                                       <string key="NSFrame">{{1, 17}, {219, 102}}</string>
+                                                                       <reference key="NSSuperview" ref="1066664982"/>
+                                                                       <reference key="NSNextKeyView" ref="695882538"/>
+                                                                       <reference key="NSDocView" ref="695882538"/>
+                                                                       <reference key="NSBGColor" ref="928689894"/>
+                                                                       <int key="NScvFlags">4</int>
+                                                               </object>
+                                                               <object class="NSScroller" id="73800878">
+                                                                       <reference key="NSNextResponder" ref="1066664982"/>
+                                                                       <int key="NSvFlags">256</int>
+                                                                       <string key="NSFrame">{{220, 17}, {15, 102}}</string>
+                                                                       <reference key="NSSuperview" ref="1066664982"/>
+                                                                       <reference key="NSTarget" ref="1066664982"/>
+                                                                       <string key="NSAction">_doScroller:</string>
+                                                                       <double key="NSCurValue">3.700000e+01</double>
+                                                                       <double key="NSPercent">1.390978e-01</double>
+                                                               </object>
+                                                               <object class="NSScroller" id="1013241997">
+                                                                       <reference key="NSNextResponder" ref="1066664982"/>
+                                                                       <int key="NSvFlags">256</int>
+                                                                       <string key="NSFrame">{{1, 119}, {219, 15}}</string>
+                                                                       <reference key="NSSuperview" ref="1066664982"/>
+                                                                       <int key="NSsFlags">1</int>
+                                                                       <reference key="NSTarget" ref="1066664982"/>
+                                                                       <string key="NSAction">_doScroller:</string>
+                                                                       <double key="NSPercent">5.714286e-01</double>
+                                                               </object>
+                                                               <object class="NSClipView" id="175727283">
+                                                                       <reference key="NSNextResponder" ref="1066664982"/>
+                                                                       <int key="NSvFlags">2304</int>
+                                                                       <object class="NSMutableArray" key="NSSubviews">
+                                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                               <reference ref="603767070"/>
+                                                                       </object>
+                                                                       <string key="NSFrame">{{1, 0}, {219, 17}}</string>
+                                                                       <reference key="NSSuperview" ref="1066664982"/>
+                                                                       <reference key="NSNextKeyView" ref="603767070"/>
+                                                                       <reference key="NSDocView" ref="603767070"/>
+                                                                       <reference key="NSBGColor" ref="928689894"/>
+                                                                       <int key="NScvFlags">4</int>
+                                                               </object>
+                                                               <reference ref="389160094"/>
+                                                       </object>
+                                                       <string key="NSFrame">{{32, 153}, {236, 135}}</string>
+                                                       <reference key="NSSuperview" ref="439893737"/>
+                                                       <reference key="NSNextKeyView" ref="499395455"/>
+                                                       <int key="NSsFlags">50</int>
+                                                       <reference key="NSVScroller" ref="73800878"/>
+                                                       <reference key="NSHScroller" ref="1013241997"/>
+                                                       <reference key="NSContentView" ref="499395455"/>
+                                                       <reference key="NSHeaderClipView" ref="175727283"/>
+                                                       <reference key="NSCornerView" ref="389160094"/>
+                                                       <bytes key="NSScrollAmts">QSAAAEEgAABBmAAAQZgAAA</bytes>
+                                               </object>
+                                       </object>
+                                       <string key="NSFrameSize">{288, 333}</string>
+                                       <reference key="NSSuperview"/>
+                               </object>
+                               <string key="NSScreenRect">{{0, 0}, {1024, 746}}</string>
+                               <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
+                       </object>
+                       <object class="NSCustomObject" id="567503449">
+                               <string key="NSClassName">NotiPodController</string>
+                       </object>
+                       <object class="NSCustomObject" id="719278169">
+                               <string key="NSClassName">NotiPodAppDelegate</string>
+                       </object>
+                       <object class="NSWindowTemplate" id="92204650">
+                               <int key="NSWindowStyleMask">7</int>
+                               <int key="NSWindowBacking">2</int>
+                               <string key="NSWindowRect">{{196, 436}, {204, 74}}</string>
+                               <int key="NSWTFlags">603979776</int>
+                               <string key="NSWindowTitle">Window</string>
+                               <string key="NSWindowClass">NSWindow</string>
+                               <nil key="NSViewClass"/>
+                               <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
+                               <object class="NSView" key="NSWindowView" id="851027294">
+                                       <nil key="NSNextResponder"/>
+                                       <int key="NSvFlags">256</int>
+                                       <object class="NSMutableArray" key="NSSubviews">
+                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                               <object class="NSProgressIndicator" id="327138569">
+                                                       <reference key="NSNextResponder" ref="851027294"/>
+                                                       <int key="NSvFlags">1292</int>
+                                                       <object class="NSPSMatrix" key="NSDrawMatrix"/>
+                                                       <string key="NSFrame">{{18, 16}, {168, 20}}</string>
+                                                       <reference key="NSSuperview" ref="851027294"/>
+                                                       <int key="NSpiFlags">16394</int>
+                                                       <double key="NSMinValue">2.000000e+01</double>
+                                                       <double key="NSMaxValue">1.000000e+02</double>
+                                               </object>
+                                               <object class="NSTextField" id="98522848">
+                                                       <reference key="NSNextResponder" ref="851027294"/>
+                                                       <int key="NSvFlags">268</int>
+                                                       <string key="NSFrame">{{17, 44}, {111, 17}}</string>
+                                                       <reference key="NSSuperview" ref="851027294"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSTextFieldCell" key="NSCell" id="28320021">
+                                                               <int key="NSCellFlags">67239488</int>
+                                                               <int key="NSCellFlags2">272630784</int>
+                                                               <string key="NSContents">Loading library...</string>
+                                                               <reference key="NSSupport" ref="822023840"/>
+                                                               <reference key="NSControlView" ref="98522848"/>
+                                                               <reference key="NSBackgroundColor" ref="439689891"/>
+                                                               <reference key="NSTextColor" ref="888276067"/>
+                                                       </object>
+                                               </object>
+                                       </object>
+                                       <string key="NSFrameSize">{204, 74}</string>
+                               </object>
+                               <string key="NSScreenRect">{{0, 0}, {1024, 746}}</string>
+                               <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
+                       </object>
+               </object>
+               <object class="IBObjectContainer" key="IBDocument.Objects">
+                       <object class="NSMutableArray" key="connectionRecords">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">orderFrontStandardAboutPanel:</string>
+                                               <reference key="source" ref="1021"/>
+                                               <reference key="destination" ref="238522557"/>
+                                       </object>
+                                       <int key="connectionID">142</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">showHelp:</string>
+                                               <reference key="source" ref="1014"/>
+                                               <reference key="destination" ref="238773614"/>
+                                       </object>
+                                       <int key="connectionID">360</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">hide:</string>
+                                               <reference key="source" ref="1014"/>
+                                               <reference key="destination" ref="755159360"/>
+                                       </object>
+                                       <int key="connectionID">367</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">hideOtherApplications:</string>
+                                               <reference key="source" ref="1014"/>
+                                               <reference key="destination" ref="342932134"/>
+                                       </object>
+                                       <int key="connectionID">368</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">terminate:</string>
+                                               <reference key="source" ref="1014"/>
+                                               <reference key="destination" ref="632727374"/>
+                                       </object>
+                                       <int key="connectionID">369</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">unhideAllApplications:</string>
+                                               <reference key="source" ref="1014"/>
+                                               <reference key="destination" ref="908899353"/>
+                                       </object>
+                                       <int key="connectionID">370</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">doSync:</string>
+                                               <reference key="source" ref="567503449"/>
+                                               <reference key="destination" ref="703636579"/>
+                                       </object>
+                                       <int key="connectionID">407</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">window</string>
+                                               <reference key="source" ref="567503449"/>
+                                               <reference key="destination" ref="972006081"/>
+                                       </object>
+                                       <int key="connectionID">420</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">doSelectFolder:</string>
+                                               <reference key="source" ref="567503449"/>
+                                               <reference key="destination" ref="178047326"/>
+                                       </object>
+                                       <int key="connectionID">421</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">loadingSheet</string>
+                                               <reference key="source" ref="567503449"/>
+                                               <reference key="destination" ref="92204650"/>
+                                       </object>
+                                       <int key="connectionID">434</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">delegate</string>
+                                               <reference key="source" ref="1050"/>
+                                               <reference key="destination" ref="719278169"/>
+                                       </object>
+                                       <int key="connectionID">435</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">playlistView</string>
+                                               <reference key="source" ref="567503449"/>
+                                               <reference key="destination" ref="695882538"/>
+                                       </object>
+                                       <int key="connectionID">450</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">folderPopup</string>
+                                               <reference key="source" ref="567503449"/>
+                                               <reference key="destination" ref="997567970"/>
+                                       </object>
+                                       <int key="connectionID">451</int>
+                               </object>
+                       </object>
+                       <object class="IBMutableOrderedSet" key="objectRecords">
+                               <object class="NSArray" key="orderedObjects">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">0</int>
+                                               <object class="NSArray" key="object" id="1049">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                               </object>
+                                               <reference key="children" ref="1048"/>
+                                               <nil key="parent"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">-2</int>
+                                               <reference key="object" ref="1021"/>
+                                               <reference key="parent" ref="1049"/>
+                                               <string type="base64-UTF8" key="objectName">RmlsZSdzIE93bmVyA</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">-1</int>
+                                               <reference key="object" ref="1014"/>
+                                               <reference key="parent" ref="1049"/>
+                                               <string key="objectName">First Responder</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">-3</int>
+                                               <reference key="object" ref="1050"/>
+                                               <reference key="parent" ref="1049"/>
+                                               <string key="objectName">Application</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">29</int>
+                                               <reference key="object" ref="649796088"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="694149608"/>
+                                                       <reference ref="391199113"/>
+                                               </object>
+                                               <reference key="parent" ref="1049"/>
+                                               <string key="objectName">MainMenu</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">56</int>
+                                               <reference key="object" ref="694149608"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="110575045"/>
+                                               </object>
+                                               <reference key="parent" ref="649796088"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">103</int>
+                                               <reference key="object" ref="391199113"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="374024848"/>
+                                               </object>
+                                               <reference key="parent" ref="649796088"/>
+                                               <string key="objectName">1</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">106</int>
+                                               <reference key="object" ref="374024848"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="238773614"/>
+                                               </object>
+                                               <reference key="parent" ref="391199113"/>
+                                               <string key="objectName">2</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">111</int>
+                                               <reference key="object" ref="238773614"/>
+                                               <reference key="parent" ref="374024848"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">57</int>
+                                               <reference key="object" ref="110575045"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="238522557"/>
+                                                       <reference ref="755159360"/>
+                                                       <reference ref="908899353"/>
+                                                       <reference ref="632727374"/>
+                                                       <reference ref="646227648"/>
+                                                       <reference ref="304266470"/>
+                                                       <reference ref="1046388886"/>
+                                                       <reference ref="1056857174"/>
+                                                       <reference ref="342932134"/>
+                                               </object>
+                                               <reference key="parent" ref="694149608"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">58</int>
+                                               <reference key="object" ref="238522557"/>
+                                               <reference key="parent" ref="110575045"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">134</int>
+                                               <reference key="object" ref="755159360"/>
+                                               <reference key="parent" ref="110575045"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">150</int>
+                                               <reference key="object" ref="908899353"/>
+                                               <reference key="parent" ref="110575045"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">136</int>
+                                               <reference key="object" ref="632727374"/>
+                                               <reference key="parent" ref="110575045"/>
+                                               <string key="objectName">1111</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">144</int>
+                                               <reference key="object" ref="646227648"/>
+                                               <reference key="parent" ref="110575045"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">236</int>
+                                               <reference key="object" ref="304266470"/>
+                                               <reference key="parent" ref="110575045"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">131</int>
+                                               <reference key="object" ref="1046388886"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="752062318"/>
+                                               </object>
+                                               <reference key="parent" ref="110575045"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">149</int>
+                                               <reference key="object" ref="1056857174"/>
+                                               <reference key="parent" ref="110575045"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">145</int>
+                                               <reference key="object" ref="342932134"/>
+                                               <reference key="parent" ref="110575045"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">130</int>
+                                               <reference key="object" ref="752062318"/>
+                                               <reference key="parent" ref="1046388886"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">371</int>
+                                               <reference key="object" ref="972006081"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="439893737"/>
+                                               </object>
+                                               <reference key="parent" ref="1049"/>
+                                               <string key="objectName">NotiPod</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">372</int>
+                                               <reference key="object" ref="439893737"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="818249148"/>
+                                                       <reference ref="703636579"/>
+                                                       <reference ref="323617138"/>
+                                                       <reference ref="1066664982"/>
+                                                       <reference ref="524945726"/>
+                                                       <reference ref="997567970"/>
+                                               </object>
+                                               <reference key="parent" ref="972006081"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">391</int>
+                                               <reference key="object" ref="818249148"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="574520385"/>
+                                               </object>
+                                               <reference key="parent" ref="439893737"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">392</int>
+                                               <reference key="object" ref="574520385"/>
+                                               <reference key="parent" ref="818249148"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">393</int>
+                                               <reference key="object" ref="524945726"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="959016606"/>
+                                               </object>
+                                               <reference key="parent" ref="439893737"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">394</int>
+                                               <reference key="object" ref="959016606"/>
+                                               <reference key="parent" ref="524945726"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">395</int>
+                                               <reference key="object" ref="703636579"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="1061036965"/>
+                                               </object>
+                                               <reference key="parent" ref="439893737"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">396</int>
+                                               <reference key="object" ref="1061036965"/>
+                                               <reference key="parent" ref="703636579"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">404</int>
+                                               <reference key="object" ref="567503449"/>
+                                               <reference key="parent" ref="1049"/>
+                                               <string key="objectName">NotiPodController</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">411</int>
+                                               <reference key="object" ref="997567970"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="467826865"/>
+                                               </object>
+                                               <reference key="parent" ref="439893737"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">412</int>
+                                               <reference key="object" ref="467826865"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="398390192"/>
+                                               </object>
+                                               <reference key="parent" ref="997567970"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">413</int>
+                                               <reference key="object" ref="398390192"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="178047326"/>
+                                                       <reference ref="122068822"/>
+                                               </object>
+                                               <reference key="parent" ref="467826865"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">414</int>
+                                               <reference key="object" ref="178047326"/>
+                                               <reference key="parent" ref="398390192"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">425</int>
+                                               <reference key="object" ref="719278169"/>
+                                               <reference key="parent" ref="1049"/>
+                                               <string key="objectName">NotiPodAppDelegate</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">428</int>
+                                               <reference key="object" ref="92204650"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="851027294"/>
+                                               </object>
+                                               <reference key="parent" ref="1049"/>
+                                               <string key="objectName">NotiPodLoading</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">429</int>
+                                               <reference key="object" ref="851027294"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="327138569"/>
+                                                       <reference ref="98522848"/>
+                                               </object>
+                                               <reference key="parent" ref="92204650"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">430</int>
+                                               <reference key="object" ref="327138569"/>
+                                               <reference key="parent" ref="851027294"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">431</int>
+                                               <reference key="object" ref="98522848"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="28320021"/>
+                                               </object>
+                                               <reference key="parent" ref="851027294"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">432</int>
+                                               <reference key="object" ref="28320021"/>
+                                               <reference key="parent" ref="98522848"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">436</int>
+                                               <reference key="object" ref="122068822"/>
+                                               <reference key="parent" ref="398390192"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">437</int>
+                                               <reference key="object" ref="323617138"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="295895067"/>
+                                               </object>
+                                               <reference key="parent" ref="439893737"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">438</int>
+                                               <reference key="object" ref="295895067"/>
+                                               <reference key="parent" ref="323617138"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">440</int>
+                                               <reference key="object" ref="1066664982"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="73800878"/>
+                                                       <reference ref="1013241997"/>
+                                                       <reference ref="695882538"/>
+                                                       <reference ref="603767070"/>
+                                               </object>
+                                               <reference key="parent" ref="439893737"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">441</int>
+                                               <reference key="object" ref="73800878"/>
+                                               <reference key="parent" ref="1066664982"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">442</int>
+                                               <reference key="object" ref="1013241997"/>
+                                               <reference key="parent" ref="1066664982"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">443</int>
+                                               <reference key="object" ref="695882538"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="888804271"/>
+                                                       <reference ref="870866881"/>
+                                               </object>
+                                               <reference key="parent" ref="1066664982"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">444</int>
+                                               <reference key="object" ref="603767070"/>
+                                               <reference key="parent" ref="1066664982"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">445</int>
+                                               <reference key="object" ref="888804271"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="904798784"/>
+                                               </object>
+                                               <reference key="parent" ref="695882538"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">446</int>
+                                               <reference key="object" ref="870866881"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="661397302"/>
+                                               </object>
+                                               <reference key="parent" ref="695882538"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">447</int>
+                                               <reference key="object" ref="661397302"/>
+                                               <reference key="parent" ref="870866881"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">448</int>
+                                               <reference key="object" ref="904798784"/>
+                                               <reference key="parent" ref="888804271"/>
+                                       </object>
+                               </object>
+                       </object>
+                       <object class="NSMutableDictionary" key="flattenedProperties">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                               <object class="NSMutableArray" key="dict.sortedKeys">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                       <string>-1.IBPluginDependency</string>
+                                       <string>-2.IBPluginDependency</string>
+                                       <string>-3.IBPluginDependency</string>
+                                       <string>103.IBPluginDependency</string>
+                                       <string>103.ImportedFromIB2</string>
+                                       <string>106.IBPluginDependency</string>
+                                       <string>106.ImportedFromIB2</string>
+                                       <string>106.editorWindowContentRectSynchronizationRect</string>
+                                       <string>111.IBPluginDependency</string>
+                                       <string>111.ImportedFromIB2</string>
+                                       <string>130.IBPluginDependency</string>
+                                       <string>130.ImportedFromIB2</string>
+                                       <string>130.editorWindowContentRectSynchronizationRect</string>
+                                       <string>131.IBPluginDependency</string>
+                                       <string>131.ImportedFromIB2</string>
+                                       <string>134.IBPluginDependency</string>
+                                       <string>134.ImportedFromIB2</string>
+                                       <string>136.IBPluginDependency</string>
+                                       <string>136.ImportedFromIB2</string>
+                                       <string>144.IBPluginDependency</string>
+                                       <string>144.ImportedFromIB2</string>
+                                       <string>145.IBPluginDependency</string>
+                                       <string>145.ImportedFromIB2</string>
+                                       <string>149.IBPluginDependency</string>
+                                       <string>149.ImportedFromIB2</string>
+                                       <string>150.IBPluginDependency</string>
+                                       <string>150.ImportedFromIB2</string>
+                                       <string>236.IBPluginDependency</string>
+                                       <string>236.ImportedFromIB2</string>
+                                       <string>29.IBEditorWindowLastContentRect</string>
+                                       <string>29.IBPluginDependency</string>
+                                       <string>29.ImportedFromIB2</string>
+                                       <string>29.WindowOrigin</string>
+                                       <string>29.editorWindowContentRectSynchronizationRect</string>
+                                       <string>371.IBEditorWindowLastContentRect</string>
+                                       <string>371.IBWindowTemplateEditedContentRect</string>
+                                       <string>371.NSWindowTemplate.visibleAtLaunch</string>
+                                       <string>371.editorWindowContentRectSynchronizationRect</string>
+                                       <string>372.IBPluginDependency</string>
+                                       <string>391.IBPluginDependency</string>
+                                       <string>392.IBPluginDependency</string>
+                                       <string>393.IBPluginDependency</string>
+                                       <string>394.IBPluginDependency</string>
+                                       <string>395.IBPluginDependency</string>
+                                       <string>396.IBPluginDependency</string>
+                                       <string>404.IBPluginDependency</string>
+                                       <string>411.IBPluginDependency</string>
+                                       <string>412.IBPluginDependency</string>
+                                       <string>413.IBPluginDependency</string>
+                                       <string>413.editorWindowContentRectSynchronizationRect</string>
+                                       <string>414.IBPluginDependency</string>
+                                       <string>425.IBPluginDependency</string>
+                                       <string>428.IBEditorWindowLastContentRect</string>
+                                       <string>428.IBWindowTemplateEditedContentRect</string>
+                                       <string>428.NSWindowTemplate.visibleAtLaunch</string>
+                                       <string>428.editorWindowContentRectSynchronizationRect</string>
+                                       <string>429.IBPluginDependency</string>
+                                       <string>430.IBPluginDependency</string>
+                                       <string>431.IBPluginDependency</string>
+                                       <string>432.IBPluginDependency</string>
+                                       <string>436.IBPluginDependency</string>
+                                       <string>437.IBPluginDependency</string>
+                                       <string>438.IBPluginDependency</string>
+                                       <string>440.IBPluginDependency</string>
+                                       <string>441.IBPluginDependency</string>
+                                       <string>442.IBPluginDependency</string>
+                                       <string>443.IBPluginDependency</string>
+                                       <string>444.IBPluginDependency</string>
+                                       <string>445.IBPluginDependency</string>
+                                       <string>446.IBPluginDependency</string>
+                                       <string>447.IBPluginDependency</string>
+                                       <string>448.IBPluginDependency</string>
+                                       <string>56.IBPluginDependency</string>
+                                       <string>56.ImportedFromIB2</string>
+                                       <string>57.IBPluginDependency</string>
+                                       <string>57.ImportedFromIB2</string>
+                                       <string>57.editorWindowContentRectSynchronizationRect</string>
+                                       <string>58.IBPluginDependency</string>
+                                       <string>58.ImportedFromIB2</string>
+                               </object>
+                               <object class="NSMutableArray" key="dict.values">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilderKit</string>
+                                       <string>com.apple.InterfaceBuilderKit</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <integer value="1" id="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>{{98, 681}, {163, 23}}</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>{{436, 809}, {64, 6}}</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>{{0, 714}, {148, 20}}</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>{74, 862}</string>
+                                       <string>{{529, 476}, {148, 20}}</string>
+                                       <string>{{343, 40}, {288, 333}}</string>
+                                       <string>{{343, 40}, {288, 333}}</string>
+                                       <reference ref="9"/>
+                                       <string>{{505, 213}, {252, 190}}</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>{{89, 581}, {211, 33}}</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>{{21, 626}, {204, 74}}</string>
+                                       <string>{{21, 626}, {204, 74}}</string>
+                                       <integer value="0"/>
+                                       <string>{{196, 436}, {204, 74}}</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>{{23, 551}, {192, 153}}</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                               </object>
+                       </object>
+                       <object class="NSMutableDictionary" key="unlocalizedProperties">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                               <object class="NSArray" key="dict.sortedKeys">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                               </object>
+                               <object class="NSMutableArray" key="dict.values">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                               </object>
+                       </object>
+                       <nil key="activeLocalization"/>
+                       <object class="NSMutableDictionary" key="localizations">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                               <object class="NSArray" key="dict.sortedKeys">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                               </object>
+                               <object class="NSMutableArray" key="dict.values">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                               </object>
+                       </object>
+                       <nil key="sourceID"/>
+                       <int key="maxID">451</int>
+               </object>
+               <object class="IBClassDescriber" key="IBDocument.Classes">
+                       <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                               <object class="IBPartialClassDescription">
+                                       <string key="className">NotiPodAppDelegate</string>
+                                       <string key="superclassName">NSObject</string>
+                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
+                                               <string key="majorKey">IBProjectSource</string>
+                                               <string key="minorKey">NotiPodAppDelegate.py</string>
+                                       </object>
+                               </object>
+                               <object class="IBPartialClassDescription">
+                                       <string key="className">NotiPodAppDelegate</string>
+                                       <string key="superclassName">NSObject</string>
+                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
+                                               <string key="majorKey">IBUserSource</string>
+                                               <string key="minorKey"/>
+                                       </object>
+                               </object>
+                               <object class="IBPartialClassDescription">
+                                       <string key="className">NotiPodController</string>
+                                       <string key="superclassName">NSObject</string>
+                                       <object class="NSMutableDictionary" key="actions">
+                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                               <object class="NSMutableArray" key="dict.sortedKeys">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <string>doSelectFolder:</string>
+                                                       <string>doSync:</string>
+                                               </object>
+                                               <object class="NSMutableArray" key="dict.values">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                               </object>
+                                       </object>
+                                       <object class="NSMutableDictionary" key="outlets">
+                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                               <object class="NSMutableArray" key="dict.sortedKeys">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <string>folderPopup</string>
+                                                       <string>loadingSheet</string>
+                                                       <string>playlistView</string>
+                                                       <string>window</string>
+                                               </object>
+                                               <object class="NSMutableArray" key="dict.values">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                                       <string>id</string>
+                                               </object>
+                                       </object>
+                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
+                                               <string key="majorKey">IBProjectSource</string>
+                                               <string key="minorKey">NotiPodController.py</string>
+                                       </object>
+                               </object>
+                               <object class="IBPartialClassDescription">
+                                       <string key="className">NotiPodController</string>
+                                       <string key="superclassName">NSObject</string>
+                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
+                                               <string key="majorKey">IBUserSource</string>
+                                               <string key="minorKey"/>
+                                       </object>
+                               </object>
+                       </object>
+               </object>
+               <int key="IBDocument.localizationMode">0</int>
+               <string key="IBDocument.LastKnownRelativeProjectPath">../notipod.xcodeproj</string>
+               <int key="IBDocument.defaultPropertyAccessControl">3</int>
+       </data>
+</archive>
diff --git a/Info.plist b/Info.plist
new file mode 100644 (file)
index 0000000..8387725
--- /dev/null
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>CFBundleDevelopmentRegion</key>
+       <string>English</string>
+       <key>CFBundleExecutable</key>
+       <string>${EXECUTABLE_NAME}</string>
+       <key>CFBundleIconFile</key>
+       <string></string>
+       <key>CFBundleIdentifier</key>
+       <string>com.yourcompany.notipod</string>
+       <key>CFBundleInfoDictionaryVersion</key>
+       <string>6.0</string>
+       <key>CFBundleName</key>
+       <string>${PRODUCT_NAME}</string>
+       <key>CFBundlePackageType</key>
+       <string>APPL</string>
+       <key>CFBundleShortVersionString</key>
+       <string>1.0</string>
+       <key>CFBundleSignature</key>
+       <string>????</string>
+       <key>CFBundleVersion</key>
+       <string>1.0</string>
+       <key>NSMainNibFile</key>
+       <string>NotiPod</string>
+       <key>NSPrincipalClass</key>
+       <string>NSApplication</string>
+</dict>
+</plist>
diff --git a/NotiPodAppDelegate.py b/NotiPodAppDelegate.py
new file mode 100644 (file)
index 0000000..9cf4d28
--- /dev/null
@@ -0,0 +1,51 @@
+#!/usr/bin/env python
+# Copyright 2009 James Bunton <jamesbunton@fastmail.fm>
+# Licensed for distribution under the GPL version 2, check COPYING for details
+
+from Foundation import *
+from AppKit import *
+import objc
+
+import itunes
+
+class NotiPodAppDelegate(NSObject):
+
+       # Delegate methods
+
+       def applicationWillFinishLaunching_(self, _):
+               prefs = NSUserDefaults.standardUserDefaults()
+               self._playlists = prefs.stringArrayForKey_("playlists")
+               self._folders = prefs.stringArrayForKey_("folders")
+
+       def applicationDidFinishLaunching_(self, _):
+               pass
+
+       def applicationWillTerminate_(self, _):
+               prefs = NSUserDefaults.standardUserDefaults()
+               prefs.synchronize()
+
+       def applicationShouldTerminateAfterLastWindowClosed_(self, _):
+               return True
+
+
+       # Public accessors
+
+       def playlists(self):
+               return self._playlists
+
+       def folders(self):
+               return self._folders or []
+
+       def addFolder_(self, folder):
+               self._folders.insert(0, folder)
+
+       def hasPlaylist_(self, playlist):
+               return playlist in self._playlists
+       
+       def removePlaylist_(self, playlist):
+               self._playlists.remove(playlist)
+       
+       def addPlaylist_(self, playlist):
+               self._playlists.append(playlist)
+
+
diff --git a/NotiPodController.py b/NotiPodController.py
new file mode 100644 (file)
index 0000000..e415cef
--- /dev/null
@@ -0,0 +1,65 @@
+#!/usr/bin/env python
+# Copyright 2009 James Bunton <jamesbunton@fastmail.fm>
+# Licensed for distribution under the GPL version 2, check COPYING for details
+
+from Foundation import *
+from AppKit import *
+import objc
+
+import itunes
+
+class NotiPodController(NSObject):
+       playlistView = objc.IBOutlet()
+       folderPopup = objc.IBOutlet()
+       window = objc.IBOutlet()
+       loadingSheet = objc.IBOutlet()
+
+
+       def awakeFromNib(self):
+###            self.loadLibrary()
+               self.performSelectorInBackground_withObject_(self.loadLibrary, None)
+               print "awakeFromNib"
+       
+       def finishLoading(self):
+               self.playlistView.setDataSource_(self.library)
+               self.folderPopup.addItemsWithTitles_(NSApp.delegate().folders())
+
+       def loadLibrary(self):
+               pool = NSAutoreleasePool.alloc().init()
+               NSApp.beginSheet_modalForWindow_modalDelegate_didEndSelector_contextInfo_(self.loadingSheet, self.window, None, None, None)
+               self.library = itunes.Library.alloc().init()
+               self.loadingSheet.close()
+               self.performSelectorOnMainThread_withObject_waitUntilDone_(self.finishLoading, None, False)
+               pool.drain()
+
+       @objc.signature("v@:@ii")
+       def selectFolderEnd_returnCode_contextInfo_(self, panel, ret, _):
+               if ret == NSOKButton:
+                       assert len(panel.filenames()) == 1
+                       folder = panel.filenames()[0]
+###                    NSApp.delegate().addFolder_(folder)
+                       self.folderPopup.insertItemWithTitle_atIndex_(folder, 2)
+                       self.folderPopup.selectItemAtIndex_(2)
+
+       @objc.IBAction
+       def doSelectFolder_(self, sender):
+               print "select folder"
+               try:
+                       folders = NSApp.delegate().folders()
+                       if len(folders) > 0:
+                               folder = folders[0]
+                       else:
+                               folder = None
+                       panel = NSOpenPanel.openPanel()
+                       panel.setCanChooseFiles_(False)
+                       panel.setCanChooseDirectories_(True)
+                       panel.setAllowsMultipleSelection_(False)
+                       panel.beginSheetForDirectory_file_types_modalForWindow_modalDelegate_didEndSelector_contextInfo_(folder, None, None, self.window, self, self.selectFolderEnd_returnCode_contextInfo_, None)
+               except:
+                       import traceback
+                       traceback.print_exc()
+
+       @objc.IBAction
+       def doSync_(self, sender):
+               print "hello me"
+
diff --git a/itunes.py b/itunes.py
new file mode 100644 (file)
index 0000000..8d2848b
--- /dev/null
+++ b/itunes.py
@@ -0,0 +1,169 @@
+#!/usr/bin/env python
+# Copyright 2009 James Bunton <jamesbunton@fastmail.fm>
+# Licensed for distribution under the GPL version 2, check COPYING for details
+
+import logging
+import os
+import shutil
+import urllib
+
+from Foundation import *
+
+
+def read_plist(filename):
+       try:
+               data = buffer(open(filename).read())
+       except IOError:
+               return None
+       plist, fmt, err = NSPropertyListSerialization.propertyListFromData_mutabilityOption_format_errorDescription_(data, NSPropertyListMutableContainers, None, None)
+       if err is not None:
+               errStr = err.encode("utf-8")
+               err.release() # Doesn't follow Cocoa conventions for some reason
+               raise TypeError(errStr)
+       return plist
+
+class Playlist(object):
+       def __init__(self, name, tracks, parent=None):
+               self.name = name
+               self.children = []
+               self.tracks = tracks
+               if parent is not None:
+                       parent.children.append(self)
+
+class Library(NSObject):
+       def init(self):
+               self.initWithFilename_("~/Music/iTunes/iTunes Music Library.xml")
+
+       def initWithFilename_(self, filename):
+               filename = os.path.expanduser(filename)
+               plist = read_plist(os.path.expanduser(filename))
+               self.folder = self.loc2name(plist["Music Folder"])
+               pl_tracks = plist["Tracks"]
+               self.playlists = []
+               for pl_playlist in plist["Playlists"]:
+                       self.playlists.append(self.make_playlist(pl_playlist, pl_tracks))
+
+       def loc2name(self, location):
+               return urllib.splithost(urllib.splittype(urllib.unquote(location))[1])[1]
+       
+       def make_playlist(self, pl_playlist, pl_tracks):
+               name = pl_playlist["Name"]
+               tracks = []
+               for item in pl_playlist.get("Playlist Items", []):
+                       trackID = item["Track ID"]
+                       filename = str(pl_tracks[str(trackID)]["Location"])
+                       filename = self.loc2name(filename)
+                       filename = filename[len(self.folder):]
+                       filename = eval(repr(filename).lstrip("u")).decode("utf-8")
+                       tracks.append(filename)
+               return Playlist(name, tracks)
+
+       def has_playlist(self, playlist):
+               for p in self.playlists:
+                       if p.name == playlist:
+                               return True
+               return False
+
+       def get_playlist(self, name):
+               playlist = [p for p in self.playlists if p.name == name]
+               return playlist.tracks
+
+       def list_playlists(self):
+               return [p.name for p in self.playlists]
+
+       def outlineView_numberOfChildrenOfItem_(self, view, item):
+               if item == None:
+                       return len(self.playlists)
+               else:
+                       return 0
+
+       def outlineView_isItemExpandable_(self, view, item):
+               return False
+
+       def outlineView_child_ofItem_(self, view, index, item):
+               if item == None:
+                       return self.playlists[index]
+               else:
+                       return None
+
+       def outlineView_objectValueForTableColumn_byItem_(self, view, column, item):
+               return item.name
+
+
+def export_m3u(dry_run, dest, drive_letter, music_dir, playlist_name, files):
+       if dry_run:
+               return
+       f = open(os.path.join(dest, playlist_name) + ".m3u", "w")
+       for filename in files:
+               filename = filename.replace("/", "\\").encode("utf-8")
+               f.write("%s:\\%s\\%s\n" % (drive_letter, music_dir, filename))
+       f.close()
+
+def strip_prefix(s, prefix):
+       assert s.startswith(prefix)
+       s = s[len(prefix):]
+       if s.startswith("/"):
+               s = s[1:]
+       return s
+
+def mkdirhier(path):
+       if os.path.isdir(path):
+               return
+       paths = [path]
+       while path != "/":
+               path = os.path.split(path)[0]
+               paths.append(path)
+       for path in reversed(paths):
+               try:
+                       os.mkdir(path)
+               except OSError:
+                       pass
+
+def sync(dry_run, source, dest, files):
+       join = os.path.join
+
+       logging.info("Calculating files to sync and deleting old files")
+       files = set(files)
+       for dirpath, dirnames, filenames in os.walk(dest):
+               full_dirpath = dirpath
+               dirpath = strip_prefix(dirpath, dest)
+
+               for filename in filenames:
+                       filename = join(dirpath, filename).decode("utf-8")
+
+                       # Whenever 'file' is deleted OSX will helpfully remove '._file'
+                       if not os.path.exists(join(dest, filename)):
+                               continue
+
+                       if filename in files:
+                               sourcestat = os.stat(join(source, filename))
+                               deststat = os.stat(join(dest, filename))
+                               same_time = abs(sourcestat.st_mtime - deststat.st_mtime) < 5
+                               same_size = sourcestat.st_size == deststat.st_size
+                               if same_time and same_size:
+                                       files.remove(filename)
+                                       logging.debug("keep: " + filename)
+                               else:
+                                       logging.debug("update: " + filename)
+
+                       elif not filename.startswith("Playlists/"):
+                               logging.debug("delete: " + filename)
+                               if not dry_run:
+                                       os.unlink(join(dest, filename))
+
+               if len(os.listdir(full_dirpath)) == 0:
+                       logging.debug("rmdir: " + dirpath)
+                       if not dry_run:
+                               os.rmdir(full_dirpath)
+
+
+       logging.info("Copying new files")
+       files = list(files)
+       files.sort()
+       for filename in files:
+               logging.debug("copy: " + filename)
+               if not dry_run:
+                       mkdirhier(os.path.dirname(join(dest, filename)))
+                       shutil.copy2(join(source, filename), join(dest, filename))
+
+
diff --git a/main.m b/main.m
new file mode 100644 (file)
index 0000000..505c846
--- /dev/null
+++ b/main.m
@@ -0,0 +1,47 @@
+/* Copyright 2009 James Bunton <jamesbunton@fastmail.fm>
+ * Licensed for distribution under the GPL version 2.
+ */
+
+#import <Python/Python.h>
+#import <Cocoa/Cocoa.h>
+
+int
+main(int argc, char** argv)
+{
+       NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
+
+       NSBundle* mainBundle = [NSBundle mainBundle];
+       NSString* resourcePath = [mainBundle resourcePath];
+       NSArray* pythonPathArray = [NSArray arrayWithObjects: resourcePath, [resourcePath stringByAppendingPathComponent:@"PyObjC"], nil];
+
+       setenv("PYTHONPATH", [[pythonPathArray componentsJoinedByString:@":"] UTF8String], 1);
+
+       NSArray* possibleMainExtensions = [NSArray arrayWithObjects: @"py", @"pyc", @"pyo", nil];
+       NSString* mainFilePath = nil;
+
+       for(NSString* possibleMainExtension in possibleMainExtensions) {
+               mainFilePath = [mainBundle pathForResource: @"main" ofType: possibleMainExtension];
+               if(mainFilePath != nil) break;
+       }
+
+       if(!mainFilePath) {
+               [NSException raise: NSInternalInconsistencyException format: @"%s:%d main() Failed to find the main.{py,pyc,pyo} file in the application wrapper's Resources directory.", __FILE__, __LINE__];
+       }
+
+       Py_SetProgramName("/usr/bin/python");
+       Py_Initialize();
+       PySys_SetArgv(argc, (char**)argv);
+
+       const char* mainFilePathPtr = [mainFilePath UTF8String];
+       FILE* mainFile = fopen(mainFilePathPtr, "r");
+       int result = PyRun_SimpleFile(mainFile, (char*)[[mainFilePath lastPathComponent] UTF8String]);
+
+       if(result != 0)
+               [NSException raise: NSInternalInconsistencyException
+                               format: @"%s:%d main() PyRun_SimpleFile failed with file '%@'.  See console for errors.", __FILE__, __LINE__, mainFilePath];
+
+       [pool drain];
+
+       return result;
+}
+
diff --git a/main.py b/main.py
new file mode 100644 (file)
index 0000000..1ddbb89
--- /dev/null
+++ b/main.py
@@ -0,0 +1,14 @@
+#!/usr/bin/env python
+# Copyright 2009 James Bunton <jamesbunton@fastmail.fm>
+# Licensed for distribution under the GPL version 2, check COPYING for details
+
+import objc
+import Foundation
+import AppKit
+from PyObjCTools import AppHelper
+
+import NotiPodAppDelegate
+import NotiPodController
+
+AppHelper.runEventLoop()
+
diff --git a/notipod.xcodeproj/project.pbxproj b/notipod.xcodeproj/project.pbxproj
new file mode 100644 (file)
index 0000000..db5ae1a
--- /dev/null
@@ -0,0 +1,297 @@
+// !$*UTF8*$!
+{
+       archiveVersion = 1;
+       classes = {
+       };
+       objectVersion = 44;
+       objects = {
+
+/* Begin PBXBuildFile section */
+               77631A270C06C501005415CB /* Python.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 77631A260C06C501005415CB /* Python.framework */; };
+               77631A3F0C0748CF005415CB /* main.py in Resources */ = {isa = PBXBuildFile; fileRef = 77631A3E0C0748CF005415CB /* main.py */; };
+               7790198F0C07548A00326F66 /* NotiPodController.py in Resources */ = {isa = PBXBuildFile; fileRef = 7790198E0C07548A00326F66 /* NotiPodController.py */; };
+               77C8C1F90C07829500965286 /* NotiPod.xib in Resources */ = {isa = PBXBuildFile; fileRef = 77C8C1F70C07829500965286 /* NotiPod.xib */; };
+               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 */; };
+               93F5D8EB0F930158006FB1E6 /* itunes.py in Resources */ = {isa = PBXBuildFile; fileRef = 93F5D8E90F930158006FB1E6 /* itunes.py */; };
+               93F5D8EC0F930158006FB1E6 /* sync.py in Resources */ = {isa = PBXBuildFile; fileRef = 93F5D8EA0F930158006FB1E6 /* sync.py */; };
+               93F5D91D0F933A00006FB1E6 /* NotiPodAppDelegate.py in Resources */ = {isa = PBXBuildFile; fileRef = 93F5D91C0F933A00006FB1E6 /* NotiPodAppDelegate.py */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+               089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+               1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
+               29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+               29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
+               29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
+               32CA4F630368D1EE00C91783 /* notipod_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = notipod_Prefix.pch; sourceTree = "<group>"; };
+               77631A260C06C501005415CB /* Python.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Python.framework; path = /System/Library/Frameworks/Python.framework; sourceTree = "<absolute>"; };
+               77631A3E0C0748CF005415CB /* main.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = main.py; sourceTree = "<group>"; };
+               7790198E0C07548A00326F66 /* NotiPodController.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = NotiPodController.py; sourceTree = "<group>"; };
+               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; };
+               93F5D8E90F930158006FB1E6 /* itunes.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = itunes.py; sourceTree = "<group>"; };
+               93F5D8EA0F930158006FB1E6 /* sync.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = sync.py; sourceTree = "<group>"; };
+               93F5D91C0F933A00006FB1E6 /* NotiPodAppDelegate.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = NotiPodAppDelegate.py; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+               8D11072E0486CEB800E47090 /* Frameworks */ = {
+                       isa = PBXFrameworksBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
+                               77631A270C06C501005415CB /* Python.framework in Frameworks */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+               080E96DDFE201D6D7F000001 /* Classes */ = {
+                       isa = PBXGroup;
+                       children = (
+                               93F5D91C0F933A00006FB1E6 /* NotiPodAppDelegate.py */,
+                               7790198E0C07548A00326F66 /* NotiPodController.py */,
+                       );
+                       name = Classes;
+                       sourceTree = "<group>";
+               };
+               1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
+                       isa = PBXGroup;
+                       children = (
+                               77631A260C06C501005415CB /* Python.framework */,
+                               1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
+                       );
+                       name = "Linked Frameworks";
+                       sourceTree = "<group>";
+               };
+               1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = {
+                       isa = PBXGroup;
+                       children = (
+                               29B97324FDCFA39411CA2CEA /* AppKit.framework */,
+                               29B97325FDCFA39411CA2CEA /* Foundation.framework */,
+                       );
+                       name = "Other Frameworks";
+                       sourceTree = "<group>";
+               };
+               19C28FACFE9D520D11CA2CBB /* Products */ = {
+                       isa = PBXGroup;
+                       children = (
+                               8D1107320486CEB800E47090 /* notipod.app */,
+                       );
+                       name = Products;
+                       sourceTree = "<group>";
+               };
+               29B97314FDCFA39411CA2CEA /* notipod */ = {
+                       isa = PBXGroup;
+                       children = (
+                               080E96DDFE201D6D7F000001 /* Classes */,
+                               29B97315FDCFA39411CA2CEA /* Other Sources */,
+                               29B97317FDCFA39411CA2CEA /* Resources */,
+                               29B97323FDCFA39411CA2CEA /* Frameworks */,
+                               19C28FACFE9D520D11CA2CBB /* Products */,
+                       );
+                       name = notipod;
+                       sourceTree = "<group>";
+               };
+               29B97315FDCFA39411CA2CEA /* Other Sources */ = {
+                       isa = PBXGroup;
+                       children = (
+                               93F5D8E90F930158006FB1E6 /* itunes.py */,
+                               93F5D8EA0F930158006FB1E6 /* sync.py */,
+                               32CA4F630368D1EE00C91783 /* notipod_Prefix.pch */,
+                               29B97316FDCFA39411CA2CEA /* main.m */,
+                               77631A3E0C0748CF005415CB /* main.py */,
+                       );
+                       name = "Other Sources";
+                       sourceTree = "<group>";
+               };
+               29B97317FDCFA39411CA2CEA /* Resources */ = {
+                       isa = PBXGroup;
+                       children = (
+                               77C8C1F70C07829500965286 /* NotiPod.xib */,
+                               8D1107310486CEB800E47090 /* Info.plist */,
+                               089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
+                       );
+                       name = Resources;
+                       sourceTree = "<group>";
+               };
+               29B97323FDCFA39411CA2CEA /* Frameworks */ = {
+                       isa = PBXGroup;
+                       children = (
+                               1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
+                               1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
+                       );
+                       name = Frameworks;
+                       sourceTree = "<group>";
+               };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+               8D1107260486CEB800E47090 /* notipod */ = {
+                       isa = PBXNativeTarget;
+                       buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "notipod" */;
+                       buildPhases = (
+                               8D1107290486CEB800E47090 /* Resources */,
+                               8D11072C0486CEB800E47090 /* Sources */,
+                               8D11072E0486CEB800E47090 /* Frameworks */,
+                       );
+                       buildRules = (
+                       );
+                       dependencies = (
+                       );
+                       name = notipod;
+                       productInstallPath = "$(HOME)/Applications";
+                       productName = notipod;
+                       productReference = 8D1107320486CEB800E47090 /* notipod.app */;
+                       productType = "com.apple.product-type.application";
+               };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+               29B97313FDCFA39411CA2CEA /* Project object */ = {
+                       isa = PBXProject;
+                       buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "notipod" */;
+                       compatibilityVersion = "Xcode 3.0";
+                       hasScannedForEncodings = 1;
+                       mainGroup = 29B97314FDCFA39411CA2CEA /* notipod */;
+                       projectDirPath = "";
+                       projectRoot = "";
+                       targets = (
+                               8D1107260486CEB800E47090 /* notipod */,
+                       );
+               };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+               8D1107290486CEB800E47090 /* Resources */ = {
+                       isa = PBXResourcesBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */,
+                               77631A3F0C0748CF005415CB /* main.py in Resources */,
+                               7790198F0C07548A00326F66 /* NotiPodController.py in Resources */,
+                               77C8C1F90C07829500965286 /* NotiPod.xib in Resources */,
+                               93F5D8EB0F930158006FB1E6 /* itunes.py in Resources */,
+                               93F5D8EC0F930158006FB1E6 /* sync.py in Resources */,
+                               93F5D91D0F933A00006FB1E6 /* NotiPodAppDelegate.py in Resources */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+               8D11072C0486CEB800E47090 /* Sources */ = {
+                       isa = PBXSourcesBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               8D11072D0486CEB800E47090 /* main.m in Sources */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+               089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = {
+                       isa = PBXVariantGroup;
+                       children = (
+                               089C165DFE840E0CC02AAC07 /* English */,
+                       );
+                       name = InfoPlist.strings;
+                       sourceTree = "<group>";
+               };
+               77C8C1F70C07829500965286 /* NotiPod.xib */ = {
+                       isa = PBXVariantGroup;
+                       children = (
+                               77C8C1F80C07829500965286 /* English */,
+                       );
+                       name = NotiPod.xib;
+                       sourceTree = "<group>";
+               };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+               C01FCF4B08A954540054247B /* Debug */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               COPY_PHASE_STRIP = NO;
+                               GCC_DYNAMIC_NO_PIC = NO;
+                               GCC_ENABLE_FIX_AND_CONTINUE = YES;
+                               GCC_MODEL_TUNING = G5;
+                               GCC_OPTIMIZATION_LEVEL = 0;
+                               GCC_PRECOMPILE_PREFIX_HEADER = YES;
+                               GCC_PREFIX_HEADER = notipod_Prefix.pch;
+                               INFOPLIST_FILE = Info.plist;
+                               INSTALL_PATH = "$(HOME)/Applications";
+                               PRODUCT_NAME = notipod;
+                               WRAPPER_EXTENSION = app;
+                               ZERO_LINK = YES;
+                       };
+                       name = Debug;
+               };
+               C01FCF4C08A954540054247B /* Release */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+                               GCC_MODEL_TUNING = G5;
+                               GCC_PRECOMPILE_PREFIX_HEADER = YES;
+                               GCC_PREFIX_HEADER = notipod_Prefix.pch;
+                               INFOPLIST_FILE = Info.plist;
+                               INSTALL_PATH = "$(HOME)/Applications";
+                               PRODUCT_NAME = notipod;
+                               WRAPPER_EXTENSION = app;
+                       };
+                       name = Release;
+               };
+               C01FCF4F08A954540054247B /* Debug */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               GCC_WARN_ABOUT_RETURN_TYPE = YES;
+                               GCC_WARN_UNUSED_VARIABLE = YES;
+                               PREBINDING = NO;
+                               SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
+                       };
+                       name = Debug;
+               };
+               C01FCF5008A954540054247B /* Release */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               ARCHS = (
+                                       ppc,
+                                       i386,
+                               );
+                               GCC_WARN_ABOUT_RETURN_TYPE = YES;
+                               GCC_WARN_UNUSED_VARIABLE = YES;
+                               PREBINDING = NO;
+                               SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
+                       };
+                       name = Release;
+               };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+               C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "notipod" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               C01FCF4B08A954540054247B /* Debug */,
+                               C01FCF4C08A954540054247B /* Release */,
+                       );
+                       defaultConfigurationIsVisible = 0;
+                       defaultConfigurationName = Release;
+               };
+               C01FCF4E08A954540054247B /* Build configuration list for PBXProject "notipod" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               C01FCF4F08A954540054247B /* Debug */,
+                               C01FCF5008A954540054247B /* Release */,
+                       );
+                       defaultConfigurationIsVisible = 0;
+                       defaultConfigurationName = Release;
+               };
+/* End XCConfigurationList section */
+       };
+       rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
+}
diff --git a/sync.py b/sync.py
new file mode 100755 (executable)
index 0000000..2ec3d29
--- /dev/null
+++ b/sync.py
@@ -0,0 +1,84 @@
+#!/usr/bin/env python
+
+VERSION = "0.1"
+
+import logging
+import optparse
+import os
+import sys
+
+import itunes
+
+
+def parse_options():
+       parser = optparse.OptionParser(version="%prog " + VERSION, 
+               description = "Synchronise an iTunes playlist with a directory",
+               usage = "%prog destination playlist [playlist ...]"
+       )
+       parser.add_option("-q", "--quiet",
+               action="store_true", dest="quiet", default=False)
+       parser.add_option("-v", "--verbose",
+               action="store_true", dest="verbose", default=False)
+       parser.add_option("-n", "--dry-run",
+               action="store_true", dest="dry_run", default=False)
+       parser.add_option("--itunes-library",
+               action="store", dest="itunes_library", default=None)
+       parser.add_option("--drive-letter",
+               action="store", dest="drive_letter", default="E")
+       parser.add_option("--media-dir",
+               action="store", dest="media_dir", default="iTunes")
+
+       opts, args = parser.parse_args(sys.argv[1:])
+       if len(args) < 2:
+               parser.print_usage()
+               sys.exit(1)
+       opts.dest = args[0]
+       opts.full_dest = os.path.join(opts.dest, opts.media_dir)
+       opts.playlists = args[1:]
+
+       return opts
+
+def main():
+       opts = parse_options()
+
+       # Set up logging
+       try:
+               logging.basicConfig(format="%(levelname)s: %(message)s")
+       except TypeError:
+               # Support for Python 2.3
+               logging.basicConfig()
+       if opts.quiet:
+               logging.getLogger().setLevel(logging.CRITICAL)
+       elif opts.verbose:
+               logging.getLogger().setLevel(logging.DEBUG)
+       else:
+               logging.getLogger().setLevel(logging.INFO)
+
+       if not os.path.isdir(opts.dest):
+               logging.fatal("Destination must be specified as an absolute path.")
+               sys.exit(1)
+
+       logging.info("Loading library")
+       library = itunes.Library.alloc().initWithFilename_(opts.itunes_library)
+
+       for playlist in opts.playlists:
+               if not library.has_playlist(playlist):
+                       logging.fatal("Could not find playlist: " + playlist)
+                       sys.exit(1)
+
+       logging.info("Loading playlists")
+       all_tracks = []
+       for playlist in opts.playlists:
+               tracks = list(library.get_playlist(playlist))
+               all_tracks.extend(tracks)
+               itunes.export_m3u(opts.dry_run, opts.full_dest,
+                               opts.drive_letter, opts.media_dir,
+                               playlist, tracks)
+
+       logging.info("Synchronising")
+       itunes.sync(opts.dry_run, library.folder, opts.full_dest, all_tracks)
+
+
+if __name__ == "__main__":
+       main()
+