]> snippets.scripts.mit.edu Git - Scripts/git/.git/commitdiff
Added sipbmp3 iTunes applescripts
authorKyle Miller <kyle@dhcp-18-111-4-133.dyn.mit.edu>
Sat, 14 Feb 2009 22:03:05 +0000 (17:03 -0500)
committerKyle Miller <kyle@dhcp-18-111-4-133.dyn.mit.edu>
Sat, 14 Feb 2009 22:03:05 +0000 (17:03 -0500)
sipbmp3-itunes/INSTALL [new file with mode: 0644]
sipbmp3-itunes/Send to sipbmp3.scpt [new file with mode: 0644]
sipbmp3-itunes/Send to sipbmp3.source.txt [new file with mode: 0644]

diff --git a/sipbmp3-itunes/INSTALL b/sipbmp3-itunes/INSTALL
new file mode 100644 (file)
index 0000000..52578ba
--- /dev/null
@@ -0,0 +1,50 @@
+-----------------
+iTunes -> sipbmp3
+-----------------
+This is a simple little script which sends
+music from an iTunes library to the sipbmp3
+lpr server.
+
+* Changelog
+9 Jan 2009 -> price added 'quoted form'
+7 Jan 2009 -> kmill created initial version
+
+* System Requirements
+This script will only work under Mac OS X as
+it uses AppleScript.
+
+* Installation
+There are two parts:
+
+1) Launch the Printer Setup Utility and add
+   an IP Printer with the LPD protocol with
+   the following information:
+    Address: zygorthian-space-raiders.mit.edu
+    Queue: sipbmp3
+   It is not necessary to specify the driver.
+
+2) Create the directory ~/Library/iTunes/Scripts
+   and place the "Send to sipbmp3.scpt" file
+   within.
+
+* Usage
+When in iTunes, select the songs which you
+would like to hear in the office, and click
+"Send to sipbmp3" in the script menu from
+the menu bar.  The script menu looks like a
+little scroll icon.  There will be no
+feedback beyond the pleasant sounds you now
+hear around you.
+
+* Todo
+As it is, there is no feedback, even in the
+event of failure.  This is decidedly not
+optimal.
+
+* And so...
+Do whatever you want with it.  I'd like to
+have a copy if you extend it.
+
+Kyle Miller
+kmill@mit.edu
+
diff --git a/sipbmp3-itunes/Send to sipbmp3.scpt b/sipbmp3-itunes/Send to sipbmp3.scpt
new file mode 100644 (file)
index 0000000..a9cca5d
Binary files /dev/null and b/sipbmp3-itunes/Send to sipbmp3.scpt differ
diff --git a/sipbmp3-itunes/Send to sipbmp3.source.txt b/sipbmp3-itunes/Send to sipbmp3.source.txt
new file mode 100644 (file)
index 0000000..ebf6e1f
--- /dev/null
@@ -0,0 +1,49 @@
+-- -----------------
+-- iTunes -> sipbmp3
+-- -----------------
+-- This is a simple little script which sends
+-- music from an iTunes library to the sipbmp3
+-- lpr server.
+--
+-- Changelog:
+--
+-- 9 Jan 2009 -> price added 'quoted form'
+-- 7 Jan 2009 -> kmill created initial version
+--
+-- Installation:
+--
+-- 1) Launch the Printer Setup Utility and add
+--    an IP Printer with the LPD protocol with
+--    the following information:
+--     Address: zygorthian-space-raiders.mit.edu
+--     Queue: sipbmp3
+--    It is not necessary to specify the driver.
+--
+-- 2) Create the directory ~/Library/iTunes/Scripts
+--    and place the "Send to sipbmp3.scpt" file
+--    within.
+--
+-- Usage:
+--
+-- When in iTunes, select the songs which you
+-- would like to hear in the office, and click
+-- "Send to sipbmp3" in the script menu from
+-- the menu bar.  The script menu looks like a
+-- little scroll icon.  There will be no
+-- feedback beyond the pleasant sounds you now
+-- hear around you.
+
+set lista to {}
+
+tell application "iTunes"
+       repeat with t in selection
+               if class of t is (file track) then
+                       set loc to POSIX path of (get location of t)
+                       set end of lista to "lpr -o raw -Psipbmp3 " & (quoted form of loc)
+               end if
+       end repeat
+end tell
+
+repeat with com in lista
+       do shell script com
+end repeat
\ No newline at end of file