Please take a minute to check our Frequently Asked Questions. Use Search to reveal possible related topics.
Also make sure you've read the Forum Guidelines before posting in this forum.
Feb 22 2012, 10:08
Post
#1
|
|
|
Member Group: Full Members Posts: 14 Joined: 21-November 11 Member No.: 15609 Mp3tag Version: 2.49 |
Hi,
I am successfully exporting my collection details to csv and can bring it into excel. I use | as a deliminator. (The default ; didn't work because too many titles have that too). Some of my tags have multiple entries, typically genre, and use // as separator for them. The exported file seems to drop anything after // in genre so I only get the first genre item in the csv Can I do anything fix this? Thanks Mark This post has been edited by m4rk: Feb 22 2012, 10:08 |
|
|
|
![]() |
Feb 22 2012, 10:42
Post
#2
|
|
![]() Member Group: Full Members Posts: 1571 Joined: 15-March 09 From: Germany Member No.: 9103 Mp3tag Version: 2.50 |
from the help files:
ZITAT $meta(x) returns all values of field x (e.g. $meta(artist)). If multiple values of that field exist, they are separated with ", ". $meta(x,n) returns the nth value of field x (where n starts at 0, e.g. $meta(artist,1)). $meta_sep(x,sep) returns all values of field x (e.g. $meta_sep(artist,; )). If multiple values of that field exist, they are separated with sep. http://help.mp3tag.de/main_scripting.html#metadata This post has been edited by pone: Feb 22 2012, 10:44 |
|
|
|
Feb 22 2012, 11:01
Post
#3
|
|
|
Member Group: Full Members Posts: 14 Joined: 21-November 11 Member No.: 15609 Mp3tag Version: 2.49 |
Hi thanks for that.... looks I need help for the help files!! I have no idea what that all means. It is fun learning though The more I use mp3tag the more I am impressed with it. You can do just about anything but it takes quite a bit learning for a novice and much testing to figure it out. Thanks, I think that has pointed me in the right direction |
|
|
|
Feb 22 2012, 11:14
Post
#4
|
|
![]() Member Group: Full Members Posts: 1571 Joined: 15-March 09 From: Germany Member No.: 9103 Mp3tag Version: 2.50 |
When you are exporting your tags, you are using an export script.
Open that script and replace all instances of %genre% with $meta(genre) You have to do this with all tag fields where you have multivalue tags. This post has been edited by pone: Feb 22 2012, 11:24 |
|
|
|
Feb 22 2012, 12:03
Post
#5
|
|
|
Member Group: Full Members Posts: 14 Joined: 21-November 11 Member No.: 15609 Mp3tag Version: 2.49 |
When you are exporting your tags, you are using an export script. Open that script and replace all instances of %genre% with $meta(genre) You have to do this with all tag fields where you have multivalue tags. Great, that tip helps a lot. I had found the export scripts and made a simple change. I changed the default delimiter and saved it as a new script but I must admit to being a bit clueless as to how they worked. Is there a help section to explain how the looping part works? I didn't see it in 'scripting' help section? Mark This post has been edited by m4rk: Feb 22 2012, 12:43 |
|
|
|
Feb 22 2012, 12:29
Post
#6
|
|
![]() Member Group: Full Members Posts: 1571 Joined: 15-March 09 From: Germany Member No.: 9103 Mp3tag Version: 2.50 |
Is there a help section to explain how the looping part works? I didn't see it in 'scripting' help section? yes, in the export help section http://help.mp3tag.de/options_export.html#syntax : ZITAT $loop(%fieldname%) starts a new loop. The loop data is sorted by the fieldname. $loopend() ends a loop. If you want to limit the loop output to a certain number of entries, simply use $loop(%fieldname%,num). This is useful to eliminate duplicate records (num=1). So if you have something like QUELLTEXT $loop(%_filename_ext%)%title%;%artist%;%album%; $loopend() the loop writes %title%;%artist%;%album%; + linebreak for every new %_filename_ext%. Whereas this loop QUELLTEXT $loop(%album%)%albumartist%;%album%;%year% $loopend() would write %albumartist%;%album%;%year% + linebreak for every new %album%. So it would skip all files with the same %album% value after writing the values of the first file. This post has been edited by pone: Feb 22 2012, 12:33 |
|
|
|
Feb 22 2012, 12:51
Post
#7
|
|
|
Member Group: Full Members Posts: 14 Joined: 21-November 11 Member No.: 15609 Mp3tag Version: 2.49 |
yes, in the export help section http://help.mp3tag.de/options_export.html#syntax : So if you have something like CODE $loop(%_filename_ext%)%title%;%artist%;%album%; $loopend() the loop writes %title%;%artist%;%album%; + linebreak for every new %_filename_ext%. Whereas this loop CODE $loop(%album%)%albumartist%;%album%;%year% $loopend() would write %albumartist%;%album%;%year% + linebreak for every new %album%. So it would skip all files with the same %album% value after writing the values of the first file. Again very useful info. I was having to use Excel Office 2007 and the 'remove duplicates' function to create a simple list of albums and their genres. |
|
|
|
Feb 22 2012, 13:17
Post
#8
|
|
|
Member Group: Full Members Posts: 14 Joined: 21-November 11 Member No.: 15609 Mp3tag Version: 2.49 |
Again very useful info. I was having to use Excel Office 2007 and the 'remove duplicates' function to create a simple list of albums and their genres. Maybe I am pushing my luck too far today... $filename(csv,utf-16)|Album|Genre| $loop(%album%)|%album%|$meta_sep(genre,\\)| $loopend() I was hoping this would produce a single line per album but its giving all tracks for the same album!! |
|
|
|
Feb 22 2012, 13:40
Post
#9
|
|
![]() Member Group: Full Members Posts: 1571 Joined: 15-March 09 From: Germany Member No.: 9103 Mp3tag Version: 2.50 |
Maybe I am pushing my luck too far today... $filename(csv,utf-16)|Album|Genre| $loop(%album%)|%album%|$meta_sep(genre,\\)| $loopend() I was hoping this would produce a single line per album but its giving all tracks for the same album!! Looks like I forgot something in my examples. $loop(%album%) only sorts your files by %album% $loop(%album%,1) sorts your files by %album% and does only write one entrie per %album%. So try this: $filename(csv,utf-16)|Album|Genre| $loop(%album%,1)|%album%|$meta_sep(genre,\\)| $loopend() |
|
|
|
m4rk Export to csv problem with multiple entries in tags Feb 22 2012, 10:08
m4rk QUOTE (pone @ Feb 22 2012, 12:29) yes, in... Feb 22 2012, 12:45
m4rk QUOTE (pone @ Feb 22 2012, 13:40) Looks l... Feb 22 2012, 13:54![]() ![]() |
|
Lo-Fi Version | Time is now: 20th May 2013 - 23:32 |