recpod
#!/usr/bin/perl my $PATH='/home/global/Sound/CDs/Podcasts'; my $url=strfdate($ARGV[0]); print qx(cd "$PATH"; wget -nc -q "$url"); sub strfdate { # 0 1 2 3 4 5 6 @a=('Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag','Sonntag'); @b=('','Jänner','Februar','März','April','Mai','Juni','Juli','August','September','Oktober','November','Dezember'); my($r,$t,$o)=@_; $t||=time(); $o*=86400; my($S,$M,$H,$d,$m,$y,$w,$j)=localtime($t+$o); $m++; $w=($w+6)%7; $r=~s/%R/%H:%M/g; $r=~s/%T/%H:%M:%S/g; $r=~s/%X/%H:%M:%S/g; $r=~s/%F/%Y-%m-%d/g; $r=~s/%x/%Y-%m-%d/g; $r=~s/%a/i18n(substr($a[$w],0,2))/ge; $r=~s/%A/i18n( $a[$w] )/ge; $r=~s/%b/i18n(substr($b[$m],0,3))/ge; $r=~s/%B/i18n( $b[$m] )/ge; $r=~s/%Y/sprintf("%04d",$y+1900);/ge; $r=~s/%y/sprintf("%02d",$y% 100);/ge; $r=~s/%V/sprintf("%02d",weekOfYear($y+1900,$m,$d));/ge; $r=~s/%j/sprintf("%02d",$j);/ge; $r=~s/%m/sprintf("%02d",$m);/ge; $r=~s/%d/sprintf("%02d",$d);/ge; $r=~s/%e/sprintf("%2d" ,$d);/ge; $r=~s/%H/sprintf("%02d",$H);/ge; $r=~s/%k/sprintf("%2d", $H);/ge; $r=~s/%M/sprintf("%02d",$M);/ge; $r=~s/%S/sprintf("%02d",$S);/ge; return $r; }
ORF-Podcast download(1.2kB)
Download