Skip to main content

音乐专辑信息整理工具 - 批量管理音频文件标签

Project description

storytag-tool - 音乐专辑信息整理工具

安装

pip install storytag-tool

命令行参数

storytag [-h] [-s] [-c] [-o FILE] [-f FILE] [--dryrun] [dir]

positional arguments:
  dir                   音乐目录路径(支持 SMB 挂载路径)

options:
  -h, --help            显示帮助
  -s, --search          启用 MusicBrainz 元数据搜索(默认关闭)
  -c, --check           检查缺少专辑名的目录,输出 md 表
  -o FILE, --output     -c 时指定 md 表输出路径(默认 result.md)
  -f FILE, --file       从 md 表读取并应用专辑名修改
  --dryrun              不实际执行文件修改,仅显示预期

使用模式

模式1:检查模式(生成 md 表)

扫描目录及其子目录,找出缺少专辑名的目录,输出到 md 表供校对修订。

# 检查目录,输出到默认 result.md
storytag -c "Y:/music"

# 指定输出路径
storytag -c "Y:/music" -o "Y:/music/albums.md"

输出的 md 表格式:

本目录名 文件数 有专辑 建议专辑名 本目录所在路径
03. 神探 - 第三季 3 口袋3 Y:/music/03. 神探 - 第三季
03. 神探 - 第二季 1 - Y:/music/03. 神探 - 第二季
  • 有专辑:前2个文件中都有专辑名则显示"是",否则"否"
  • 建议专辑名:取前2个文件中第一个有专辑名的值,用户可手动修改

模式2:应用模式(从 md 表修改)

读取 md 表,对 有专辑=否建议专辑名 有值的目录执行专辑名修改。

# 预览修改(不实际写入)
storytag -f "Y:/music/albums.md" --dryrun

# 执行修改
storytag -f "Y:/music/albums.md"

模式3:交互模式

逐一处理每个子目录,手动指定或确认专辑名。

# 默认模式(不使用 MusicBrainz)
storytag "Y:/music/讲故事"

# 启用 MusicBrainz 搜索
storytag -s "Y:/music/讲故事"

交互流程:

  1. 显示目录信息和当前标签
  2. 提示输入专辑名(自动从目录名提取建议值)
  3. 用户回车确认或输入新名称
  4. 确认后写入标签

音乐文件格式

支持:.flac .mp3 .ogg .opus .m4a

推荐工作流程

  1. 先用 -c 检查整个音乐库,生成 md 表
  2. 编辑 md 表,修正 建议专辑名
  3. -f --dryrun 预览修改
  4. 确认无误后用 -f 执行修改
# 步骤1:检查
storytag -c "Y:/music" -o "Y:/music/albums.md"

# 步骤2:编辑 albums.md,修改建议专辑名

# 步骤3:预览
storytag -f "Y:/music/albums.md" --dryrun

# 步骤4:执行
storytag -f "Y:/music/albums.md"

注意事项

  • MusicBrainz 搜索有 1 秒/请求 rate limit,每分钟约 1 次,大量操作请使用 -c / -f 模式
  • -f 模式会跳过 有专辑=是建议专辑名=- 的目录
  • 建议先用 --dryrun 确认无误后再执行实际修改
  • 写入前请确认,脚本不会自动覆盖已有专辑名的文件(除非用户确认)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

storytag_tool-0.1.1.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

storytag_tool-0.1.1-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file storytag_tool-0.1.1.tar.gz.

File metadata

  • Download URL: storytag_tool-0.1.1.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for storytag_tool-0.1.1.tar.gz
Algorithm Hash digest
SHA256 9e439492d783b09ca7176167ed9a83ac9031909b427ed4fc12fc52938ee0382b
MD5 05ca43943656cf94b22f6d3405e519c7
BLAKE2b-256 3bda3cfc2c938667a10f4d7e2111675d09704b9e99300f755d587d69860c5b74

See more details on using hashes here.

File details

Details for the file storytag_tool-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: storytag_tool-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for storytag_tool-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bdcc4e038ae54f8fb7fa3d697dddc6edc7a27c78a4b437736a38eb5d112494c6
MD5 c42ffcc221a8ef9baa8b2b333446ad25
BLAKE2b-256 0b050cf0ec2e9937e2f2ce87221b8cb11785d038736b1debba4904980205ba3c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page