lundi 3 mai 2010

NHK Radio News podcast script!

NHK Radio News in japanese, what the hell?
Like many japanese "salaryman", I love to listen to daily NHK news on my way to work!
As many of you knows, the NHK news agency in Japan does not provide daily radio news podcast in Japanese. The only podcasts you will be able to find will be about some Japanese lessons in many language but nothing about daily updated news in japanese. This is simply due to some obscure copyright issues in Japan. The only availlable Radio news stream will be accessible on these links:
http://www.nhk.or.jp/r-news/  and they aren't really helpful with a simple iPod or Mp3 player.


What is the purpose of this tutorial? 
Being able to listen to the NHK radio daily  news everyday on my iPod Classic.


How?
I developped some shell scripts that works under Linux Ubuntu 9.10 that actually catch these streams everyday (from http://www.nhk.or.jp/r-news/) using crontab and convert them into MP3 files. So these are the main steps of my script:
  1. Crontab launches the main script witch records daily NHK Radio News streams in .wav
  2. Convert them into .mp3 files
  3. Update a podcast RSS file descriptor called nhkpodcast.xml
  4. Synchronize with a podcast client (in my case gpodder) the generated files with my iPod Classic and enjoy!
 I'm getting bored...give me the files!
The files are available here ( http://sourceforge.net/projects/nhkpodcast/ )

How do I use them?
First of all, you need to have these following tools under linux( preferably Ubuntu +9.10);
  • crontab
  • lame
  • mplayer
  • mp3info
  • ncftp(for remote hosting)
  • xampp(recommended) or apache for hosting sounds files and the RSS xml descriptor file locally.
  • gpodder for synchronizing your mp3 player with your laptop. 
Note: for ubuntu/debian use the following command to install them all at once:
$>sudo apt-get install lame mplayer mp3info ncftp xampp gpodder
 
Once you've downloaded and extract the tarball, you can launch directly the main script through this command:
$> sh nhkpod.sh 1 
There are currently 2 options available: 
  • 1: host all the audio files (.mp3) on your local server (localhost) machine using apache/xampp or whatever..
  • 2: host all the audio files (.mp3) and the RSS file descriptor (nhkRss.xml) on a remote FTP server..
Remote FTP hosting:
If you want to host your files on a remote ftp server, you have to edit some script and replace these string:
  • yourftpserveraddress
  • yourftplogin
  • yourftppwd



 
     

    3 commentaires:

    Hironori a dit…

    Hy all!

    No needs to bother installing these scripts on your Ubuntu or whatever Linux anymore!
    Indded, NHK has finally officialy released there japanese news podacast! You can find them on there japanese homepage and Itunes!

    My solution was a bit "heavy" but anyway it was a funny developement!

    Cheers to all!
    Hironori

    Anonyme a dit…

    link please? I cannot find their news podcast in Japanese... been looking for months ;(

    thanks in adv,
    J

    Hironori a dit…

    Hi!

    Sorry for the late response!
    Anyway those are thelink in case you haven't found them!

    http://www.nhk.or.jp/r-news/podcast.html

    The rss fileused for itunes:

    http://www.nhk.or.jp/r-news/podcast/nhkradionews.xml


    Cheers!
    Hironori