一个命令行last.fm scrobbler和一个正在播放的状态更新程序。
scrobblerh的Python项目详细描述
注意:python 3是必需的!
用法
可以使用以下命令之一调用程序:
add user-将用户添加到已知用户列表中。
- [user]
- A Last.fm username.
- [–password, -p]
- The corresponding password.
If a username is provided, you will be prompted for a password. If the command is invoked without any arguments, a Last.fm authorization web-page will be opened for you to grant access to the application.
- [–dont-invoke-browser, -x]
- When invoking the command without arguments, always show the authentication URL; never try to automatically open it.
list users-列出已知用户及其相应的会话密钥。
remove user-从已知用户列表中删除用户。
- user
- The user to remove.
scrobble-搜索轨迹。
- user
- The username to scrobble with. If the user isn’t known, you will be prompted for a password.
- artist
- The name of the artist.
- track
- The name of the track.
- time
- The time of listening. Formatted by –time-format. It may also be now, in which case the current time is used.
- [–time-format, -tf]
- Specifies the format of time, using the syntax of strftime(). Defaults to %Y-%m-%d.%H:%M.
- [–album, -a]
- The name of the album.
- [–duration, -d]
- Has the format of XXhYYmZZs. At least one of those has to be present, but any number of them can be specified, and in any order.
正在播放-更新正在播放的状态。
- user
- The username to use. If the user isn’t known, you will be prompted for a password.
- artist
- The name of the artist.
- track
- The name of the track.
- [–album, -a]
- The name of the album.
- [–duration, -d]
- Has the format of XXhYYmZZs. At least one of those has to be present, but any number of them can be specified, and in any order.
示例
将用户添加到已知用户列表:
$ scrobbler add-user The Last.fm authentication page will be opened, or its URL printed here. Press enter to continue. Press enter after granting access. User hauzzer added. $
以及:
$ scrobbler add-user hauzzer Password: User hauzzer added. $
另外:
$ scrobbler add-user hauzzer --password ****** User hauzzer added. $
列出所有已知用户:
$ scrobbler list-users hauzzer | b431328fc489a4f6e6eeee3e8a0f5537 $
在轨道上搜寻,“Lamplight Symphony” 由Kansas,于2013年7月15日15:32收听:
$ scrobbler scrobble hauzzer Kansas "Lamplight Symphony" 2013-15-07.15:32 -a "Song for America" -d 8m16s Track scrobbled. $
用“Incomudro - Hymn to the Atman”更新正在播放的状态 由Kansas.:
$ scrobbler now-playing hauzzer Kansas "Incomudro - Hymn to the Atman" -a "Song for America" -d 12m17s Status updated. $
从已知用户列表中删除用户:
$ scrobbler remove-user hauzzer User hauzzer removed. $