$filename(csv,utf-16)Filename,Path,Artist,Title,Album,Year,Genre,Length,Last Modified,Comment,Album Artist,Original Artist,Composer
$puts(show_comment,

Output formatting for ID3 tags, used by Excel macro that creates MITPlayer database
	Written by Steve Clarke, Aug-Oct 2021, release 1.0.  (developer v5)
- Need utf-16 for accented chars we encounter
- Regexps handle CRLF and bare CR/LF sometimes found in comments
- hex 0F () used by MITPlayer for internal double-quotes

)$loop(%_filename_ext%)"$replace($regexp($regexp($regexp(%_filename_ext%,\r\n,; ),\r,; ),\n,; ),",)",$puts(a
,)"$replace($regexp($regexp($regexp(%_folderpath%,\r\n,; ),\r,; ),\n,; ),",)",$puts(a
,)"$replace($trim($regexp($regexp($regexp(%artist%,\r\n,; ),\r,; ),\n,; )),",)",$puts(a
,)"$replace($trim($regexp($regexp($regexp(%title%,\r\n,; ),\r,; ),\n,; )),",)",$puts(a
,)"$replace($trim($regexp($regexp($regexp(%album%,\r\n,; ),\r,; ),\n,; )),",)",$puts(a
,)"$replace($trim($regexp($regexp($regexp(%year%,\r\n,; ),\r,; ),\n,; )),",)",$puts(a
,)"$replace($trim($regexp($regexp($regexp(%genre%,\r\n,; ),\r,; ),\n,; )),",)",$puts(a
,)%_length_seconds%,$puts(a
,)%_file_mod_date%,$puts(a
,)"$replace($trim($regexp($regexp($regexp(%comment%,\r\n,; ),\r,; ),\n,; )),",)",$puts(a
,)"$replace($trim($regexp($regexp($regexp(%ALBUMARTIST%,\r\n,; ),\r,; ),\n,; )),",)",$puts(a
,)"$replace($trim($regexp($regexp($regexp(%ORIGARTIST%,\r\n,; ),\r,; ),\n,; )),",)",$puts(a
,)"$replace($trim($regexp($regexp($regexp(%COMPOSER%,\r\n,; ),\r,; ),\n,; )),",)"
$loopend()
