Welcome Guest

Pages: 1
Import from Spreadsheet
timpPostMarch 24, 2014, 22:30
Advanced
Posts: 54
Registered:
March 16, 2014, 13:32
Normal topicImport from Spreadsheet

Okay, this one surely must be the one that stumps you! (If not, I'll eat my hat.)

I have 1399 old-time radio tracks that, with Yate's help, are now beautifully capitalized, spaced, renamed, fitted with artwork, and are essentially finished. Took me a while, but it was well worth it! The File Names and Titles are quite simple: File Name "01-Name.mp3" and Title "Name.mp3". Looking good so far!

Here comes the challenge...

I have an Excel spreadsheet that has the date of each file's original airing in the exact order of the track number listed in Yate, and I'd like to append it to the Title field for each track, so that a Title of "Name.mp3" becomes "Name (MM-DD-YY).mp3". To do this I would need to somehow tell Yate to import a column from the Excel spreadsheet and attach it to the end of each Title.

And if I'm going one extra step, there's another column in the Excel file that has the lead actor/actress name, which I would import into the Comment field in Yate.

Tricky? Yes. Impossible? You tell me...

(I told you I was going to try and stump you 😀 )

Whaddya think?
Tim

2MR2PostMarch 24, 2014, 22:59
Avatar photo
Administrator
Posts: 2084
Registered:
August 23, 2012, 19:27
Normal topicRe: Import from Spreadsheet

Well if the Excel spreadsheet has one row in track number order it's pretty easy. First, Yate is not going to directly read the Excel spreadsheet so you'll have to export the two columns that you want to a tab-delimited file. (date and actor/actress). Excel can certainly do this for you.

At this point you'll have a text file with two pieces of information per line, separated by a tab character.

You then load all the tracks which are associated with the file and sort them by track number. There is now a one to one correspondence between the tracks and the rows in the text file.

Using the 'Import Text File' function you can read the entire file, process one row per track and apply the fields to wherever you want.

Why don't you produce the tab-delimited file and either post it here or email me a copy. I'll take a quick look, make sure that it looks okay and get you an action to rip the file. If the produced file has more than the two required fields, don't worry about it. Ignoring data is pretty easy. Just tell me which columns you want to use.

Basically the action will extract one line per track. It'll then split the line in two parts based on the tab separator. The actor/artist will get dumped to the comment field (or Original Artist field?) and the date will be applied to the end of the Title field if you want the data saved in the track tag information. Alternately the rename could be done without modifying the title.

Not too tough 🙂

timpPostMarch 27, 2014, 22:16
Advanced
Posts: 54
Registered:
March 16, 2014, 13:32
Normal topicRe: Import from Spreadsheet

Okay, so I'm ready to eat my hat after hearing I can import from an Excel file, but not quite yet. 🙂

I decided that instead of importing two Excel columns I would keep it simple and create just a single column, tab-delimited (although there's nothing to delimit) file with the date info in the format "[space](YY-MM-DD)". However, when I open Yate, then open the 1399 files to tag, the File>Import function is greyed out. So I'm not sure how to import the Excel text file I created. I'll email you a copy (I assume this is Barry answering?)

Thanks!

2MR2PostMarch 27, 2014, 23:06
Avatar photo
Administrator
Posts: 2084
Registered:
August 23, 2012, 19:27
Normal topicRe: Import from Spreadsheet

I sent you a modified version of your file changing \r to \n. I guess I have to add another escape sequence. 🙂

I've sent you an action. Let me know if it works and I'll post it.

timpPostMarch 28, 2014, 03:21
Advanced
Posts: 54
Registered:
March 16, 2014, 13:32
Normal topicRe: Import from Spreadsheet

My fault for not noticing that the import from file option needed to come from an Action. What you sent me worked perfectly!

Now to find some ketchup for this tasty Bowler... 🙂

frustratedUserPostAugust 30, 2016, 23:33
Newbie
Posts: 1
Registered:
August 31, 2016, 03:28
Normal topicRe: Import from Spreadsheet

WOW. This is the most complicated application I've ever seen. And I've been doing audio editing for 20 years, and been using Photoshop since version 2.

Can someone please explain in plain, non-technical English how to do this, for people without a post-graduate degree in Mp3 Tag Engineering? I have a text file with a column of track numbers and a column of filenames. I want to import it in to tag a folder of mp3s. So.... whosiewhanow? I'm supposed to mail it in for conversion???

2MR2PostAugust 31, 2016, 01:57
Avatar photo
Administrator
Posts: 2084
Registered:
August 23, 2012, 19:27
Normal topicRe: Import from Spreadsheet

There is no single function to handle "I have a text file with a column of track numbers and a column of filenames. I want to import it in to tag a folder of mp3s". There are a multitude of scenarios around reading different text file formats. Things such as links to artwork, filenames or full paths and a very wide selection of possible metadata. Text or CSV or tab delimited format, etc. Yate can handle them all but the action must be constructed from individual building blocks.

Download:

https://2manyrobots.com/actions/ReadTrackNumbersfromFile.zip

Unzip the file and do a Yate>Import Preferences on the ReadTrackNumbersfromFile.plist file. (Alternately you can drag it to the main window's file list area).

After importing, you will have two new actions:

Read Track Numbers from File - Path Method
Read Track Numbers from File - Folder Method

The first action assumes that your text file contains:
track number full path to file

The second assumes that your text file contains:
track number filename.ext

As I don't know what your text file(s) is called, I'm prompting for the file. If the text file always has a standard name and is in the same folder as the files, this can easily be hardcoded. I'm also assuming that your file contains plain text.

To run the first action (Path Method):
Actions require at least one loaded file to run, so load something. Then run the 'Read Track Numbers from File - Path Method' action. You'll be prompted to identify the filename and that's it. If you don't get an error message, everything worked. If the named tracks were the ones loaded before the action ran, you'll have to reload them to see the changes. That's because the scripted loading of files always loads a fresh copy.

To run the second action (Folder Method):
Load the files referenced in the text file. Then run the 'Read Track Numbers from File - Folder Method' action. You'll be prompted to identify the filename and that's it. If you don't get an error message, everything worked. I'm saving the changes in the action. If you'd prefer to review the changes, simply disable the Save statement at the end of the action. (From the context menu).

Both actions are documented.

Now if your text file contains metadata other than just a track number, the action(s) will have to be modified. If that is the case let us know and if you wish we'll modify the action accordingly.

I'm sorry that you're frustrated. The action system is designed to be able to handle pretty much anything that can be thrown at it, but at the end of the day it is programming.

I hope this helps.

stu.farnham@edgeofthep-
alouse.com
PostSeptember 3, 2016, 12:34
Newbie
Posts: 10
Registered:
August 23, 2015, 04:28
Normal topicRe: Import from Spreadsheet

Barry,

I have a similar problem to the one in this thread and am trying to reverse engineer a solution from the actions you wrote. Is there an easy way to correlate the function codes in the XML with function names?

Thanks,

Stu

2MR2PostSeptember 3, 2016, 14:05
Avatar photo
Administrator
Posts: 2084
Registered:
August 23, 2012, 19:27
Normal topicRe: Import from Spreadsheet

I missed the fact that the previous post was in a spreadsheet. I thought it was a plain text file. Regardless reading CSV files in Yate is easy. Simply export the Excel file to a UTF8 (not required but better) CSV file. In fact if your file contains full path references you can automate the metadata applying. Create an Export Set defining the columns and run the special Batch Processor mode: Apply Track Database Metadata Changes.

Reading the XML won't disclose anything above and beyond what you can see in the action editor.

If you want I'll be happy to look at the CSV file for you.

Pages: 1
Mingle Forum by Cartpauj | Version: 1.1.0beta | Page loaded in: 0.026 seconds.