📄 mp3_to_dl
字号:
#! /usr/bin/perl# convert a MP3 file into a text-only format that may be download# to the MP3 player's memory-only playback program. The format is# just uuencoded data in 4096 byte blocks, with the word "end" after# the last line.$ARGV[0] && $ARGV[1] || die "Usage: mp3_to_dl input.mp3 output.txt\n";open(FIN, "$ARGV[0]") || die "Unable to read $ARGV[0]\n";open(FOUT, ">$ARGV[1]") || die "Unable to write $ARGV[1]\n";$len = -s $ARGV[0];$block = 30;while ($len > 0) { $num = 4096 - read(FIN, $data, 4096); $data .= pack("x$num") if $num > 0; print FOUT pack('u', $data); $len -= 4096;}print FOUT "end\n";close FIN;close FOUT;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -