# script to export lyrics

**URL:** https://community.mp3tag.de/t/script-to-export-lyrics/3313
**Category:** Export
**Created:** [May 12, 2006, 4:15pm UTC](https://community.mp3tag.de/t/script-to-export-lyrics/3313 "2006-05-12T16:15:07Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![molnart](https://community.mp3tag.de/user_avatar/community.mp3tag.de/molnart/32/121_2.png) [@molnart](https://community.mp3tag.de/u/molnart)
#### Post date: [May 12, 2006, 4:15pm UTC](https://community.mp3tag.de/t/script-to-export-lyrics/3313/1 "2006-05-12T16:15:07Z")

</div>

hi everyone. i've recently switched from MediaTagger to mp3Tag due to the lack of IDv2.4 support. I've chosen mp3Tag, because exporting features are absolutely necessery for me. However i have some problems with migrating MediaTagger scripts to mp3Tag.

I've been using two kind of scripts with MediaTagger:  
a text one and a html one. (You can download the scripts and the results from [here](http://dosapps.webpark.sk/files/scripts.zip))

Porting the txt scripts should be easy, but:

- i'm always getting a second emtpy line
- how can i align text ?

with the html script i've much greater problems. i would be very happy if someone more experienced in script writing could port it, or point me to a similar script, if it already exists

edit: how can i get rid of "eng||" at the beginning of the %unsyncedlyrics% field when exporting?

hope i'm not bothering too much and thank you all in advance

edit: scripts added as attachment, cause the url seems to be down

[scripts.zip](https://community.mp3tag.de/uploads/default/original/2X/d/d0a6916f354b9d0a0872083cf1968ee0fd4ec195.zip) (28.6 KB)

---

<div class="post-metadata">

### Author: ![dano](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dano/32/6_2.png) [@dano](https://community.mp3tag.de/u/dano)
#### Post date: [May 12, 2006, 4:54pm UTC](https://community.mp3tag.de/t/script-to-export-lyrics/3313/2 "2006-05-12T16:54:53Z")

</div>

That's my txt port:

[molnart\_txt.mte](https://community.mp3tag.de/uploads/default/original/2X/c/c68bf257f2928c42fb8791ae359a88a6fa862d48.mte) (571 Bytes)

---

<div class="post-metadata">

### Author: ![molnart](https://community.mp3tag.de/user_avatar/community.mp3tag.de/molnart/32/121_2.png) [@molnart](https://community.mp3tag.de/u/molnart)
#### Post date: [May 12, 2006, 5:10pm UTC](https://community.mp3tag.de/t/script-to-export-lyrics/3313/3 "2006-05-12T17:10:37Z")

</div>

thanks, dano. you helped me a lot

now anyone can help with the html script ? i've tried to create one (attachment), but i'm always getting messed up output (but at least it's not syntax error anymore)

thanks in advance

[lyr\_htm.mte](https://community.mp3tag.de/uploads/default/original/2X/c/ccb4e206fbcfacd3dad2622b3481f92180433f35.mte) (8.77 KB)

---

<div class="post-metadata">

### Author: ![SquallLeonhart38](https://community.mp3tag.de/user_avatar/community.mp3tag.de/squallleonhart38/32/116_2.png) [@SquallLeonhart38](https://community.mp3tag.de/u/SquallLeonhart38)
#### Post date: [May 15, 2006, 1:14pm UTC](https://community.mp3tag.de/t/script-to-export-lyrics/3313/4 "2006-05-15T13:14:01Z")

</div>

@ molnart:  
I fixed your html script a bit. **ONE BIG PROBLEM IS THAT YOU FORGOT TO MASK THE %!**

And I also fixed the thing with the lyrics but I recommend to you that you want to have the same script with a different program read the export help first.  
I don't want to blame you but Mp3tag uses a syntax that is quite different from other programs and so converting isn't that easy.

When you want to I can convert it so that it works nearly as good as the script for mediatagger but therefor I need some time, as I have some other important things to do at the moment.  
Why don't you try out some of them that are going around?? Many persons on this board make some really good scripts (so do I) an.

---

<div class="post-metadata">

### Author: ![milka](https://community.mp3tag.de/user_avatar/community.mp3tag.de/milka/32/55_2.png) [@milka](https://community.mp3tag.de/u/milka)
#### Post date: [May 15, 2006, 3:13pm UTC](https://community.mp3tag.de/t/script-to-export-lyrics/3313/5 "2006-05-15T15:13:56Z")

</div>

Here goes my fix of SquallLeonhart38 fix.  
[lyr\_htm\_\_milka\_edit\_.zip](https://community.mp3tag.de/uploads/default/original/2X/e/efc737bd3ae12e99c3c06e8b7b3bcdea3483a9e9.zip) (2.01 KB)

[lyr\_htm\_\_milka\_edit\_.zip](https://community.mp3tag.de/uploads/default/original/2X/e/efc737bd3ae12e99c3c06e8b7b3bcdea3483a9e9.zip) (2.01 KB)

---

<div class="post-metadata">

### Author: ![molnart](https://community.mp3tag.de/user_avatar/community.mp3tag.de/molnart/32/121_2.png) [@molnart](https://community.mp3tag.de/u/molnart)
#### Post date: [May 15, 2006, 3:43pm UTC](https://community.mp3tag.de/t/script-to-export-lyrics/3313/6 "2006-05-15T15:43:32Z")

</div>

> [@](#):
>
> **ONE BIG PROBLEM IS THAT YOU FORGOT TO MASK THE %!**

Thanks, that was truly the BIG problem. I've edited the file in frontpage and i was not aware of the %'s.

I was playing a bit with the script you fixed, and i have to tell it's really close to my dream script now. I've tried to add some functions to calculate the average bitrate of the exported files, but somehow i've failed ☹

And one question: is there a reason why the tables by the lyrics are not being exported? I have no idea why they are not there... (but this is purely cosmetical, the script is now way better than the original from MediaTagger)

thanks for your time guys once again

[lyr\_htm290.zip](https://community.mp3tag.de/uploads/default/original/2X/7/7a55f6ca2a098bc96777c6715353066d69644cbd.zip) (2.09 KB)

---

<div class="post-metadata">

### Author: ![SquallLeonhart38](https://community.mp3tag.de/user_avatar/community.mp3tag.de/squallleonhart38/32/116_2.png) [@SquallLeonhart38](https://community.mp3tag.de/u/SquallLeonhart38)
#### Post date: [May 15, 2006, 5:11pm UTC](https://community.mp3tag.de/t/script-to-export-lyrics/3313/7 "2006-05-15T17:11:44Z")

</div>

About the things left of the lyrics:

I think it's because of the %s. Best run Notepad and search for % in the complete file. When there is one % then look if it's for exporting the data. When not, simply write it as %%.  
And I fell a bit ashame 'cause I didn't see the %s (perhaps because I didn't download the sample and so I didn't saw the table).

---

<div class="post-metadata">

### Author: ![molnart](https://community.mp3tag.de/user_avatar/community.mp3tag.de/molnart/32/121_2.png) [@molnart](https://community.mp3tag.de/u/molnart)
#### Post date: [May 15, 2006, 5:44pm UTC](https://community.mp3tag.de/t/script-to-export-lyrics/3313/8 "2006-05-15T17:44:11Z")

</div>

thanks, it were the %s

someone, any ideas how to calculate average bitrate? i've tried this, without success:

```
$puts(abr,0)
$loop(%track%)
$add(abr,%_bitrate%)
$loopend()
$div(abr,%_counter%)
$get(abr)

```

what am i doing wrong ? (most probably everything, but still 😉 )

---

<div class="post-metadata">

### Author: ![dano](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dano/32/6_2.png) [@dano](https://community.mp3tag.de/u/dano)
#### Post date: [May 15, 2006, 6:13pm UTC](https://community.mp3tag.de/t/script-to-export-lyrics/3313/9 "2006-05-15T18:13:39Z")

</div>

```
$loop(%_filename_ext%)$puts(Vbitrate,$add($get(Vbitrate),%_bitrate%))
$puts(cnt1,$add($get(cnt1),1))$loopend()
$div($get(Vbitrate),$get(cnt1))

```

You always need $puts and $get when you're using variables.  
Maybe you can shorten it by replacing the cnt1 stuff with just %\_counter%, try it yourself.

---

<div class="post-metadata">

### Author: ![milka](https://community.mp3tag.de/user_avatar/community.mp3tag.de/milka/32/55_2.png) [@milka](https://community.mp3tag.de/u/milka)
#### Post date: [May 16, 2006, 6:04am UTC](https://community.mp3tag.de/t/script-to-export-lyrics/3313/10 "2006-05-16T06:04:13Z")

</div>

Thanks dano I will implement avarage bitrate calculate in my scripts.

Check out molnart.[lyr\_htm290.zip](https://community.mp3tag.de/uploads/default/original/2X/e/e0acea4f7dfac5a720e9013deb47b378a1aae5f9.zip) (2.03 KB)

[lyr\_htm290.zip](https://community.mp3tag.de/uploads/default/original/2X/e/e0acea4f7dfac5a720e9013deb47b378a1aae5f9.zip) (2.03 KB)

---

<div class="post-metadata">

### Author: ![SquallLeonhart38](https://community.mp3tag.de/user_avatar/community.mp3tag.de/squallleonhart38/32/116_2.png) [@SquallLeonhart38](https://community.mp3tag.de/u/SquallLeonhart38)
#### Post date: [May 16, 2006, 9:41am UTC](https://community.mp3tag.de/t/script-to-export-lyrics/3313/11 "2006-05-16T09:41:11Z")

</div>

Another possibility would be to use javascript. An example is attached.

[\_Squallleonhart38\_edit\_\_lyr\_htm.zip](https://community.mp3tag.de/uploads/default/original/2X/5/5f017d7d67a0df1f08addc2259091aca3f24f0d8.zip) (2.08 KB)

---

<div class="post-metadata">

### Author: ![molnart](https://community.mp3tag.de/user_avatar/community.mp3tag.de/molnart/32/121_2.png) [@molnart](https://community.mp3tag.de/u/molnart)
#### Post date: [May 16, 2006, 5:25pm UTC](https://community.mp3tag.de/t/script-to-export-lyrics/3313/12 "2006-05-16T17:25:41Z")

</div>

Thank you guys, you're great. I've finalised the script for now and i don't want to play with it for a time... only if someone would tell me that it is possible to detect the available jpg files in the directory and automatically create links to them 😉  
(now if you tell me that it IS possible i will fall off the chair immediately 😃 )

Finally i have a script that requires (almost) no editing after the export, thank you to all once again !

[lyr\_htm.zip](https://community.mp3tag.de/uploads/default/original/2X/1/1a99a188a612d64a1a51f75662accb6d266a30e2.zip) (2.12 KB)

---

<div class="post-metadata">

### Author: ![SquallLeonhart38](https://community.mp3tag.de/user_avatar/community.mp3tag.de/squallleonhart38/32/116_2.png) [@SquallLeonhart38](https://community.mp3tag.de/u/SquallLeonhart38)
#### Post date: [May 17, 2006, 8:17am UTC](https://community.mp3tag.de/t/script-to-export-lyrics/3313/13 "2006-05-17T08:17:27Z")

</div>

> [@](#):
>
> Thank you guys, you're great. I've finalised the script for now and i don't want to play with it for a time... only if someone would tell me that it is possible to detect the available jpg files in the directory and automatically create links to them 😉  
> (now if you tell me that it IS possible i will fall off the chair immediately 😃 )
> 
> Finally i have a script that requires (almost) no editing after the export, thank you to all once again !
> 
> \<{POST\_SNAPBACK}\>

And I look if it is possible to check if the file is available.

EDIT: Removes script and no it isn't possible.

---

<div class="post-metadata">

### Author: ![milka](https://community.mp3tag.de/user_avatar/community.mp3tag.de/milka/32/55_2.png) [@milka](https://community.mp3tag.de/u/milka)
#### Post date: [May 19, 2006, 5:39am UTC](https://community.mp3tag.de/t/script-to-export-lyrics/3313/14 "2006-05-19T05:39:53Z")

</div>

molnart, I have updated your script and fixed some bugs.  
Check out.  
[lyr\_htm.zip](https://community.mp3tag.de/uploads/default/original/2X/b/bd53b5f4769e4b53ca3537f3f9790e3a92226f47.zip) (2.41 KB)

[lyr\_htm.zip](https://community.mp3tag.de/uploads/default/original/2X/b/bd53b5f4769e4b53ca3537f3f9790e3a92226f47.zip) (2.41 KB)
