浏览代码

Initial commit

Thomas Buck 11 年前
当前提交
8a44d7d8cf
共有 9 个文件被更改,包括 30 次插入0 次删除
  1. 1
    0
      .gitignore
  2. 二进制
      PlayPauseiTunesInstacastVLC.scpt
  3. 二进制
      RunAnApp.scpt
  4. 二进制
      SongArtist.scpt
  5. 二进制
      SongLength.scpt
  6. 二进制
      SongLengthRemaining.scpt
  7. 二进制
      SongLyrics.scpt
  8. 二进制
      SongName.scpt
  9. 29
    0
      trackchange.sh

+ 1
- 0
.gitignore 查看文件

@@ -0,0 +1 @@
1
+.DS_Store

二进制
PlayPauseiTunesInstacastVLC.scpt 查看文件


二进制
RunAnApp.scpt 查看文件


二进制
SongArtist.scpt 查看文件


二进制
SongLength.scpt 查看文件


二进制
SongLengthRemaining.scpt 查看文件


二进制
SongLyrics.scpt 查看文件


二进制
SongName.scpt 查看文件


+ 29
- 0
trackchange.sh 查看文件

@@ -0,0 +1,29 @@
1
+#!/bin/sh
2
+
3
+lasttrack=`cat /Users/thomas/.lasttrack`
4
+host=`hostname`
5
+datum=`date`
6
+
7
+if [ "$1" != "$lasttrack" ]; then
8
+    if [ "$1" != "" ]; then
9
+        echo "<html><head><meta charset=\"utf-8\" /><title>xythobuz listened to...</title></head><body><pre>" > /Users/thomas/.tmpfile
10
+        echo "Last song played on <b>${host}</b>'s iTunes:" >> /Users/thomas/.tmpfile
11
+        echo >> /Users/thomas/.tmpfile
12
+        echo "  <b>$1</b>" >> /Users/thomas/.tmpfile
13
+        echo "by" >> /Users/thomas/.tmpfile
14
+        echo "  <b>$2</b>" >> /Users/thomas/.tmpfile
15
+        echo "on the Album" >> /Users/thomas/.tmpfile
16
+        echo "  <b>$3</b>" >> /Users/thomas/.tmpfile
17
+        echo "at" >> /Users/thomas/.tmpfile
18
+        echo "  <i>${datum}</i>" >> /Users/thomas/.tmpfile
19
+        echo >> /Users/thomas/.tmpfile
20
+        echo "Last songs played:" >> /Users/thomas/.tmpfile
21
+        cat /Users/thomas/.trackhistory >> /Users/thomas/.tmpfile
22
+        echo "</pre><p><a href="http://xythobuz.de">Return...</a></p></body></html>" >> /Users/thomas/.tmpfile
23
+
24
+        scp /Users/thomas/.tmpfile zaphod:/var/www/lastmusic
25
+        echo $1 > /Users/thomas/.lasttrack
26
+        echo "<b>$1</b> by <b>$2</b> on <b>$3</b> at <i>${datum}</i>" >> /Users/thomas/.trackhistory
27
+        tail -n 3 /Users/thomas/.trackhistory | tee /Users/thomas/.trackhistory
28
+    fi
29
+fi

正在加载...
取消
保存