Help - Search - Members - Calendar
Full Version: EOL in Comments and Lyrics
Mp3tag Forums > Mp3tag - International > Support
ykeyke
Hi,

I am trying to export fields from 100 files to another 100, for the simple fields no problem, but when I try the comment and lyrics, I got the this warning:

Cannot parse line 1.
Cannot parse line 2.
Cannot parse line 3.


I'm using this:

$filename(txt,utf-8)$loop(%_path%)%artist% - %album% - %title% - %track% - %year% - %genre% - %comment% - %lyrics%
$loopend()


I discovered that the problem is that the original text in comments and lyrics has a paragraph with EOL (end of lines), a text like this:

"sadfhuif iuahduihaih doihiasdh oaisdh iouhf.

askdjfhf lkjsdfjl asdkj adj.

asduhiuhf.jdhdjjad."



So that not the whole text is written in the same line. The Export process ends with no problems, in fact, the file generated has all data. But when I import I got the message above.

Converting the fields for the same file in a unique line (removing all jumps and ends of line), I was able to import tags with no problems, but the comment and lyrics fields result in a oneline text (not aesthetic), as well It's not practical to remove all EOL from all comments and lyrics..


What can I do, any suggestion is appreciated

Thanks
ohrenkino
ZITAT(ykeyke @ May 8 2012, 23:27) *
..It's not practical to remove all EOL from all comments and lyrics..

But that is what you have to do.
Create yourself two actions: the first replaces $chr(10)$chr(13) with a dummy character like # so that long strings become one line for export.
The other action reverses the replacing.
THe end-of-line character indicates the end of the record in the export ...
dano
You can do the replacement during the export, no need to change the tags.

Instead of %comment% write

$replace(%comment%,$char(13),U+000D,$char(10),U+000A)
ykeyke
Hi,

I do the replacement, and that's work. So in comment and lyrics I've e got a one line text. But which action should I use to invert the process, and get the text with "returns"=EOL.

I've used the replace action with $chr(10)$chr(13) and in the import option: $replace(%comment%,<<<,$char(13),>>>,$char(10)), where <<< and >>> are the dummy characters, but with no success. Hope you can help

Thanks

N.B: Literally, it does replace >>> or <<< with the $char(13) string and does not insert the return!!!
DetlevD
QUOTE (ykeyke @ May 14 2012, 00:22) *
Hi, I do the replacement, and that's work. So in comment and lyrics I've e got a one line text. But which action should I use to invert the process, and get the text with "returns"=EOL. ...

Action: Format value
Field: COMMENT
Format string:
$replace(%COMMENT%,$char(13),'U+000D',$char(10),'U+000A')

$replace(%COMMENT%,'U+000D',$char(13),'U+000A',$char(10))


resp. for your example ...

$replace(%COMMENT%,$char(13),'<<<',$char(10),'>>>')

$replace(%COMMENT%,'<<<',$char(13),'>>>',$char(10))


After importing the single-line-ified (previously multi-line) data into a tag-field, you have to do the reverse step on the content of the target tag-field.

DD.20120513.0755.CEST


Edit.
The replacement for CR-LF pairs can also be written as ...

$replace(%COMMENT%,$char(13)$char(10),'U+000DU+000A')
$replace(%COMMENT%,'U+000DU+000A',$char(13)$char(10))

$replace(%COMMENT%,$char(13)$char(10),'<<<>>>')
$replace(%COMMENT%,'<<<>>>',$char(13)$char(10))


DD.20120515.0735.CEST
ykeyke
=D> =D> =D> =D>

Now I know, what I've done wrong: I've omitted the ' in the expression, also I've left spaces in the replace formula. Solved at last.

Thank you a lot
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.