Exporting to rtf


#1

I was wondering if there was a way to export an rtf to make your albums look like this:

Korn
Follow the Leader

  1. It's On!
  2. Freak on a Leash
  3. Got the Life
    ...etc.
    Korn
    Issues
  4. Dead
  5. Falling Away from Me
  6. Trash
    ...etc.

If anybody knows how to do this it would be helpfull. Thanks.


#2

Hi,
I didn't know much about rtf but I converted the old rft export-file to your wishes. Just try it with a new template with this content:

$filename("info.rtf"){\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fswiss\fprq2\fcharset0 Tahoma;}}
\viewkind4\uc1\pard\b\f0\fs32 File Overview\par
\b0\fs20 %_total_files% Tracks · $div(div("%_total_time_raw%", "%_total_files%"),60):$num(sub(div("%_total_time_raw%", "%_total_files%"),mul(div(div("%_total_time_raw%", "%_total_files%"),60),60)),2) · %_total_time2% · $fmtNum("%_total_size_raw%") Byte\par
$loop("%artist%")$loop("%album%")\sb227 \b %artist%\b0\par
\pard\b %album%\b0\par
$loop(_filename_ext)$num("%track%", 2). %title%\par
$loopend()
$loopend()
$loopend()
}

If you want to change the layout look at the official rtf-documentation:
http://msdn.microsoft.com/library/default....tml/rtfspec.asp

Just try it and ask here if you have further questions.
Julchen


#3

Thanks for your input, but I couldn't seem to get that to work properly. Is this what's it's supposed to look like?:
[EXPORTHEADER]
HEADERLINE01={\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fswiss\fpr

q2\fcharset0 Tahoma;}}
HEADERLINE02=\viewkind4\uc1\pard\b\f0\fs32 Mp3tag File Overview\par
HEADERLINE03=\b0\fs20 %_date%\par
HEADERLINE04=\par

[EXPORTRECORD]
RECORDLINE01=\b0\fs20 %_total_files% Tracks - $div(div("%_total_time_raw%",

"%_total_files%"),60):$num(sub(div("%_total_time_raw%",

"%_total_files%"),mul(div(div("%_total_time_raw%",

"%_total_files%"),60),60)),2) - %_total_time2% - $fmtNum("%_total_size_raw%")

Byte\par
RECORDLINE02=$loop("%artist%")$loop("%album%")\sb227 \b %artist%\b0\par
RECORDLINE03=\pard\b %album%\b0\par
RECORDLINE04=$loop(_filename_ext)$num("%track%", 2). %title%\par
$loopend()
$loopend()
$loopend()

[EXPORTFOOTER]
FOOTERLINE01=\par
FOOTERLINE02=build on %_date%, with \b %_app% - the universal Tag Editor\b0 -

http://www.mp3tag.de/en/\par
FOOTERLINE03=}

[EXPORTSORT]
SORT=3 2 5

[EXPORTEXTENSION]
EXTENSION=rtf

Here is the closes that I could come to:

[EXPORTHEADER]
HEADERLINE01={\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fswiss\fprq2\fcharset0 Tahoma;}}
HEADERLINE02=\viewkind4\uc1\pard\b\f0\fs32 Mp3tag File Overview\par
HEADERLINE03=\b0\fs20 %_date%\par
HEADERLINE04=\par

[EXPORTRECORD]
RECORDLINE01=%artist%\par
RECORDLINE02=%album%\par
RECORDLINE03=%track%. %title%\par

[EXPORTFOOTER]
FOOTERLINE01=\par
FOOTERLINE02=build on %_date%, with \b %_app% - the universal Tag Editor\b0 - http://www.mp3tag.de/en/\par
FOOTERLINE03=}

[EXPORTSORT]
SORT=3 2 5

[EXPORTEXTENSION]
EXTENSION=rtf

But the final would look like this:
Korn
Follow the Leader

  1. It's On!
    Korn
    Follow the Leader
  2. Freak on a Leash
    Korn
    Follow the Leader
  3. Got the Life

If there was only a way to have the "Korn, Follow the Leader" part list only once, that would be good.

I also used the help in the mp3tag and found these, but I wasn't sure how to use them correctly:
Other functions
$add(x,y) - adds y to x.
$div(x,y) - divides x by y.
$fmtNum(x) - formats number x with seperator for thousands according to current locale settings.
$if(x,y,z) - if x is true, y is returned, otherwise z.
$left(x,n) - Leftmost n characters of text x.
$meta(x) - returns an empty string, if x is a placeholder (%...%).
$mid(x,n,i) - First n characters of text x, starting at character i.
$mul(x,y) - multiplies x by y.
$odd(x) - returns true, if x is odd.
$right(x,n) - Rightmost n characters of text x.
$sub(x,y) - substracts y from x.

the $if(x,y,z) look interesting, but I'm not sure how I would get it to work.


#4

You need the latest version 2.25 of mp3tag. For V2.25 you just have to save the code area to a new export configuration file without any [EXPORTHEADER] etc, just the plain text.

The $loop() function is what you need. You can group by tag fields like artist and album and also by bitrate, filename, foldepath... More information is in the help file.

Julchen