Permalink
Browse files

add animatetv.zsh

add onsen.sh (old)
modify README
  • Loading branch information...
unot committed Apr 24, 2011
1 parent 3b4cc4a commit 27db3dd43bcd0d2ec10fb9b0d156c3d901560b02
Showing with 56 additions and 1 deletion.
  1. +1 −1 README
  2. +16 −0 animatetv.zsh
  3. +39 −0 onsen.sh
View
2 README
@@ -1 +1 @@
-This is web radio recording tools for animate.tv, onsen and hibiki
+Those are web radio recording tools for animate.tv, onsen and hibiki
View
@@ -0,0 +1,16 @@
+#!/bin/zsh
+if [ $# = 1 ]; then
+ URL=$1
+ TITLE=`wget -q -O - $URL | perl -nle 'm|<Entry><Title>(.*)</Title>|; print $1' | nkf -w`
+# DATE=`wget -q -O - $URL | nkf -w | tr -d '\015' | sed -n 's|<Title>\(.*\)</Title>|\1|p' | sed -e 's|/|-|g' | sed -n '2p' | tr -d ' '`
+# ASXMMS=`wget -q -O - $URL | nkf -w | grep wma`
+ MMS=`wget -q -O - $URL | perl -nle 'm|(mms.*wma)|; print $1'`
+ mimms ${MMS} "${TITLE}.wma"
+# echo ${MMS}
+# echo "${TITLE}(${DATE}).wma"
+# : >"${TITLE}(${DATE}).wma"
+# mv `basename $MMS` "${TITLE}(${DATE}).wma"
+else
+ echo "usage: $0 http://www.animate.tv/asx/hogehoge.asx"
+fi
+
View
@@ -0,0 +1,39 @@
+#!/bin/sh
+# onsen.sh Ver. 0.6 (2009.10.16)
+
+GOTDATE=`date +%y%m%d`
+TFLAG=FALSE
+TITLE=
+OPT=
+while getopts tyd: OPT
+do
+ case $OPT in
+ t) TFLAG=TRUE
+ ;;
+ y) GOTDATE=`TZ=JST+15 date +%y%m%d`
+ ;;
+ d) GOTDATE=$OPTARG
+ ;;
+ \?) echo "Usage: $0 [-ty] hoge" 1>&2
+ exit 1
+ ;;
+ esac
+done
+shift `expr $OPTIND - 1`
+
+if [ $# -eq 1 ]; then
+ #cd $HOME
+ STR=$1
+ URL=http://onsen.ag/asx/${STR}${GOTDATE}.asx
+ MMS=`wget -q -O - $URL | grep $STR | awk '{gsub(/"/,"",$4);print $4;}'`
+ if [ $TFLAG = "TRUE" ]; then
+ TITLE=`wget -q -O - $URL | nkf -w | sed -n 's/<TITLE>\(.*\)<\/TITLE>/\1/p' | sed -e 's|/|-|g' | tr -d "\r" | tail -n 1`.wmv
+ echo "$URL"
+ echo "$MMS"
+ echo "$TITLE"
+ fi
+ mimms $MMS ${TITLE:+"$TITLE"}
+else
+ echo "Usage: $0 [-ty] [-d yymmdd] hoge" 1>&2
+fi
+

0 comments on commit 27db3dd

Please sign in to comment.