Welcome Guest

Pages: 1 2
Pasting a track list text file into the "title" column
SnowdogPostJune 10, 2022, 06:51
Pro
Posts: 279
Registered:
March 15, 2022, 17:12
Normal topicPasting a track list text file into the "title" column

Yep. As the title suggests, I've ripped a 4-disc set that is unrecognised by the ripping software & therefore has no track names.

Roon does, however, seem to recognise it, so I've taken screen-shots from Roon, converted them to text using an online OCR & have made a text file of the track list.

Now all I need to do is get the text file into Yate.

It's probably very straightforward, but I've had a look around & can't see what I need to do.
Image
Image

2MR2PostJune 10, 2022, 11:52
Avatar photo
Administrator
Posts: 2085
Registered:
August 23, 2012, 19:27
Normal topicPasting a track list text file into the "title" column

There is an action on the resource web page named Generic Text Importer designed to handle the importing of text from a file ... or the clipboard

I cleaned it up and updated it as it hasn't been looked at in about two years. I've included a simple File to Tag template named Title with the action.

The action is first in the action list on the resource web page.

When prompted select the FTT template named Title. The next panel will ask if the number of lines is correct....1 is correct.

SnowdogPostJune 10, 2022, 13:37
Pro
Posts: 279
Registered:
March 15, 2022, 17:12
Normal topicPasting a track list text file into the "title" column

Perfect, thanks!

SnowdogPostJune 11, 2022, 06:12
Pro
Posts: 279
Registered:
March 15, 2022, 17:12
Normal topicPasting a track list text file into the "title" column

How might this action be amended so that I could either type in the particular column heading that I want to paste into (in this case "Artist") or have "Artist" (on its own) added as one of the options.

The action appears to be a million lines long!

2MR2PostJune 11, 2022, 06:54
Avatar photo
Administrator
Posts: 2085
Registered:
August 23, 2012, 19:27
Normal topicPasting a track list text file into the "title" column

The action need not be modified to support any fixed pattern text input. There is no code to specifically assign Title or any other combination of fields.

The action only has one input option ... a File to Tag template. The template visually describes the layout of the text to be read from a file or the clipboard.

File to Tag templates are defined in Preferences - File to Tag. Typically they are used to extract metadata from a filename. They have been expanded to allow for \n (newline) and \- (tab) escape sequences so that multi line input can be processed.

The bottom line is that you have to define the template which describes the formatting of your text. The action reads the template and uses it assign the text components to the appropriate fields.

While the action typically associates one text record linearly against files it can also extract a file path and use to make the associations. This is done by using a (Variable 0) token in the template to define the location of the file path. If you want to assign data linearly to the selected files, you never have to use the construct.

Here's a sample template which is multiline:

❨Title❩\n❨Artist❩\n❨Genre❩·--·❨Year❩

It specifies a three line record. Line 1 is the Title; line 2 the Artist; line 3 the Genre separated from the Year by a 'space dash dash space' sequence.

You can read about how the action works by right clicking on it in the Action Manager and clicking on Resource Documentation.

File to Tag templates have online help available within the token editor.

I cleaned up the action twice yesterday so you might want to do a Yate>Check for Action Updates. You should also install Yate v6.10.2.1 which was released yesterday. Do a Yate>Check for Application Updates.

SnowdogPostJune 11, 2022, 12:39
Pro
Posts: 279
Registered:
March 15, 2022, 17:12
Normal topicPasting a track list text file into the

Okay. Both updates run & latest version installed.

So I went to the File To Tag preferences & added "Artist" with an (Artist) token.

It looks exactly the same to me as the Title one that simply has (Title) as the token.

When I select "artist" at the point of adding the text file - either from the clipboard or from a file - it doesn't add the type the same way that it does if I select the Title option & add the track list.

The artist column remains blank.

So where am I going wrong? 😳 😳

Image

Image

Image

2MR2PostJune 11, 2022, 14:56
Avatar photo
Administrator
Posts: 2085
Registered:
August 23, 2012, 19:27
Normal topicPasting a track list text file into the "title" column

Oops .. entirely my fault. At the last minute I decided to rename a few named variables to something that made sense and I messed up the change. 😥

Do a Yate>Check for Action Updates and you'll get v4.1 of the action.

Sorry.

SnowdogPostJune 11, 2022, 19:14
Pro
Posts: 279
Registered:
March 15, 2022, 17:12
Normal topicPasting a track list text file into the

Okay. I'm sure that I could work around this but I thought I'd just let you know that, having updated the actions, I now have this happening...

Firstly, I now have two "generic text importer" actions. (First screenshot)

Secondly, whichever one I run, I get this response. (Second screenshot)

Image

Image

2MR2PostJune 11, 2022, 20:49
Avatar photo
Administrator
Posts: 2085
Registered:
August 23, 2012, 19:27
Normal topicPasting a track list text file into the "title" column

Yes, you have two because I got myself into a scenario where the action wouldn't update correctly because all of the actions from the pre v4.0 action no longer exist in the download. I create the dummy action, labelled with (Main) to get around the issue. The (main) action simply calls the non (Main) action. Once everyone updates to the latest version I can get around the issue and automatically delete (Main).

Yate cannot run an action without having selected files. You can specify that an action can run without selected files in which case Yate will automatically supply a single dummy file so that the interpreter can execute.

The error message says it all. You have to select the files that you want Yate to manipulate with the action. You can automatically have the action select all loaded files by going to the Action Manager, highlighting the action and check the checkbox in the All Files column. If you do that all loaded files will be selected when the action starts.

2MR2PostJune 11, 2022, 22:29
Avatar photo
Administrator
Posts: 2085
Registered:
August 23, 2012, 19:27
Normal topicPasting a track list text file into the "title" column

If you go to the Action Manager you can hide the (Main) variant by selecting it and checking the checkbox in the Hidden column.

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