Initial commit of PostTunes.
authorJoseph Spiros <joseph.spiros@ithinksw.com>
Fri, 6 Mar 2009 04:07:23 +0000 (23:07 -0500)
committerJoseph Spiros <joseph.spiros@ithinksw.com>
Fri, 6 Mar 2009 04:07:23 +0000 (23:07 -0500)
.gitignore [new file with mode: 0644]
English.lproj/InfoPlist.strings [new file with mode: 0644]
English.lproj/MainMenu.xib [new file with mode: 0644]
Info.plist [new file with mode: 0644]
PostTunes.xcodeproj/project.pbxproj [new file with mode: 0644]
PostTunesAppDelegate.py [new file with mode: 0644]
PostTunes_Prefix.pch [new file with mode: 0644]
main.m [new file with mode: 0644]
main.py [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..ab810ff
--- /dev/null
@@ -0,0 +1,3 @@
+*.pbxuser
+*.mode1v3
+.DS_Store
diff --git a/English.lproj/InfoPlist.strings b/English.lproj/InfoPlist.strings
new file mode 100644 (file)
index 0000000..2a106c3
Binary files /dev/null and b/English.lproj/InfoPlist.strings differ
diff --git a/English.lproj/MainMenu.xib b/English.lproj/MainMenu.xib
new file mode 100644 (file)
index 0000000..6574b1a
--- /dev/null
@@ -0,0 +1,871 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.02">
+       <data>
+               <int key="IBDocument.SystemTarget">1050</int>
+               <string key="IBDocument.SystemVersion">9G55</string>
+               <string key="IBDocument.InterfaceBuilderVersion">672</string>
+               <string key="IBDocument.AppKitVersion">949.43</string>
+               <string key="IBDocument.HIToolboxVersion">353.00</string>
+               <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+                       <bool key="EncodedWithXMLCoder">YES</bool>
+                       <integer value="376"/>
+               </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="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">PostTunes</string>
+                                               <string key="NSKeyEquiv"/>
+                                               <int key="NSKeyEquivModMask">1048576</int>
+                                               <int key="NSMnemonicLoc">2147483647</int>
+                                               <object class="NSCustomResource" key="NSOnImage" id="715147791">
+                                                       <string key="NSClassName">NSImage</string>
+                                                       <string key="NSResourceName">NSMenuCheckmark</string>
+                                               </object>
+                                               <object class="NSCustomResource" key="NSMixedImage" id="553870632">
+                                                       <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">PostTunes</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 PostTunes</string>
+                                                                       <string key="NSKeyEquiv"/>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="715147791"/>
+                                                                       <reference key="NSMixedImage" ref="553870632"/>
+                                                               </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="715147791"/>
+                                                                       <reference key="NSMixedImage" ref="553870632"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="609285721">
+                                                                       <reference key="NSMenu" ref="110575045"/>
+                                                                       <string type="base64-UTF8" key="NSTitle">UHJlZmVyZW5jZXPigKY</string>
+                                                                       <string key="NSKeyEquiv">,</string>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="715147791"/>
+                                                                       <reference key="NSMixedImage" ref="553870632"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="481834944">
+                                                                       <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="715147791"/>
+                                                                       <reference key="NSMixedImage" ref="553870632"/>
+                                                               </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="715147791"/>
+                                                                       <reference key="NSMixedImage" ref="553870632"/>
+                                                                       <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="715147791"/>
+                                                                       <reference key="NSMixedImage" ref="553870632"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="755159360">
+                                                                       <reference key="NSMenu" ref="110575045"/>
+                                                                       <string key="NSTitle">Hide PostTunes</string>
+                                                                       <string key="NSKeyEquiv">h</string>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="715147791"/>
+                                                                       <reference key="NSMixedImage" ref="553870632"/>
+                                                               </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="715147791"/>
+                                                                       <reference key="NSMixedImage" ref="553870632"/>
+                                                               </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="715147791"/>
+                                                                       <reference key="NSMixedImage" ref="553870632"/>
+                                                               </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="715147791"/>
+                                                                       <reference key="NSMixedImage" ref="553870632"/>
+                                                               </object>
+                                                               <object class="NSMenuItem" id="632727374">
+                                                                       <reference key="NSMenu" ref="110575045"/>
+                                                                       <string key="NSTitle">Quit PostTunes</string>
+                                                                       <string key="NSKeyEquiv">q</string>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="715147791"/>
+                                                                       <reference key="NSMixedImage" ref="553870632"/>
+                                                               </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="715147791"/>
+                                               <reference key="NSMixedImage" ref="553870632"/>
+                                               <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">PostTunes Help</string>
+                                                                       <string key="NSKeyEquiv">?</string>
+                                                                       <int key="NSKeyEquivModMask">1048576</int>
+                                                                       <int key="NSMnemonicLoc">2147483647</int>
+                                                                       <reference key="NSOnImage" ref="715147791"/>
+                                                                       <reference key="NSMixedImage" ref="553870632"/>
+                                                               </object>
+                                                       </object>
+                                               </object>
+                                       </object>
+                               </object>
+                               <string key="NSName">_NSMainMenu</string>
+                       </object>
+                       <object class="NSCustomObject" id="610635028">
+                               <string key="NSClassName">PostTunesAppDelegate</string>
+                       </object>
+                       <object class="NSWindowTemplate" id="849797507">
+                               <int key="NSWindowStyleMask">27</int>
+                               <int key="NSWindowBacking">2</int>
+                               <string key="NSWindowRect">{{534, 588}, {372, 83}}</string>
+                               <int key="NSWTFlags">1677721600</int>
+                               <string key="NSWindowTitle">PostTunes Preferences</string>
+                               <string key="NSWindowClass">NSPanel</string>
+                               <nil key="NSViewClass"/>
+                               <string key="NSWindowContentMaxSize">{100000, 83}</string>
+                               <string key="NSWindowContentMinSize">{372, 83}</string>
+                               <object class="NSView" key="NSWindowView" id="569220535">
+                                       <reference key="NSNextResponder"/>
+                                       <int key="NSvFlags">256</int>
+                                       <object class="NSMutableArray" key="NSSubviews">
+                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                               <object class="NSTextField" id="634377170">
+                                                       <reference key="NSNextResponder" ref="569220535"/>
+                                                       <int key="NSvFlags">266</int>
+                                                       <string key="NSFrame">{{96, 47}, {256, 19}}</string>
+                                                       <reference key="NSSuperview" ref="569220535"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSTextFieldCell" key="NSCell" id="656904256">
+                                                               <int key="NSCellFlags">-1804468671</int>
+                                                               <int key="NSCellFlags2">272761856</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>
+                                                               <reference key="NSControlView" ref="634377170"/>
+                                                               <bool key="NSDrawsBackground">YES</bool>
+                                                               <object class="NSColor" key="NSBackgroundColor" id="538983924">
+                                                                       <int key="NSColorSpace">6</int>
+                                                                       <string key="NSCatalogName">System</string>
+                                                                       <string key="NSColorName">textBackgroundColor</string>
+                                                                       <object class="NSColor" key="NSColor">
+                                                                               <int key="NSColorSpace">3</int>
+                                                                               <bytes key="NSWhite">MQA</bytes>
+                                                                       </object>
+                                                               </object>
+                                                               <object class="NSColor" key="NSTextColor" id="114443093">
+                                                                       <int key="NSColorSpace">6</int>
+                                                                       <string key="NSCatalogName">System</string>
+                                                                       <string key="NSColorName">textColor</string>
+                                                                       <object class="NSColor" key="NSColor" id="897279390">
+                                                                               <int key="NSColorSpace">3</int>
+                                                                               <bytes key="NSWhite">MAA</bytes>
+                                                                       </object>
+                                                               </object>
+                                                       </object>
+                                               </object>
+                                               <object class="NSTextField" id="610994829">
+                                                       <reference key="NSNextResponder" ref="569220535"/>
+                                                       <int key="NSvFlags">266</int>
+                                                       <string key="NSFrame">{{96, 20}, {256, 19}}</string>
+                                                       <reference key="NSSuperview" ref="569220535"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSTextFieldCell" key="NSCell" id="608801269">
+                                                               <int key="NSCellFlags">-1804468671</int>
+                                                               <int key="NSCellFlags2">272761856</int>
+                                                               <string key="NSContents"/>
+                                                               <reference key="NSSupport" ref="26"/>
+                                                               <reference key="NSControlView" ref="610994829"/>
+                                                               <bool key="NSDrawsBackground">YES</bool>
+                                                               <reference key="NSBackgroundColor" ref="538983924"/>
+                                                               <reference key="NSTextColor" ref="114443093"/>
+                                                       </object>
+                                               </object>
+                                               <object class="NSTextField" id="628918607">
+                                                       <reference key="NSNextResponder" ref="569220535"/>
+                                                       <int key="NSvFlags">268</int>
+                                                       <string key="NSFrame">{{17, 49}, {74, 14}}</string>
+                                                       <reference key="NSSuperview" ref="569220535"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSTextFieldCell" key="NSCell" id="578918346">
+                                                               <int key="NSCellFlags">68288064</int>
+                                                               <int key="NSCellFlags2">71435264</int>
+                                                               <string key="NSContents">Handler URL:</string>
+                                                               <reference key="NSSupport" ref="26"/>
+                                                               <reference key="NSControlView" ref="628918607"/>
+                                                               <object class="NSColor" key="NSBackgroundColor" id="1008713210">
+                                                                       <int key="NSColorSpace">6</int>
+                                                                       <string key="NSCatalogName">System</string>
+                                                                       <string key="NSColorName">controlColor</string>
+                                                                       <object class="NSColor" key="NSColor">
+                                                                               <int key="NSColorSpace">3</int>
+                                                                               <bytes key="NSWhite">MC42NjY2NjY2OQA</bytes>
+                                                                       </object>
+                                                               </object>
+                                                               <object class="NSColor" key="NSTextColor" id="945655034">
+                                                                       <int key="NSColorSpace">6</int>
+                                                                       <string key="NSCatalogName">System</string>
+                                                                       <string key="NSColorName">controlTextColor</string>
+                                                                       <reference key="NSColor" ref="897279390"/>
+                                                               </object>
+                                                       </object>
+                                               </object>
+                                               <object class="NSTextField" id="481026540">
+                                                       <reference key="NSNextResponder" ref="569220535"/>
+                                                       <int key="NSvFlags">268</int>
+                                                       <string key="NSFrame">{{17, 22}, {74, 14}}</string>
+                                                       <reference key="NSSuperview" ref="569220535"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSTextFieldCell" key="NSCell" id="1004728512">
+                                                               <int key="NSCellFlags">68288064</int>
+                                                               <int key="NSCellFlags2">71435264</int>
+                                                               <string key="NSContents">Secret Key:</string>
+                                                               <reference key="NSSupport" ref="26"/>
+                                                               <reference key="NSControlView" ref="481026540"/>
+                                                               <reference key="NSBackgroundColor" ref="1008713210"/>
+                                                               <reference key="NSTextColor" ref="945655034"/>
+                                                       </object>
+                                               </object>
+                                       </object>
+                                       <string key="NSFrameSize">{372, 83}</string>
+                                       <reference key="NSSuperview"/>
+                               </object>
+                               <string key="NSScreenRect">{{0, 0}, {1680, 1028}}</string>
+                               <string key="NSMinSize">{372, 99}</string>
+                               <string key="NSMaxSize">{100000, 99}</string>
+                       </object>
+                       <object class="NSUserDefaultsController" id="727392839">
+                               <object class="NSMutableArray" key="NSDeclaredKeys">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                       <string>handlerURL</string>
+                                       <string>secretKey</string>
+                               </object>
+                               <bool key="NSSharedInstance">YES</bool>
+                       </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="IBOutletConnection" key="connection">
+                                               <string key="label">delegate</string>
+                                               <reference key="source" ref="1050"/>
+                                               <reference key="destination" ref="610635028"/>
+                                       </object>
+                                       <int key="connectionID">374</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">makeKeyAndOrderFront:</string>
+                                               <reference key="source" ref="849797507"/>
+                                               <reference key="destination" ref="609285721"/>
+                                       </object>
+                                       <int key="connectionID">385</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">preferencesWindow</string>
+                                               <reference key="source" ref="610635028"/>
+                                               <reference key="destination" ref="849797507"/>
+                                       </object>
+                                       <int key="connectionID">386</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBBindingConnection" key="connection">
+                                               <string key="label">value: values.handlerURL</string>
+                                               <reference key="source" ref="634377170"/>
+                                               <reference key="destination" ref="727392839"/>
+                                               <object class="NSNibBindingConnector" key="connector">
+                                                       <reference key="NSSource" ref="634377170"/>
+                                                       <reference key="NSDestination" ref="727392839"/>
+                                                       <string key="NSLabel">value: values.handlerURL</string>
+                                                       <string key="NSBinding">value</string>
+                                                       <string key="NSKeyPath">values.handlerURL</string>
+                                                       <int key="NSNibBindingConnectorVersion">2</int>
+                                               </object>
+                                       </object>
+                                       <int key="connectionID">389</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBBindingConnection" key="connection">
+                                               <string key="label">value: values.secretKey</string>
+                                               <reference key="source" ref="610994829"/>
+                                               <reference key="destination" ref="727392839"/>
+                                               <object class="NSNibBindingConnector" key="connector">
+                                                       <reference key="NSSource" ref="610994829"/>
+                                                       <reference key="NSDestination" ref="727392839"/>
+                                                       <string key="NSLabel">value: values.secretKey</string>
+                                                       <string key="NSBinding">value</string>
+                                                       <string key="NSKeyPath">values.secretKey</string>
+                                                       <int key="NSNibBindingConnectorVersion">2</int>
+                                               </object>
+                                       </object>
+                                       <int key="connectionID">391</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="609285721"/>
+                                                       <reference ref="481834944"/>
+                                                       <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">129</int>
+                                               <reference key="object" ref="609285721"/>
+                                               <reference key="parent" ref="110575045"/>
+                                               <string key="objectName">121</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">143</int>
+                                               <reference key="object" ref="481834944"/>
+                                               <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">373</int>
+                                               <reference key="object" ref="610635028"/>
+                                               <reference key="parent" ref="1049"/>
+                                               <string key="objectName">PostTunesAppDelegate</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">375</int>
+                                               <reference key="object" ref="849797507"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="569220535"/>
+                                               </object>
+                                               <reference key="parent" ref="1049"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">376</int>
+                                               <reference key="object" ref="569220535"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="628918607"/>
+                                                       <reference ref="634377170"/>
+                                                       <reference ref="610994829"/>
+                                                       <reference ref="481026540"/>
+                                               </object>
+                                               <reference key="parent" ref="849797507"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">377</int>
+                                               <reference key="object" ref="634377170"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="656904256"/>
+                                               </object>
+                                               <reference key="parent" ref="569220535"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">378</int>
+                                               <reference key="object" ref="656904256"/>
+                                               <reference key="parent" ref="634377170"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">379</int>
+                                               <reference key="object" ref="610994829"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="608801269"/>
+                                               </object>
+                                               <reference key="parent" ref="569220535"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">380</int>
+                                               <reference key="object" ref="608801269"/>
+                                               <reference key="parent" ref="610994829"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">381</int>
+                                               <reference key="object" ref="628918607"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="578918346"/>
+                                               </object>
+                                               <reference key="parent" ref="569220535"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">382</int>
+                                               <reference key="object" ref="578918346"/>
+                                               <reference key="parent" ref="628918607"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">383</int>
+                                               <reference key="object" ref="481026540"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="1004728512"/>
+                                               </object>
+                                               <reference key="parent" ref="569220535"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">384</int>
+                                               <reference key="object" ref="1004728512"/>
+                                               <reference key="parent" ref="481026540"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">387</int>
+                                               <reference key="object" ref="727392839"/>
+                                               <reference key="parent" ref="1049"/>
+                                       </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.IBEditorWindowLastContentRect</string>
+                                       <string>106.IBPluginDependency</string>
+                                       <string>106.ImportedFromIB2</string>
+                                       <string>106.editorWindowContentRectSynchronizationRect</string>
+                                       <string>111.IBPluginDependency</string>
+                                       <string>111.ImportedFromIB2</string>
+                                       <string>129.IBPluginDependency</string>
+                                       <string>129.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>143.IBPluginDependency</string>
+                                       <string>143.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>373.IBPluginDependency</string>
+                                       <string>375.IBEditorWindowLastContentRect</string>
+                                       <string>375.IBPluginDependency</string>
+                                       <string>375.IBWindowTemplateEditedContentRect</string>
+                                       <string>375.NSWindowTemplate.visibleAtLaunch</string>
+                                       <string>375.windowTemplate.hasMaxSize</string>
+                                       <string>375.windowTemplate.hasMinSize</string>
+                                       <string>375.windowTemplate.maxSize</string>
+                                       <string>375.windowTemplate.minSize</string>
+                                       <string>376.IBPluginDependency</string>
+                                       <string>377.IBPluginDependency</string>
+                                       <string>378.IBPluginDependency</string>
+                                       <string>379.IBPluginDependency</string>
+                                       <string>380.IBPluginDependency</string>
+                                       <string>381.IBPluginDependency</string>
+                                       <string>382.IBPluginDependency</string>
+                                       <string>383.IBPluginDependency</string>
+                                       <string>384.IBPluginDependency</string>
+                                       <string>56.IBPluginDependency</string>
+                                       <string>56.ImportedFromIB2</string>
+                                       <string>57.IBEditorWindowLastContentRect</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>{{106, 930}, {180, 23}}</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>{{596, 852}, {216, 23}}</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>{{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>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>{{0, 953}, {167, 20}}</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>{74, 862}</string>
+                                       <string>{{11, 836}, {478, 20}}</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>{{534, 588}, {372, 83}}</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>{{534, 588}, {372, 83}}</string>
+                                       <integer value="0"/>
+                                       <integer value="1" id="5"/>
+                                       <reference ref="5"/>
+                                       <string>{100000, 83}</string>
+                                       <string>{372, 83}</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>{{12, 770}, {209, 183}}</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <reference ref="9"/>
+                                       <string>{{23, 794}, {245, 183}}</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">391</int>
+               </object>
+               <object class="IBClassDescriber" key="IBDocument.Classes">
+                       <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                               <object class="IBPartialClassDescription">
+                                       <string key="className">PostTunesAppDelegate</string>
+                                       <string key="superclassName">NSObject</string>
+                                       <object class="NSMutableDictionary" key="outlets">
+                                               <string key="NS.key.0">preferencesWindow</string>
+                                               <string key="NS.object.0">id</string>
+                                       </object>
+                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
+                                               <string key="majorKey">IBProjectSource</string>
+                                               <string key="minorKey">PostTunesAppDelegate.py</string>
+                                       </object>
+                               </object>
+                       </object>
+               </object>
+               <int key="IBDocument.localizationMode">0</int>
+               <string key="IBDocument.LastKnownRelativeProjectPath">../PostTunes.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..8b7cfac
--- /dev/null
@@ -0,0 +1,32 @@
+<?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>LSUIElement</key>
+       <true/>
+       <key>CFBundleDevelopmentRegion</key>
+       <string>English</string>
+       <key>CFBundleExecutable</key>
+       <string>${EXECUTABLE_NAME}</string>
+       <key>CFBundleIconFile</key>
+       <string></string>
+       <key>CFBundleIdentifier</key>
+       <string>com.ithinksw.posttunes</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>MainMenu</string>
+       <key>NSPrincipalClass</key>
+       <string>NSApplication</string>
+</dict>
+</plist>
diff --git a/PostTunes.xcodeproj/project.pbxproj b/PostTunes.xcodeproj/project.pbxproj
new file mode 100644 (file)
index 0000000..0ba341d
--- /dev/null
@@ -0,0 +1,287 @@
+// !$*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 /* PostTunesAppDelegate.py in Resources */ = {isa = PBXBuildFile; fileRef = 7790198E0C07548A00326F66 /* PostTunesAppDelegate.py */; };
+               77C8C1F90C07829500965286 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 77C8C1F70C07829500965286 /* MainMenu.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 */; };
+/* 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>"; };
+               13E42FB307B3F0F600E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.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 /* PostTunes_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PostTunes_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 /* PostTunesAppDelegate.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = PostTunesAppDelegate.py; sourceTree = "<group>"; };
+               77C8C1F80C07829500965286 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = "<group>"; };
+               8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+               8D1107320486CEB800E47090 /* PostTunes.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PostTunes.app; sourceTree = BUILT_PRODUCTS_DIR; };
+/* 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 = (
+                               7790198E0C07548A00326F66 /* PostTunesAppDelegate.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 */,
+                               13E42FB307B3F0F600E4EEF1 /* CoreData.framework */,
+                               29B97325FDCFA39411CA2CEA /* Foundation.framework */,
+                       );
+                       name = "Other Frameworks";
+                       sourceTree = "<group>";
+               };
+               19C28FACFE9D520D11CA2CBB /* Products */ = {
+                       isa = PBXGroup;
+                       children = (
+                               8D1107320486CEB800E47090 /* PostTunes.app */,
+                       );
+                       name = Products;
+                       sourceTree = "<group>";
+               };
+               29B97314FDCFA39411CA2CEA /* PostTunes */ = {
+                       isa = PBXGroup;
+                       children = (
+                               080E96DDFE201D6D7F000001 /* Classes */,
+                               29B97315FDCFA39411CA2CEA /* Other Sources */,
+                               29B97317FDCFA39411CA2CEA /* Resources */,
+                               29B97323FDCFA39411CA2CEA /* Frameworks */,
+                               19C28FACFE9D520D11CA2CBB /* Products */,
+                       );
+                       name = PostTunes;
+                       sourceTree = "<group>";
+               };
+               29B97315FDCFA39411CA2CEA /* Other Sources */ = {
+                       isa = PBXGroup;
+                       children = (
+                               32CA4F630368D1EE00C91783 /* PostTunes_Prefix.pch */,
+                               29B97316FDCFA39411CA2CEA /* main.m */,
+                               77631A3E0C0748CF005415CB /* main.py */,
+                       );
+                       name = "Other Sources";
+                       sourceTree = "<group>";
+               };
+               29B97317FDCFA39411CA2CEA /* Resources */ = {
+                       isa = PBXGroup;
+                       children = (
+                               77C8C1F70C07829500965286 /* MainMenu.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 /* PostTunes */ = {
+                       isa = PBXNativeTarget;
+                       buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "PostTunes" */;
+                       buildPhases = (
+                               8D1107290486CEB800E47090 /* Resources */,
+                               8D11072C0486CEB800E47090 /* Sources */,
+                               8D11072E0486CEB800E47090 /* Frameworks */,
+                       );
+                       buildRules = (
+                       );
+                       dependencies = (
+                       );
+                       name = PostTunes;
+                       productInstallPath = "$(HOME)/Applications";
+                       productName = PostTunes;
+                       productReference = 8D1107320486CEB800E47090 /* PostTunes.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 "PostTunes" */;
+                       compatibilityVersion = "Xcode 3.0";
+                       hasScannedForEncodings = 1;
+                       mainGroup = 29B97314FDCFA39411CA2CEA /* PostTunes */;
+                       projectDirPath = "";
+                       projectRoot = "";
+                       targets = (
+                               8D1107260486CEB800E47090 /* PostTunes */,
+                       );
+               };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+               8D1107290486CEB800E47090 /* Resources */ = {
+                       isa = PBXResourcesBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */,
+                               77631A3F0C0748CF005415CB /* main.py in Resources */,
+                               7790198F0C07548A00326F66 /* PostTunesAppDelegate.py in Resources */,
+                               77C8C1F90C07829500965286 /* MainMenu.xib 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 /* MainMenu.xib */ = {
+                       isa = PBXVariantGroup;
+                       children = (
+                               77C8C1F80C07829500965286 /* English */,
+                       );
+                       name = MainMenu.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 = PostTunes_Prefix.pch;
+                               INFOPLIST_FILE = Info.plist;
+                               INSTALL_PATH = "$(HOME)/Applications";
+                               PRODUCT_NAME = PostTunes;
+                               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 = PostTunes_Prefix.pch;
+                               INFOPLIST_FILE = Info.plist;
+                               INSTALL_PATH = "$(HOME)/Applications";
+                               PRODUCT_NAME = PostTunes;
+                               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 "PostTunes" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               C01FCF4B08A954540054247B /* Debug */,
+                               C01FCF4C08A954540054247B /* Release */,
+                       );
+                       defaultConfigurationIsVisible = 0;
+                       defaultConfigurationName = Release;
+               };
+               C01FCF4E08A954540054247B /* Build configuration list for PBXProject "PostTunes" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               C01FCF4F08A954540054247B /* Debug */,
+                               C01FCF5008A954540054247B /* Release */,
+                       );
+                       defaultConfigurationIsVisible = 0;
+                       defaultConfigurationName = Release;
+               };
+/* End XCConfigurationList section */
+       };
+       rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
+}
diff --git a/PostTunesAppDelegate.py b/PostTunesAppDelegate.py
new file mode 100644 (file)
index 0000000..86dd7c6
--- /dev/null
@@ -0,0 +1,96 @@
+#
+#  PostTunesAppDelegate.py
+#  PostTunes
+#
+#  Created by Joseph Spiros on 3/5/09.
+#  Copyright iThink Software 2009. All rights reserved.
+#
+
+import objc
+from urllib import urlencode
+from urllib2 import urlopen, URLError
+from base64 import b64encode
+from Foundation import *
+from AppKit import *
+from ScriptingBridge import *
+
+class PostTunesAppDelegate(NSObject):
+       preferencesWindow = objc.IBOutlet()
+       warnPreferences = objc.ivar(u"warnPreferences")
+       warnFailure = objc.ivar(u"warnFailure")
+       lastPersistentID = objc.ivar(u"lastPersistentID")
+       handlerURL = objc.ivar(u"handlerURL")
+       secretKey = objc.ivar(u"secretKey")
+       
+       def init(self):
+               self = super(PostTunesAppDelegate, self).init()
+               if not self:
+                       return None
+               self.warnPreferences = True
+               self.warnFailure = True
+               self.lastPersistentID = None
+               self.handlerURL = None
+               self.secretKey = None
+               self.observeNote()
+               return self
+       
+       def observeNote(self):
+               NSDistributedNotificationCenter.defaultCenter().addObserver_selector_name_object_(self, "gotNotification:", "com.apple.iTunes.playerInfo", None)
+       
+       def gotNotification_(self, notification):
+               self.handlerURL = NSUserDefaults.standardUserDefaults().stringForKey_("handlerURL")
+               self.secretKey = NSUserDefaults.standardUserDefaults().stringForKey_("secretKey")
+               if notification:
+                       noteInfo = notification.userInfo()
+                       playerState = noteInfo["Player State"]
+                       if "PersistentID" in noteInfo:
+                               persistentID = noteInfo["PersistentID"]
+                               if (persistentID != self.lastPersistentID) and ("Name" in noteInfo):
+                                       if playerState == "Playing":
+                                               if self.handlerURL:
+                                                       # started playing a new track
+                                                       # get the applescript track and make sure it's the same (compare name)
+                                                       iTunes = SBApplication.applicationWithBundleIdentifier_("com.apple.iTunes")
+                                                       iTunesTrack = iTunes.currentTrack()
+                                                       if iTunesTrack.name() == noteInfo["Name"]:
+                                                               self.trackChanged_iTunesTrack_(noteInfo, iTunesTrack)
+                                                               self.lastPersistentID = persistentID
+                                               else:
+                                                       NSLog(u"Track Not Posted: You have not provided PostTunes with the Handler URL to use.")
+                                                       if self.warnPreferences:
+                                                               alert = NSAlert.alertWithMessageText_defaultButton_alternateButton_otherButton_informativeTextWithFormat_("Track Not Posted", "Open PostTunes Preferences", "Ignore", None, u"You have not provided PostTunes with the Handler URL to use.")
+                                                               if alert.runModal() == NSAlertDefaultReturn:
+                                                                       self.preferencesWindow.makeKeyAndOrderFront_(self)
+                                                               elif alert.runModal() == NSAlertAlternateReturn:
+                                                                       self.warnPreferences = False
+                                                               
+                       else:
+                               self.lastPersistentID = None
+                               # stopped playing
+       
+       def trackChanged_iTunesTrack_(self, noteInfo, iTunesTrack):
+               trackData = {"title": noteInfo["Name"]}
+               if self.secretKey:
+                       trackData["key"] = self.secretKey
+               if "Artist" in noteInfo:
+                       trackData["artist"] = noteInfo["Artist"]
+               if "Album" in noteInfo:
+                       trackData["album"] = noteInfo["Album"]
+               if "Store URL" in noteInfo:
+                       trackData["url"] = noteInfo["Store URL"]
+               iTunesArtworks = iTunesTrack.artworks()
+               if len(iTunesArtworks) >= 1:
+                       artwork = iTunesArtworks[0]
+                       artworkTIFF = artwork.data().TIFFRepresentation()
+                       artworkPNG = NSBitmapImageRep.imageRepWithData_(artworkTIFF).representationUsingType_properties_(NSPNGFileType, None)
+                       trackData["artpng"] = b64encode(artworkPNG.bytes())
+               try:
+                       urlopen(self.handlerURL, urlencode(trackData))
+               except URLError:
+                       NSLog(u"PostTunes encountered an error when attempting to submit a track to: %s" % self.handlerURL)
+                       if self.warnFailure:
+                               alert = NSAlert.alertWithMessageText_defaultButton_alternateButton_otherButton_informativeTextWithFormat_("Track Not Posted", "Open PostTunes Preferences", "Ignore", None, (u"PostTunes encountered an error when attempting to submit a track to:\n%s" % self.handlerURL))
+                               if alert.runModal() == NSAlertDefaultReturn:
+                                       self.preferencesWindow.makeKeyAndOrderFront_(self)
+                               elif alert.runModal() == NSAlertAlternateReturn:
+                                       self.warnFailure = False
diff --git a/PostTunes_Prefix.pch b/PostTunes_Prefix.pch
new file mode 100644 (file)
index 0000000..17f0265
--- /dev/null
@@ -0,0 +1,7 @@
+//
+// Prefix header for all source files of the 'PostTunes' target in the 'PostTunes' project
+//
+
+#ifdef __OBJC__
+    #import <Cocoa/Cocoa.h>
+#endif
diff --git a/main.m b/main.m
new file mode 100644 (file)
index 0000000..20781c6
--- /dev/null
+++ b/main.m
@@ -0,0 +1,49 @@
+//
+//  main.m
+//  PostTunes
+//
+//  Created by Joseph Spiros on 3/5/09.
+//  Copyright iThink Software 2009. All rights reserved.
+//
+
+#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..b934753
--- /dev/null
+++ b/main.py
@@ -0,0 +1,20 @@
+#
+#  main.py
+#  PostTunes
+#
+#  Created by Joseph Spiros on 3/5/09.
+#  Copyright iThink Software 2009. All rights reserved.
+#
+
+#import modules required by application
+import objc
+import Foundation
+import AppKit
+
+from PyObjCTools import AppHelper
+
+# import modules containing classes required to start application and load MainMenu.nib
+import PostTunesAppDelegate
+
+# pass control to AppKit
+AppHelper.runEventLoop()