turing
V2EX  ›  Node.js

豆瓣电台命令行版 0.0.9 发布

  •  
  •   turing · Jan 13, 2014 · 16848 views
    This topic created in 4684 days ago, the information mentioned may be changed or developed.


    简洁优雅的豆瓣电台命令行版,基于 Node.js

    支持加 ❤ 、更新界面以及 bug 修复

    支持的快捷键:

    [return] - > 播放另一个频道,或者重新播放当前频道 (PLAY)
    [backspace] - > 停止播放当前歌曲或频道 (DELETE)
    [n] - > 本频道列表的下一首歌曲 (NEXT)
    [l] - > 添加到红心列表或者删除红心 (LOVE)
    [g] - > 跳转到当前播放歌曲的专辑页面 (GOTO)
    [q] - > 退出豆瓣电台 (QUIT)

    欢迎 star && fork
    https://github.com/turingou/douban.fm
    Supplement 1  ·  Jan 14, 2014
    0.1.0 版本已发布,支持:

    - PRO 用户的高码率模式播放(默认192kpbs)
    - 修复 bug 若干
    - 添加分享到微博功能(快捷键:s)
    94 replies  •  1970-01-01 08:00:00 +08:00
    pirex
    pirex
    Jan 13, 2014
    1
    赞一个先。
    CRight
    CRight
    Jan 13, 2014 via Android
    2
    可以登录吗?
    turing
    turing
    OP
    Jan 13, 2014
    3
    @CRight 可以设置账户密码后收听私人频道
    Tink
    Tink
    Jan 13, 2014 via Android
    4
    终于跟新了…
    wangfengmadking
    wangfengmadking
    Jan 13, 2014
    5
    great, 终于等到了
    wenLiangcan
    wenLiangcan
    Jan 13, 2014
    6
    o(*^▽^*)o
    nigelvon
    nigelvon
    Jan 13, 2014
    7
    支持高码率么?仅限会员也行。
    MrX
    MrX
    Jan 13, 2014
    8
    Love it!Great!
    chshouyu
    chshouyu
    Jan 13, 2014
    9
    赞一个!
    turing
    turing
    OP
    Jan 13, 2014
    10
    @nigelvon 会员我没折腾过,按道理这是豆瓣来处理的,如果你是会员,它应该会返回高码率的mp3
    mtmzorro
    mtmzorro
    Jan 13, 2014
    11
    赞个 已star
    nigelvon
    nigelvon
    Jan 13, 2014
    12
    @turing 恩,可能还有一个设置码率的api,因为无论是客户端还是web,如果是会员的话会多一个设置码率的选项。
    Imivan
    Imivan
    Jan 13, 2014
    13
    会保存听过的歌曲好评
    isaced
    isaced
    Jan 13, 2014
    14
    赞一个!
    luoluoluo
    luoluoluo
    Jan 13, 2014
    15
    cool, fork.
    wolegequ
    wolegequ
    Jan 13, 2014 via Android
    16
    怒赞
    ksex
    ksex
    Jan 13, 2014
    17
    太酷了 +1
    liluo
    liluo
    Jan 13, 2014
    18
    很棒
    manihome
    manihome
    Jan 13, 2014
    19
    赞一个!
    teehoo
    teehoo
    Jan 13, 2014
    20
    cool
    mactive
    mactive
    Jan 13, 2014
    21
    已star
    哈哈 第一个dependencies 就是 player
    archean
    archean
    Jan 13, 2014
    22
    顶赞啊!
    iYu
    iYu
    Jan 13, 2014
    23
    为啥我的登录不能

    { [Error: ENOENT, open '/Users/xxx/douban.fm/.configs.json']
    errno: 34,
    code: 'ENOENT',
    path: '/Users/xxx/douban.fm/.configs.json' }
    archean
    archean
    Jan 13, 2014
    24
    请问 backspace 后怎么继续播放当前歌曲?
    fsp
    fsp
    Jan 13, 2014
    25
    @nigelvon 好用吗?
    turing
    turing
    OP
    Jan 13, 2014
    26
    @iYu 去提个 issue 吧

    这个可能是写权限问题
    turing
    turing
    OP
    Jan 13, 2014
    27
    @archean 再按 enter 就可以了
    iYu
    iYu
    Jan 13, 2014
    28
    安装时候没有用sudo的结果是 播放时候需要sudo 囧。。。 来提要求了。 关闭可以一个r就好了。 码率不能调节么。 白冲半年会员了。
    turing
    turing
    OP
    Jan 13, 2014
    29
    @iYu 会员的话,试试看在豆瓣电台的设置里默认选上高码率看看,暂时不太清楚这个有没有api
    iYu
    iYu
    Jan 13, 2014
    30
    @turing 刚刚确认了一下 豆瓣电台 设置 一直选择的是 192kbps 然后 也google了一下果然没有API 唉
    turing
    turing
    OP
    Jan 13, 2014
    31
    @iYu 那我充个会员体会一下吧,看能不能折腾出来
    yangxin0
    yangxin0
    Jan 13, 2014
    32
    赞一个, 在这个广告横行的时代,这么干净利索的软件不多了。
    turing
    turing
    OP
    Jan 13, 2014❤️1
    33
    @iYu 我充好了。

    可以拿到 192kbps 的音乐,改个参数就可以了。0.1.0 版本会上线这个功能。
    iYu
    iYu
    Jan 13, 2014
    34
    @turing 再次送出感谢。 效率很高啊。
    itfanr
    itfanr
    Jan 13, 2014
    35
    郭大厉害 赞!!!
    hustlzp
    hustlzp
    Jan 13, 2014
    36
    赞!
    willerce
    willerce
    Jan 13, 2014
    37
    太能折腾了,点赞!
    baocaixiong
    baocaixiong
    Jan 13, 2014
    38
    哇,狂点32个赞哟。
    baocaixiong
    baocaixiong
    Jan 13, 2014
    39
    Douban.fm 0.0.9 Loading 正在加载...
    我这是网络不好吗?
    turing
    turing
    OP
    Jan 13, 2014
    40
    @baocaixiong 豆瓣电台通信失败,我这里也是,等等吧,估计挂了
    turing
    turing
    OP
    Jan 13, 2014
    41
    douban.com/j/app/radio/people 接口通信失败,大家改天再试试看吧~
    Xi
    Xi
    Jan 14, 2014
    42
    用上了,很赞!
    Xi
    Xi
    Jan 14, 2014
    43
    话说没有暂定功能?
    sxd
    sxd
    Jan 14, 2014
    44
    上小众了..
    zhujinliang
    zhujinliang
    Jan 14, 2014
    45
    听了一上午了,很不错

    歌曲结束判断有bug,有时上一曲尚未结束,下一曲就开始了
    有个小毛病,歌曲标题太长后会顶到下一行,希望能修正一下,能根据窗口大小自动截短一下,最好能滚动显示
    希望有空格键暂停功能

    另外自动建的那个douban.fm目录我感觉不是很合适,我自己改成隐藏的目录了
    Moods
    Moods
    Jan 14, 2014
    46
    不错啊。
    MapleObserver
    MapleObserver
    Jan 14, 2014
    47
    这个不错,点赞!晚上回去试试。
    turing
    turing
    OP
    Jan 14, 2014
    48
    @zhujinliang 恩,会在播放完前三四秒就开始播放下一首了

    标题这个太长,确实我也没办法。。试试把 iterm 或者终端调整成 100% 宽度占据屏幕一半那种模式吧。

    空格暂停下一个版本会加上。

    原本是有自己定义下载目录的功能的,但是后来想了一下可能遇到写权限问题,还是算了
    scalaview
    scalaview
    Jan 14, 2014
    49
    点赞+1
    hahabrother
    hahabrother
    Jan 14, 2014
    50
    windows下安装总是校验和出错,Ubuntu上npm安装的时候死活下载不下来。。
    hahabrother
    hahabrother
    Jan 14, 2014
    51
    Error: shasum check failed for /home/ckh/tmp/npm-2353-i3nBuZao/1389673476728-0.5402016728185117/tmp.tgz
    就是这个错误、。。。
    banbanchs
    banbanchs
    Jan 14, 2014
    52
    退出后光标会不见..
    turing
    turing
    OP
    Jan 14, 2014❤️1
    53
    @hahabrother windows 安装的报错,可以去提一条安装错误的 issue ,应该是没有安装外部依赖

    ubuntu 下的错误是不是 npm 镜像 URL 配置的原因?可以附上你当前的 node,npm 的版本,去提一条 issue,以备忘
    SkyTodInfi
    SkyTodInfi
    Jan 14, 2014
    54
    xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

    gyp: Error 1 running xcodebuild
    一定要xcode才能安装么?
    turing
    turing
    OP
    Jan 14, 2014
    55
    @SkyTodInfi 要先安装 xcode command line tools
    0x61
    0x61
    Jan 14, 2014
    56
    排队点赞~
    SkyTodInfi
    SkyTodInfi
    Jan 14, 2014
    57
    @turing 我有CLT,而且刚才重装也不行,出错信息也显示存在CLT
    happydays12345
    happydays12345
    Jan 14, 2014
    58
    没有windows版?
    turing
    turing
    OP
    Jan 14, 2014
    59
    @SkyTodInfi 那看来可能真的要装 xcodebuild 了,我不确定这个是否包含在 CLT 中
    SkyTodInfi
    SkyTodInfi
    Jan 14, 2014
    60
    @turing 经过搜索发现,很多人遇见这个问题,貌似是node-gyp的bug....
    baocaixiong
    baocaixiong
    Jan 14, 2014
    61
    退出来之后光标不见了。。。。好不习惯。
    @turing
    hahabrother
    hahabrother
    Jan 14, 2014
    62
    @turing ubuntu下也是校验出错,我再尝试一下,不行的话就告诉你我的版本。似乎我确实没有安装什么依赖。
    hahabrother
    hahabrother
    Jan 14, 2014
    63
    楼主,问个白痴的问题。我下的是node在Ubuntu下的文件夹,里面的bin里直接有node的执行文件,我在用户环境中添加了node,可以运行npm命令。但是sudo npm就是找不到指令了,要怎么处理?我之前的错误是因为我没有sudo安装,sudo找不到npm,怎么解决呢?
    hahabrother
    hahabrother
    Jan 14, 2014
    64
    楼主 ,安装的第一个错误是
    ../deps/mpg123/src/output/alsa.c:27: error: expected specifier-qualifier-list before ‘snd_pcm_format_t’
    ../deps/mpg123/src/output/alsa.c:30: error: ‘SND_PCM_FORMAT_S16’ undeclared here (not in a function)
    不知道楼主方便给个联系方式请教一下吗?
    turing
    turing
    OP
    Jan 14, 2014❤️1
    65
    @hahabrother 安装的错误麻烦去仓库提交一下 issue ,可能有人曾经遇到过和你差不多的错误,解决起来也方便,v2ex 也不太方便阅读代码。
    turing
    turing
    OP
    Jan 14, 2014
    66
    @hahabrother sudo 找不到 npm 就直接 which npm 然后把这个地址贴到 sudo 后边执行
    pipi32167
    pipi32167
    Jan 14, 2014
    67
    @hahabrother 用正常方式安装吧,一般README或者README.md都会有安装方法:
    ./configure
    make
    sudo make install
    Choutreeman
    Choutreeman
    Jan 14, 2014
    68
    希望能加上last.fm 同步哈哈哈,那样就爽歪歪了。。。
    zhangxiao
    zhangxiao
    Jan 14, 2014
    69
    大爱,大赞
    hahabrother
    hahabrother
    Jan 14, 2014
    70
    @turing 那啥。。我是小白,怎么去仓库提交issue?能给了个教程或者简单说下吗?打扰
    hahabrother
    hahabrother
    Jan 14, 2014
    72
    @turing ok, 多谢了~
    hahabrother
    hahabrother
    Jan 14, 2014
    73
    @turing 搞定了,sudo apt-get install libasound2-dev,少安装了这个,虽然不知道这个是什么依赖。。。膜拜ing
    catoncat
    catoncat
    Jan 14, 2014
    74
    好用 感谢
    hahabrother
    hahabrother
    Jan 14, 2014
    75
    体验效果太棒了,正是世界上像楼主这样的人,把我们的生活变得更加美好~~
    hahabrother
    hahabrother
    Jan 14, 2014
    76
    小建议,可能是因为我比较2,说明里的$ douban.fm -m [[email protected]] [password] ,我在输入账号密码的时候真的加了[]。。。是不是需要说明下不要[]
    lsmgeb89
    lsmgeb89
    Jan 14, 2014
    77
    非常实用的东西,因为非常讨厌网页版用的 flash,长时间播放就会把整个机器卡死,Adobe 越做越差。还有能支持收藏的兆赫吗?
    hustlzp
    hustlzp
    Jan 14, 2014
    78
    请教下楼主,我的机器是rMBP,已经安装了Command Developer Tools,直接sudo npm install duban.fm -g,然后卡在下面不动了...

    > [email protected] install /usr/local/lib/node_modules/douban.fm/node_modules/player/node_modules/speaker
    > node-gyp rebuild

    gyp WARN EACCES user "root" does not have permission to access the dev dir "/Users/hustlzp/.node-gyp/0.10.24"
    gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/douban.fm/node_modules/player/node_modules/speaker/.node-gyp"
    gyp http GET http://nodejs.org/dist/v0.10.24/node-v0.10.24.tar.gz
    gyp http 200 http://nodejs.org/dist/v0.10.24/node-v0.10.24.tar.gz
    hustlzp
    hustlzp
    Jan 14, 2014
    79
    我去提交个issue吧
    SkyTodInfi
    SkyTodInfi
    Jan 15, 2014
    80
    @hustlzp 参看我上面的说明
    hustlzp
    hustlzp
    Jan 15, 2014
    81
    @SkyTodInfi node-gyp的bug...这...
    lsmgeb89
    lsmgeb89
    Jan 15, 2014
    82
    从来没有折腾过 node.js,不是很了解,我看安装好之后的 duban.fm 是一个 shell 脚本,难道还要自己安装 cygwin?
    SkyTodInfi
    SkyTodInfi
    Jan 15, 2014
    83
    @hustlzp 参考这里可以解决 https://github.com/TooTallNate/node-gyp/issues/341
    修改一个文件里面几行代码可以暂时解决,亲测可行
    hustlzp
    hustlzp
    Jan 15, 2014
    84
    @SkyTodInfi

    非常感谢!!我是使用倒数第二个人给出的解决方案fix的,因为我是用brew安装的node:

    In case anyone is using Brew, it puts npm with node-gyp in the cellar:

    /usr/local/Cellar/node/0.10.24/lib/node_modules/npm/bin/node-gyp-bin/node-gyp
    /usr/local/bin/node-gyp

    Replace the first with a symlink to the second, and it works.

    Hopefully the next node build is going to include this fix, otherwise I have to do this again on every release.
    turing
    turing
    OP
    Jan 15, 2014
    85
    @lsmgeb89 这部分的东西 npm 应该会帮你解决,不需要额外安装。
    lsmgeb89
    lsmgeb89
    Jan 15, 2014
    86
    @turing 在 Node.js command prompt 执行 douban.fm 并不能运行。
    archean
    archean
    Jan 15, 2014
    87
    顺带求个能够下载豆瓣红心音乐的脚本, 不知各位文艺工程师有没有私货, 或者写一个类似的?
    turing
    turing
    OP
    Jan 15, 2014
    88
    @lsmgeb89 直接在 terminal 中执行
    lsmgeb89
    lsmgeb89
    Jan 15, 2014
    89
    @turing 更加不行,不认。
    turing
    turing
    OP
    Jan 15, 2014
    90
    @lsmgeb89 你是不是没安装到全局啊
    lsmgeb89
    lsmgeb89
    Jan 15, 2014
    91
    @turing 你是指 Node.js 环境?
    FallenDust
    FallenDust
    Jan 15, 2014
    92
    非常不错!
    IfengName
    IfengName
    Jan 16, 2014
    93
    我是来学习的~
    yangkeao
    yangkeao
    Feb 15, 2014
    94
    为什么我连如何选择电台都不知道
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2507 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 161ms · UTC 04:23 · PVG 12:23 · LAX 20:23 · JFK 23:23
    ♥ Do have faith in what you're doing.