Discogs Collection Manager Skill for OpenClaw
This skill provides a command-line interface to interact with a user's record collection on Discogs.com. It is designed specifically for use within the OpenClaw assistant and uses a subcommand structure similar to git or gog.
Prerequisites
This skill is a Go program and requires the Go toolchain to be installed.
Installation (Debian/Ubuntu):
INLINECODE2
One-Time Setup
Before first use, you must run the included installer script. This will compile the Go binary and place it in a predictable location within the skill's directory.
- 1. Run the installer:
CODEBLOCK0
- 2. Configure Credentials:
This command saves your Discogs token and username to a configuration file (
~/.config/discogs-cli/config.yaml).
CODEBLOCK1
Usage
All commands must be prefixed with the full path to the binary.
Fetch Album Art
Downloads the album art for a given release and displays it in the chat.
CODEBLOCK2
List Collection Folders
Shows all folders and their record counts.
CODEBLOCK3
List Releases in a Folder
Shows all records within a specific folder. The output is a formatted table.
CODEBLOCK4
Search the Discogs Database
Search for releases, artists, or labels.
CODEBLOCK5
Manage Your Wantlist
Work with your Discogs wantlist.
List Your Wantlist
Displays all items in your wantlist.
CODEBLOCK6
Add to Your Wantlist
Adds a release to your wantlist by its ID.
CODEBLOCK7
Remove from Your Wantlist
Removes a release from your wantlist by its ID.
CODEBLOCK8
Caching and Valuation Commands
These commands rely on a local cache for performance. You must run sync first to populate the cache.
Sync Collection Details (Slow)
Fetches detailed data for every item in the collection and builds a local cache. This command is slow and should be run in the background. Inform the user that this will take time.
CODEBLOCK9
Get Collection Value (Fast)
Reads the local cache to provide the estimated market value for each item and the total collection. This command is fast. If it fails, the cache is likely missing, and you need to run the sync command.
CODEBLOCK10
Get Single Release Details (Fast)
Provides a detailed view of a single release, including tracklist.
CODEBLOCK11
OpenClaw 的 Discogs 收藏管理技能
该技能提供了一个命令行界面,用于与用户在 Discogs.com 上的唱片收藏进行交互。它专为在 OpenClaw 助手内使用而设计,采用类似于 git 或 gog 的子命令结构。
前提条件
该技能是一个 Go 程序,需要安装 Go 工具链。
安装(Debian/Ubuntu):
sudo apt-get update && sudo apt-get install -y golang-go
一次性设置
首次使用前,必须运行附带的安装脚本。该脚本将编译 Go 二进制文件并将其放置在技能目录内的可预测位置。
- 1. 运行安装程序:
bash
skills/discogs-cli/install.sh
- 2. 配置凭据:
此命令将您的 Discogs 令牌和用户名保存到配置文件(~/.config/discogs-cli/config.yaml)中。
bash
skills/discogs-cli/bin/discogs-cli config set -u 您的用户名 -t 您的秘密令牌
使用方法
所有命令都必须以二进制文件的完整路径作为前缀。
获取专辑封面
下载指定发行的专辑封面并在聊天中显示。
bash
skills/discogs-cli/bin/discogs-cli release art <发行ID>
列出收藏文件夹
显示所有文件夹及其唱片数量。
bash
skills/discogs-cli/bin/discogs-cli collection list-folders
列出文件夹中的发行
显示特定文件夹中的所有唱片。输出为格式化表格。
bash
列出全部文件夹中的所有发行(默认)
skills/discogs-cli/bin/discogs-cli collection list
按ID列出特定文件夹中的所有发行
skills/discogs-cli/bin/discogs-cli collection list --folder 8815833
搜索 Discogs 数据库
搜索发行、艺术家或厂牌。
bash
搜索发行(默认类型)
skills/discogs-cli/bin/discogs-cli search Daft Punk - Discovery
搜索艺术家
skills/discogs-cli/bin/discogs-cli search --type artist Aphex Twin
管理您的愿望清单
处理您的 Discogs 愿望清单。
列出您的愿望清单
显示愿望清单中的所有项目。
bash
skills/discogs-cli/bin/discogs-cli wantlist list
添加到愿望清单
按ID将发行添加到您的愿望清单。
bash
skills/discogs-cli/bin/discogs-cli wantlist add 12345
从愿望清单中移除
按ID从您的愿望清单中移除发行。
bash
skills/discogs-cli/bin/discogs-cli wantlist remove 12345
缓存和估值命令
这些命令依赖本地缓存以提高性能。您必须先运行 sync 来填充缓存。
同步收藏详情(慢)
获取收藏中每个项目的详细数据并构建本地缓存。此命令速度较慢,应在后台运行。告知用户这将需要时间。
bash
skills/discogs-cli/bin/discogs-cli collection sync
获取收藏价值(快)
读取本地缓存以提供每个项目的估计市场价值和总收藏价值。此命令速度较快。如果失败,可能是缓存缺失,您需要运行 sync 命令。
bash
skills/discogs-cli/bin/discogs-cli collection value
获取单个发行详情(快)
提供单个发行的详细视图,包括曲目列表。
bash
skills/discogs-cli/bin/discogs-cli collection get 35198584