åãããid:hakobe932ãããPlaggerã使ã£ã¦ãã³ãã³åç»ãPodcastã«ãã¦ããã®ã*1ãããã¾ããã£ã¦ããã®ã§ããããã¡ã®ãµã¼ãã¼ã«Plaggerãå
¥ããªãã£ãã®ã§ãRubyã§ä¸ããä½ãã¾ããã
æè¿Gitãæµè¡ã£ã¦ãã®ã§ãGitHubã«ç½®ãã¾ããã
ç¹å¾´
- Plaggerãè¦ããªãã®ã§å°å ¥ãç°¡å
- ã©ã¤ãã©ãªãç¶æ¿ãã¦ããã«è¨å®ãæ¸ãã®ã§ãPlaggerã®ãããªãããããè¨å®ãã¡ã¤ã«ãä¸è¦
- ã©ã¤ãã©ãªãç¶æ¿ãã¦ãªãã¸ã§ã¯ããä½ãã°åæã«åãã®ã§ã誰ã§ãç°¡åã«ä½¿ãã
使ãæ¹
Plaggerã§ã§ãããã¨ãªã®ã§ãããããããã使ã人ã¯å±
ãªãã ããã¨æã£ãã®ã§ããã¾ãæ¸ãã¦ãã¾ãããããªãã¸ããªã®READMEã«æ¸ãã¾ããã
å®éã¯ã¿ã¤ãã«ãæ´å½¢ãããã¸ã£ã³ã«ãã¤ãããããã®ã§ããããããã¤ãªã¹ããåã£ã¦ãã¦Podcastã«ããã ããªãã以ä¸ã®ãããªã¹ã¯ãªãããæ¸ãã ãã§åãã¾ãã
#! /usr/bin/env ruby require 'lib/crawler.rb' class MyCrawler < Crawler def collect_input_data @account_setting_file = 'account.yaml' @input_feed_url = 'http://www.nicovideo.jp/mylist/hogehogeho?rss=2.0' @output_feed_path = '~/public_html/podcast/hoge.xml' @output_file_path = '~/public_html/podcast/enclosure' @output_file_url = 'http://hogehoge.com/~user/podcast/enclosure' @input_file_type = 'flv' @output_file_type = 'mp3' @ffmpeg_option = '-acodec copy' end end MyCrawler.new
ãã£ã¦ããã¨
- ãã¤ãªã¹ãã®ãã£ã¼ããèªãã§åç»ã®IDãæãåºã
- ãã¼ã«ã«ã«ãã¡ã¤ã«ããªããã°flvããã¦ã³ãã¼ããå¤æãã
- åºåç¨ã®ãã£ã¼ããä½ã£ã¦ããã¤ãªã¹ãããè¦ç´ ã移æ¤ãã
- ãã®ã¨ãã«ã2.ã§è½ã¨ããenclosureããã£ã¤ãã
- å¤ããè¦ããå ´æã«ç½®ãã¦å®æ
ç°¡åã§ããã
ä»å¾ã®äºå®
mp3ã«ããã®ã¯ã§ããããåç»ãçæããã®ã¯ffmpegã®ãªãã·ã§ã³ãåãããªãã¦ã¾ã 試ãã¦ããªãã®ã§ã試ã- ã¢ã¼ãã¯ã¼ã¯ãã¤ããã
- ã©ã¸ãªã®å ´åãã¢ãããã¼ããã人ã«ãã£ã¦ã¿ã¤ãã«ã®ä»ãæ¹ãéãåé¡ãã©ã解決ããã
- ã½ã¼ã¹ã³ã¼ããã¾ã¨ãã«ãã
- åç»ï¼ã¤ãï¼ã¤ã®ãªãã¸ã§ã¯ãã«
*1:[http://d.hatena.ne.jp/hakobe932/20070923/1190594172:title]