hitode909の日記

以前はプログラミング日記でしたが、今は子育て日記です

gem cui8tracks

8tracksプレイヤー,だいぶ前に作ったから,ただのスクリプトで不便だったのを,gemにした.バグもいくつか直した.


実行するとこういう感じ.mplayerで再生される.

% cui8tracks --tag jazz
             _  ___  _                  _
            (_)/ _ \| |                | |
   ___ _   _ _| (_) | |_ _ __ __ _  ___| | _____
  / __| | | | |> _ <| __| '__/ _` |/ __| |/ / __|
 | (__| |_| | | (_) | |_| | | (_| | (__|   <\__ \
  \___|\__,_|_|\___/ \__|_|  \__,_|\___|_|\_\___/

> I, [2011-10-17T18:17:34.525323 #11983]  INFO -- : Playing mix 1 / 9046
I, [2011-10-17T18:17:34.525453 #11983]  INFO -- : CUI8Tracks::Mix::name = The Last Dance
I, [2011-10-17T18:17:34.525497 #11983]  INFO -- : CUI8Tracks::Mix::description = (Once again,) I wish I had lived in the 40's.
I, [2011-10-17T18:17:34.525596 #11983]  INFO -- : CUI8Tracks::Mix::user = murmuris
I, [2011-10-17T18:17:34.525674 #11983]  INFO -- : CUI8Tracks::Mix::tag_list_cache = 50's, jazz, 40's
I, [2011-10-17T18:17:34.525735 #11983]  INFO -- : CUI8Tracks::Mix::restful_url = http://8tracks.com/mixes/407659
I, [2011-10-17T18:17:34.525798 #11983]  INFO -- : CUI8Tracks::Mix::plays_count = 10957
I, [2011-10-17T18:17:34.525859 #11983]  INFO -- : CUI8Tracks::Mix::liked_by_current_user = false
I, [2011-10-17T18:17:36.114856 #11983]  INFO -- : Playing track
I, [2011-10-17T18:17:36.114952 #11983]  INFO -- : CUI8Tracks::Track::performer = Mama Cass
I, [2011-10-17T18:17:36.114994 #11983]  INFO -- : CUI8Tracks::Track::name = Dream a little dream of me
I, [2011-10-17T18:17:36.115032 #11983]  INFO -- : CUI8Tracks::Track::release_name = Universal Masters Collection: Classic
I, [2011-10-17T18:17:36.115083 #11983]  INFO -- : CUI8Tracks::Track::year = 1999
I, [2011-10-17T18:17:36.115159 #11983]  INFO -- : CUI8Tracks::Track::url = http://8tracks.s3.amazonaws.com/tf/004/427/800/68538.48k.v2.m4a
I, [2011-10-17T18:17:36.115213 #11983]  INFO -- : CUI8Tracks::Track::faved_by_current_user = false
I, [2011-10-17T18:17:36.118870 #11983]  INFO -- : downloading http://8tracks.s3.amazonaws.com/tf/004/427/800/68538.48k.v2.m4a


テストもドキュメントもないけどヘルプはある.

% cui8tracks --help
             _  ___  _                  _
            (_)/ _ \| |                | |
   ___ _   _ _| (_) | |_ _ __ __ _  ___| | _____
  / __| | | | |> _ <| __| '__/ _` |/ __| |/ / __|
 | (__| |_| | | (_) | |_| | | (_| | (__|   <\__ \
  \___|\__,_|_|\___/ \__|_|  \__,_|\___|_|\_\___/

Usage: cui8tracks [options]
    -q, --query QUERY
    -t, --tag TAG
    -u, --user USER
    -s, --sort SORT                  [recent|hot|popular|random]
        --no-play                    don't play tracks
        --play_from FROM             play from [FROM]th mix
        --verbose                    print mplayer output
        --debug                      debug-mode


gemでインストールできる.

gem install cui8tracks


ソースコードはGitHubにある.
https://github.com/hitode909/cui8tracks/