Updating MP3 Tags from a Text File into MIX.MP3 file

Hey Guys,

I hope somebody at some point had the same issue - I asked this question awhile ago but nevertheless mabe something changed :slight_smile:

I was able to install id3lib library from GitHub but couldn't implement it into macros

1.I have 3 files in folder Downloads:
-mix.mp3
-TAGS.txt
-1440x1440.png

2.I would like to update following fields in mix.mp3 from file TAGS.txt:

-Title
-Artist
-Album
-Track number
-Year
-Genre
-Subtitle
-Comment

3.Add cover art:
-1440x1440.png

4.Add iTunes podcast tag:
Comment [iTunPGAP] = 0

THANK YOU!!! THANK YOU!!! THANK YOU!!!

TAGS.txt file:

Title:

SuperDuper

Artist:

BigStar Ken Country Pal

Album Artist:

Grammy Compilation

Album:

Best of the best 2016

Track:

55

Year:

2016

Comment:

Check other tracks from Grammy Compilation 2017.
Check other tracks from Grammy Compilation 2016.
Check other tracks from Grammy Compilation 2015.

Genre:

Pop

Subtitle:

Enjoy new great title from BigStar Ken Country Pal. Brought to you by Grammy Compilation and others.

“iTunes podcast tag”
Comment [iTunPGAP] = 0

Hey Costa,

Please don’t post the same question to multiple topics.

I’ve been busy and haven’t gotten back to that yet.

All you needed to do was post to the original topic to “bump” it, and I would have been notified.

-Chris

Sorry about that Chris, thanks for looking at that topic!

Hey Chris,

I would like to ask you to modify a little bit the script.
I just need to read text file to multiple variables:

  • the issue is that some variables are couple lines or paragraphs long.

Here is an example:
Title:

New song

Artist:

New Name

Artist Web Name:

newname

Introduction:

Hello new name,dflevnevlnevln
new name

sdfnvlnflnvfln
vfnefnlnvlnfvfv

bye and etc

Tags:

EDM Electro DeepHouse DJ
House Dance Tropical

I would like to get:

Title:

%Title%

Artist:

%Artist%

Artist Web Name:

%artistwebname%

Introduction:

%introduction%

Tags:

%tags%

Archive.zip (1.1 KB)

Hey Costa,

Something like this?

-Chris


Generic-Test 01.kmmacros (2.2 KB)

hey Chris,

Can you please re-check script. Somehow it doesn't work for me:(Archive.zip (2.3 KB)

Hey Costa,

It works for me with your test file.

Did you change the path of the Read File action?

-Chris

indeed, it works great,
thank you Chris!

Hey Chris,

I need your help, please!
same script but somehow in result I have space in between %introduction% and %artistwebname% that I try to eliminate. I don't get space in between %artist% and %introduction%.

here is what I would like to achieve in result (see script example):

Amnesia in Ibiza, Spain.
@best ever

Thank you!

Archive.zip (3.7 KB)

Hey Costa,

If you look in the introduction variable you see there is trailing whitespace.

The regex in the macro doesn't trim it.

You could easily fix that yourself by using the Filter Variable action with the Trim Whitespace option on the introduction variable.

But let's try adjusting the regex:

(?ms)^Title:\n{2}(.+)\n{2}^Artist:\n{2}(.+)\n{2}^Artist Web Name:\n{2}(.+)\n{2}^Introduction:\n{2}(.+?)\n*^Tags:\n{2}(.+)^Tracklist:\n{2}(.+)

-Chris

Super, Regex fixed my issue.
thank you! thank you! thank you!