1 个版本 (0 个不稳定)
1.0.0-alpha | 2024年3月30日 |
---|
#588 在 文件系统
52KB
946 代码行
rsid3
一个简单的、为脚本设计的命令行 ID3v2 标签编辑器。
功能
- 打印文件的全部帧
- 打印、设置或删除选定的帧
- 在 ID3v2.2、ID3v2.3 和 ID3v2.4 版本之间进行转换
- 清除属于特定(或任何)ID3v2 版本的全部标签。
示例
# If no actions are chosen, print a summary of a file with all frames
rsid3 file.mp3
# Action 1: Printing frames
rsid3 --TIT2 file.mp3 # Print TIT2 (title)
rsid3 --TXXX some_desc file.mp3 # Print TXXX[some_desc]
rsid3 --COMM some_desc eng file.mp3 # Print COMM[some_desc](eng)
rsid3 --COMM some_desc first file.mp3 # Print COMM[some_desc] and any first language found
rsid3 -d, --TIT2 --TPE1 --TALB file.mp3 # Print title, artist and album, delimited by comma
# Action 2: Setting frames
rsid3 --TIT2= 'My Title' file.mp3 # Set TIT2
rsid3 --TXXX= some_desc 'some value' file.mp3 # Set TXXX[some_desc]
rsid3 --COMM= some_desc eng 'My comment' file.mp3 # Set COMM[some_desc](eng)
# Action 3: Deleting frames
rsid3 --TIT2- file.mp3 # Delete TIT2
rsid3 --TXXX- some_desc file.mp3 # Delete TXXX[some_desc]
rsid3 --COMM- some_desc eng file.mp3 # Delete COMM[some_desc](eng)
# Action 4: Converting between ID3v2 versions
rsid3 --id3v2.4 file.mp3 # Try losslessly converting a tag to ID3v2.4
rsid3 --force-id3v2.2 file.mp3 # Forcefully convert a tag to ID3v2.2
rsid3 --force-id3v2.2 \
--force-id3v2.3 \
--force-id3v2.4 file.mp3 # Leave only frames compatible with all three ID3v2
# standards, and store as ID3v2.4
# Action 5: Purging frames
rsid3 --purge-id3v2.3 file.mp3 # Remove all tag information if it's ID3v2.3
rsid3 --purge-all file.mp3 # Remove all tag information, irrespective of version
# All actions can be chained and mixed; they are executed in the argument order
rsid3 --TIT2 --TIT2= new_title file.mp3 # Print old title and set new title
rsid3 --id3v2.3 --TPE1= new_artist --TALB file.mp3 # Try to convert to ID3v2.3, set artist
# and print album
# Any number of target files can be specified. The following command prints "artist - title",
# removes COMM[some_desc](eng) and sets TXXX[abc] to "def" for two files, all in one command:
rsid3 -d ' - ' --TPE1 --TIT2 --COMM- some_desc eng --TXXX= abc def file1.mp3 file2.mp3
更多详细信息,请参阅 rsid3 --help
。
可写帧
所有帧都可以打印或删除,但仅支持对文本帧子集的值进行设置
- 所有简单文本 (
T***
) - 所有简单链接 (
W***
) - 扩展文本 (
TXXX
) - 扩展链接 (
WXXX
) - 注释 (
COMM
) - 歌词 (
USLT
)
未来可能会根据需要支持更多帧。
依赖关系
~2–11MB
~120K SLoC