Giter Site home page Giter Site logo

radish's Introduction

radip.sh

NHKラジオ / radiko / ListenRadio / 渋谷のラジオ で現在配信中の番組を再生するシェルスクリプトです。

フォーク元

うる。 (@uru_2) さんの radi.sh

ライセンス

MIT License

必要パッケージをインストール

macOS:
brew install ffmpeg jq
Linux:
sudo apt install -y curl ffmpeg jq libxml2-utils

スクリプトをダウンロード

macOS:
curl -LJO https://raw.githubusercontent.com/jeidii/radish/master/radip.sh
Linux:
wget https://raw.githubusercontent.com/jeidii/radish/master/radip.sh

使い方

sh radip.sh [options]
引数 必須 説明 備考
-t SITE TYPE 再生対象サイト nhk: NHKラジオ
radiko: radiko
lisradi: ListenRadio
shiburadi: 渋谷のラジオ
-s STATION ID 放送局ID -l オプションで表示されるID
渋谷のラジオは指定不要
-i MAIL ラジコプレミアム ログインメールアドレス 環境変数 RADIKO_MAIL でも指定可能
-p PASSWORD ラジコプレミアム ログインパスワード 環境変数 RADIKO_PASSWORD でも指定可能
-l 放送局ID/名称表示 結果は300行以上になります、また取得は(割と)重いです

実行例

放送局ID/名称表示
sh radip.sh -l
NHKラジオ
sh radip.sh -t nhk -s tokyo-fm
radikoエリア内の局
sh radip.sh -t radiko -s LFR
radikoエリア外の局 (ラジコプレミアム)
sh radip.sh -t radiko -s HBC -i "メールアドレス" -p "パスワード"
radikoエリア外の局 (ラジコプレミアム, 環境変数からログイン情報設定)
export RADIKO_MAIL="メールアドレス"
export RADIKO_PASSWORD="パスワード"
sh radip.sh -t radiko -s HBC
ListenRadio
sh radip.sh -t lisradi -s 30058
渋谷のラジオ
sh radip.sh -t shiburadi

プロセス操作

ctrl+Z          # プロセスを一時停止
  jobs          # プロセスの管理状態を表示
    fg          # プロセスをフォアグランドで再開
    bg          # プロセスをバックグラウンドで再開

ctrl+C          # フォアグランドのプロセスを強制停止
killall ffplay  # プロセスを強制終了

注意点

再生手法については2019/5/25時点での調査結果であり、対象サイトの仕様変更等で利用できなくなる可能性もありますのであらかじめご了承ください。

動作確認環境

macOS 12.4

Linux

  • Ubuntu 22.04
  • WSL2 (Windows Subsystem for Linux 2)

radish's People

Contributors

jeidii avatar uru2 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.