冰淇淋把这些文件命名如下:nnnn-艺术家--歌曲标题。
我怎样才能把它改成:艺人-歌曲标题?
我想这有点像
icecream --name="......",
但我找不到办法。我的手册页显示了这个
icecream/1.3用法: icecream选项URL .
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我想艺术家和歌曲的标题也有这样的%代码,但是看起来它们是没有记录的,这正是我的问题。
请帮帮忙。
发布于 2016-11-13 12:18:15
icecream是一个perl脚本,因此我们可以检查是否真的有您怀疑的没有文档的%-代码。只需打开脚本,看看它是如何完成的(第1.3版中的1135行):
$config->{name} = strftime($config->{name},localtime(time));因此,当您使用--name选项时,它只会调用POSIX函数strftime(),正如你在这里看到的不会包含任何艺术家或歌曲标题的标记。
您的文件为什么命名为nnnn-artist-songtitle,可以在647上找到。
my $fn = $trackid . $context->{title};表面上看,它从播放列表中获得标题,并添加了一个独特的id。如果您不希望在名称中包含id,您只需删除它并只保留my $fn = $context->{title};
这将命名文件,因为它们是在播放列表中命名的。但是,在此更改之后,不授予唯一性,因此某些文件可能会被覆盖。我建议制作一个icecream脚本的副本,并且只在您确信名称是唯一的播放列表上使用修改后的版本。
https://stackoverflow.com/questions/40566050
复制相似问题