6
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

peco-nico-bgm

Last updated at Posted at 2014-06-30

percolを使ってコマンドラインから出ずに聞きたいジャンルの作業用BGMを検索して再生する - Qiita
をシンプルにして、検索して選択したものをブラウザで開くだけにしてみました。

peco-nico-bgm
#!/bin/sh

TAG="作業用BGM"

if [ -n "$*" ] ; then
  TAG="${TAG} $*"
fi

URLS=$(ruby -r rss -r uri -e "RSS::Parser.parse(\"http://www.nicovideo.jp/tag/\" + URI.encode(\"$TAG\") + \"?rss=2.0\").channel.items.each {|item| puts item.link + \"\t\" + item.title}" | peco | awk '{print $1}')

if [ -n "$URLS" ] ; then
  open $URLS
fi
6
7
3

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?