Linux 冰激凌:我怎样才能使冰激凌不以数字开头命名文件
icecream将这些文件命名为:nnnn艺术家songtitle 如何将其更改为:艺人歌曲名称 我想大概是这样Linux 冰激凌:我怎样才能使冰激凌不以数字开头命名文件,linux,debian,Linux,Debian,icecream将这些文件命名为:nnnn艺术家songtitle 如何将其更改为:艺人歌曲名称 我想大概是这样 冰淇淋--name=“…” 但是我找不到办法。我的手册页显示了这一点 冰淇淋/1.3 用法:冰淇淋[选项]网址[网址…] options: -h, --help print this message -q, --quiet no printouts -v, --verbose be verbose -t, --tracks
冰淇淋--name=“…”
但是我找不到办法。我的手册页显示了这一点
冰淇淋/1.3
用法:冰淇淋[选项]网址[网址…]
options:
-h, --help print this message
-q, --quiet no printouts
-v, --verbose be verbose
-t, --tracks split into tracks when saving
--name=NAME save stream to file NAME. Format codes
are replaced as in the date command.
--stop=N[units] stop download after N (kb, mb, min, songs)
--user-agent=AGENT identify as AGENT stead of icecream/1.3
--stdout output stream to stdout (implies quiet)
--sync sync mpeg audio
--debug turn on debugging
我知道我可以使用今天日期作为输出的文件名
icecream -q --name 'radio_%Y_%m_%d' http://radio.com/playlist.pls
我想艺术家和歌曲标题也有这样的代码,但看起来它们是没有文档的,这正是我的问题
请提供帮助。
icecream
是一个perl脚本,因此我们可以检查是否确实存在您怀疑的未记录代码。只需打开脚本,看看它是如何完成的(v1.3中的行1135
):
所以,当您使用--name
选项时,它所做的唯一一件事就是调用POSIX函数strftime()
,该函数不包含艺术家或歌曲标题的任何标记
您的文件为什么命名为nnnnnn艺术家歌曲标题
,请参见第647行
:
my $fn = $trackid . $context->{title};
它似乎从播放列表中获取标题,并预先添加一个唯一的id。如果您不想在名称中包含该id,只需将其删除并保留my$fn=$context->{title}代码>
这将按照播放列表中的名称命名文件。但在此更改之后,不会授予唯一性,因此某些文件可能会被覆盖。我建议复制一份冰淇淋
脚本,并仅在播放列表中使用修改后的版本,确保名称唯一。根据手册页,它只接受日期
命令中可用的标志。
my $fn = $trackid . $context->{title};