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.
![]() ![]() |
Aug 15 2012, 23:07
Post
#1
|
|
|
Member Group: Full Members Posts: 81 Joined: 14-September 10 From: Providence RI Member No.: 12931 Mp3tag Version: 2.52 |
Couple of things, first, I'm having an issue when I export data a second time to the same file, it is adding a funky "y" to the prepended data.
Second, is there way to prevent the fixed constants from being exported more than once? Row 1 is the master row for all the other rows 2>infinity.....I don't need the row one repeated over and over......is there a way to trap on that if exists don't append? I only want row 1 once, and all append data in sequential row below. I've attached the images here for issue 1....hopefully someone can help with issue 2. thanks! ![]() ![]() |
|
|
|
Aug 16 2012, 06:11
Post
#2
|
|
![]() Member Group: Full Members Posts: 3159 Joined: 9-December 09 From: Norddeutschland / Northern Germany Member No.: 11458 Mp3tag Version: 2.55a |
ZITAT Second, is there way to prevent the fixed constants from being exported more than once? You would need a second report definition that does not have the line with output text before the $loop statement. -------------------- 42 - wie war die Frage / what was the question / comment était la question
|
|
|
|
Aug 16 2012, 07:12
Post
#3
|
|
![]() Member Group: Full Members Posts: 4129 Joined: 26-May 06 From: Wuppertal, Germany, Planet Earth Member No.: 3194 Mp3tag Version: 2.54 |
Couple of things, first, I'm having an issue when I export data a second time to the same file, it is adding a funky "y" to the prepended data. ... Second, is there way to prevent the fixed constants from being exported more than once? ... I do not know if I understand the problem in the right way. You should show us your report script. At 1. Perhaps the one and only leading BOM has been added again when appending further text to an existing text file? At 2. See manual how the function $loop is explained. There is a parameter, which controls whether the loop should be run only once resp. as many as items exists. Loops can be applied nested. DD.20120816.0812.CEST -------------------- * Beyond that, don't ask, when you don't know what to do with the answer. *
♥ home is where the heart is ♥ |
|
|
|
Aug 16 2012, 13:15
Post
#4
|
|
|
Member Group: Full Members Posts: 81 Joined: 14-September 10 From: Providence RI Member No.: 12931 Mp3tag Version: 2.52 |
The image shows the "Y" with 2 dots over it when the I do a second export and MP3TAG is appending to the document. I don't think that should be there as it's not part of my tag structures. I will take another look at the $loop features and see if I can figure out the "only export the first line once issue"....right now its a continuous loop for all files. Here is the export code:
CODE $filename(csv,utf-8)product_sku product_name category_path product_desc published product_s_desc product_price product_override_price max_order_level min_order_level product_in_stock file_url file_url_thumb product_params $loop(%_path%)$replace($left(%ARTIST%,1)$left(%initialkey%,2)$left(%BPM%,2)$left(%ALBUM%,3)$left(%YEAR%,4)$left(%TITLE%,4)$num(%_counter%,6), ,X,',',X,'(',X,')',X,'%',X,'',X,.,X,-,X,'$',X,!,X,#,X,&,X,~,X,^,X,|,X) %artist%--%title% $if($isdigit($left(%ARTIST%,1)),ABP Alphabetical Music List/NUMBERS,ABP Alphabetical Music List/$upper($left(%ARTIST%,1))) %artist%--%title%--%album%--%year% (Artist, Title, Album, Year) 1 %year% 0.00001 0.00001 5 1 10000000 images/stories/virtuemart/product/$lower($replace(%artist%-%title%-%album%-%track%-$left(%ARTIST%,1)$left(%initialkey%,2)$left(%BPM%,2)$left(%ALBUM%,3)$left(%YEAR%,4)$left(%TITLE%,4),$,S,#,X,'%', percent,!,X,?,X,", inch,:,X,/,X,\,X)-FRONT COVER.jpg) images/stories/virtuemart/product/$lower($replace(%artist%-%title%-%album%-%track%-$left(%ARTIST%,1)$left(%initialkey%,2)$left(%BPM%,2)$left(%ALBUM%,3)$left(%YEAR%,4)$left(%TITLE%,4),$,S,#,X,'%', percent,!,X,?,X,", inch,:,X,/,X,\,X)-FRONT COVER_90x90.jpg) min_order_level="0"|max_order_level="0"| $loopend() |
|
|
|
Aug 16 2012, 13:23
Post
#5
|
|
|
Member Group: Full Members Posts: 81 Joined: 14-September 10 From: Providence RI Member No.: 12931 Mp3tag Version: 2.52 |
I just want to add, while this may look like I am reselling MP3 files through an online store I am not. I am using virtualmart for Joomla! I can provide info for the site login if you need to see for yourself. I've hacked the crap out of it to be an online playlist generator......nothing more.
Thanks |
|
|
|
Aug 21 2012, 18:40
Post
#6
|
|
|
Member Group: Full Members Posts: 81 Joined: 14-September 10 From: Providence RI Member No.: 12931 Mp3tag Version: 2.52 |
|
|
|
|
Aug 21 2012, 19:37
Post
#7
|
|
![]() Member Group: Full Members Posts: 3159 Joined: 9-December 09 From: Norddeutschland / Northern Germany Member No.: 11458 Mp3tag Version: 2.55a |
Do you happen to have an example of this? If you have a look at the example you supplied in post #4 CODE $filename(csv,utf-8)product_sku product_name category_path product_desc published product_s_desc product_price product_override_price max_order_level min_order_level product_in_stock file_url file_url_thumb product_params $loop(%_path%)$replace($left(%ARTIST%,1)$left(%initi ..... you simply leave out the part between filename and $loop: CODE $filename(csv,utf-8) $loop(%_path%)$replace($left(%ARTIST%,1)$left(%initi.... as that line that I now left out is nothing but plain text to supply the column headers. -------------------- 42 - wie war die Frage / what was the question / comment était la question
|
|
|
|
Aug 21 2012, 20:55
Post
#8
|
|
|
Member Group: Full Members Posts: 81 Joined: 14-September 10 From: Providence RI Member No.: 12931 Mp3tag Version: 2.52 |
I actually need the first row for the delimiter import. So I'd have to then insert a row and them try to paste those values in.
Is there a way for the loop to look and see if there is data in the first cell and if so, skip that initial population, and then just do a second loop and append the data? My biggest concern with the append part is the "Y" with the two dots over it.....that is repeatable on every append of the document. This post has been edited by kittmaster: Aug 21 2012, 20:56 |
|
|
|
Aug 21 2012, 21:12
Post
#9
|
|
![]() Member Group: Full Members Posts: 3159 Joined: 9-December 09 From: Norddeutschland / Northern Germany Member No.: 11458 Mp3tag Version: 2.55a |
I actually need the first row for the delimiter import.... So I'd have to then insert a row and them try to paste those values in. The delimiter is also between the variables - the text at the beginning could be left out if you want to append. Is there a way for the loop to look and see if there is data in the first cell and if so, skip that initial population, and then just do a second loop and append the data? Either you are in the loop or not. Any export does not know anything about other exports you have done before. My biggest concern with the append part is the "Y" with the two dots over it.....that is repeatable on every append of the document. You should look at the text document you have created as it looks to me as if the definition has an incomplete line. if you enter a $chr(13)$chr(10) after the last $loop() then you might get an extra line but I hope the "y" will disappear. This post has been edited by ohrenkino: Aug 21 2012, 21:13 -------------------- 42 - wie war die Frage / what was the question / comment était la question
|
|
|
|
Aug 21 2012, 21:28
Post
#10
|
|
![]() Moderator Group: Moderators Posts: 5506 Joined: 4-September 03 From: Germany Member No.: 201 Mp3tag Version: 2.55a |
My biggest concern with the append part is the "Y" with the two dots over it.....that is repeatable on every append of the document. This looks like a byte order marker. You can disable it at Options > Export You need it when a new file is written to indicate the text encoding, but when you append data it should be omitted. Unfortunately the program doesn't do it automatically. -------------------- |
|
|
|
Aug 22 2012, 02:37
Post
#11
|
|
|
Member Group: Full Members Posts: 81 Joined: 14-September 10 From: Providence RI Member No.: 12931 Mp3tag Version: 2.52 |
This looks like a byte order marker. You can disable it at Options > Export You need it when a new file is written to indicate the text encoding, but when you append data it should be omitted. Unfortunately the program doesn't do it automatically. Turning off write BOM did the trick to get rid of the Y issue Thanks! |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 23rd May 2013 - 16:02 |