Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux 冰激凌:我怎样才能使冰激凌不以数字开头命名文件_Linux_Debian - Fatal编程技术网

Linux 冰激凌:我怎样才能使冰激凌不以数字开头命名文件

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

icecream将这些文件命名为:nnnn艺术家songtitle

如何将其更改为:艺人歌曲名称

我想大概是这样

冰淇淋--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};