Show time-synced lyric with BTT!
Project description
Synced Lyric on TouchBar
Show synced lyric in the touch-bar with BetterTouchTool and NetEase APIs. Based on the idea of Kashi.
Features
- Netease music web apis for synced lyrics;
- cachier to cache function calls and reduce the need to call webapis;
- Apple script for Spotify & iTunes/Music background track information;
- Support for English/Chinese(Simplified);
Style
It follows the following style to display each line of the lyric:
[Title/Author(s)] Lyric
See Preview for more.
Note: Netease music itself is not supported as it does not support apple script now.
Instruction
1. Denpendencies
First check your python version, which should be 3.6+. All commands should be executed in your terminal.
python3 --version
pip
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py
You might want to restart your terminal.
pip3 install touchbar_lyric
Python Path
Take a note for the python3 path. We will refer it as ${PYTHONPATH}
whereis python3
2. Configuration in BetterTouchTool
Same as Kashi:
- Copy&paste the content in
lyric.json
in Meun Bar > Touch Bar; - Change the python path
/Users/chenghaomou/Anaconda/bin/python
to your own python path in the script area;
${PYTHONPATH} -m touchbar_lyric --app Music
or use Spotify(default)
${PYTHONPATH} -m touchbar_lyric --app Spotify
Preview
中文指南
背景知识
- 脚本运行需要 BTT + Python3.6+。
- 仅支持系统自带的 Music 和 Spotify,推荐使用 Spotify。
Python 设置
- 检查 macOS 系统自带的 Python3 ,在系统自带的 Terminal 应用中输入以下命令
whereis python3
*返回输出的路径信息后面会使用
- 安装
pip
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py
- 安装
touchbar-lyric
pip3 install touchbar_lyric
BTT设置
- 复制
lyric.json
里面的内容,在BTT的Touch Bar 配置界面直接粘贴 - 在右侧脚本区域, 把
/Users/chenghaomou/Anaconda/bin/python
换成第一步中的路径 - 在 Spotify/Music 运行时,应该出现歌词挂件
预览
歌词信息按照 [歌曲名/演唱者] 歌词
格式,具体效果如图所示:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
touchbar-lyric-0.3.3.tar.gz
(9.4 kB
view hashes)