Welcome Guest

Pages: 1 2
Replacing a pattern with integers starting from 1
SnowdogPostJune 14, 2023, 10:11
Pro
Posts: 279
Registered:
March 15, 2022, 17:12
Hot topicReplacing a pattern with integers starting from 1

As far as I can tell the Roman Numeral action does not attempt to delimit classical components...it just inserts Roman numerals.

But all I want to do is insert integers, based on nothing but the number of tracks selected & a pattern or a replacement.

Is that not essentially the same?

Or am I doing the "thick as a whale omelette" thing again?)

SnowdogPostJune 14, 2023, 15:48
Pro
Posts: 279
Registered:
March 15, 2022, 17:12
Hot topicReplacing a pattern with integers starting from 1

I'm beginning to think that maybe what I want is so painfully simple & built into Yate that you're thinking it must be something more complicated because why on earth would I want an action for THAT?? ๐Ÿ˜†

Another example of what I'm on about would be this... If I wanted the tracks in the screenshot below to be numbered so that they said:

Herr: 01
Herr: 02
through to
Herr: 08

This action would do that, based on the "colon-space" pattern & the number of tracks selected, regardless of the fact that the actual Track numbers go from 18-25.

(Now tell me I can already do that in Yate by going x, y & z. ๐Ÿ™‚

Image

2MR2PostJune 14, 2023, 16:14
Avatar photo
Administrator
Posts: 2085
Registered:
August 23, 2012, 19:27
Hot topicReplacing a pattern with integers starting from 1

It has to be an action. You can append the track number by using the Multi Field Editor's Set/Append function. Forcing a start from 1 would be tricky and convoluted. Padding the number to two digits is just not directly possible.

You can do it in an action as follows:

Get Property File Index -> Variable 0
Increment Variable 0
Format variable 0 as integer padded to 2 digits
Append "ยท\v0" to the Title field

The Get Property statement gets each file's index into track variable 0. The selected files have indexes from 0, 1, 2, ...
The Increment statement adds 1 to each track variable 0
The Format Numeric (3rd) statement pads each track variable 2 to two digits
The Append statement appends a space and track variable 0 (backslash v0) to the Title field

I've uploaded the action to https://2manyrobots.com/actions/Append-Incremental-Indexes-to-Title.zip

This one should be easy to duplicate and modify ๐Ÿ™‚

SnowdogPostJune 15, 2023, 03:51
Pro
Posts: 279
Registered:
March 15, 2022, 17:12
Hot topicReplacing a pattern with integers starting from 1

Haha! I'm really am not very good at explaining things.

And I can see exactly how I caused this particular confusion.

In the last example, I was thinking of it in terms of following a pattern (colon-space) to illustrate its independence from the Track numbering, rather than appending.

So, I ran it, expecting a prompt for the pattern/replace but, as you can see from the screenshot below, it has literally appended the numbers rather than replaced the 00.

The numbering is now correct, starting at 01 & ending, in this instance, at 63. It's just that I need to tell it where to put the numbering (pattern or replace) rather than to append it. (In this instance, that would be replacing the 00. Usually it would follow a pattern, the way the Roman Numerals one does.

I really appreciate your patience. It's so frustrating giving an example that I think is crystal clear & realising I've just been a complete doofus!

Image
Image

SnowdogPostJune 15, 2023, 03:57
Pro
Posts: 279
Registered:
March 15, 2022, 17:12
Hot topicReplacing a pattern with integers starting from 1

Perhaps my opening request should simply have been, can we make the Roman Numerals one create integers instead? lol

(I had a look before I asked this question but, unlike some of the actions, I couldn't see how to edit it.)

2MR2PostJune 15, 2023, 08:13
Avatar photo
Administrator
Posts: 2085
Registered:
August 23, 2012, 19:27
Hot topicReplacing a pattern with integers starting from 1

There is no need to modify the Insert Roman Numeral... actions. The Roman Numeral actions look for a pattern or simply a : and inserts a Roman numeral.

The Insert Track Numbers in Title action, when updated to v1.1 covers all of these scenarios. In case your browser is caching the old download I've copied it to a new link:

https://2manyrobots.com/actions/Insert-Track-Numbers-in-Title-v1_1.zip

The source pattern can be replaced or it can be used as an insertion point. When used as an insertion point you do not have to manually create the 00s. You would simply use the preceding text as the pattern and select Insert After as the insert mode.

In cases where you have multiple discs where the track number can be used as is, simply select as many of them as you can and use Copy from Field as the Track value. In cases where a work spans two or more discs, select a single work (across all discs) and select From 1 as the Track value. By selecting slices of the available files and running the action with the appropriate settings, you can get the modifications done.

After specifying the pattern, the settings in the screen shot will be identical to a modified Roman Numerals... set of actions.

Image

SnowdogPostJune 15, 2023, 08:32
Pro
Posts: 279
Registered:
March 15, 2022, 17:12
Hot topicReplacing a pattern with integers starting from 1

Look at that!! He shoots, he scores!!

Thanks so much & apologies for the runaround!

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