Welcome Guest

Pages: 1
Adding Roman numerals sequentially
SnowdogPostSeptember 18, 2022, 16:10
Pro
Posts: 279
Registered:
March 15, 2022, 17:12
Normal topicAdding Roman numerals sequentially

I find myself having to add Roman numerals to a list, usually after a colon (as in the screen shot where each line should read "Op.33: I. ", "Op.33: II. " etc.).

I'm just wondering if there's an easy way to do this?

(PS: I already posted this without the screen shot but it didn't show up so if you see another one of these, it can be removed.)

Image

2MR2PostSeptember 18, 2022, 17:32
Avatar photo
Administrator
Posts: 2084
Registered:
August 23, 2012, 19:27
Normal topicAdding Roman numerals sequentially

Yate supports converting to and from Roman Numerals. I assume that's the Title field I'm looking at in the screenshot.

Install the file at: https://2manyrobots.com/actions/Insert-Roman-Numeral.zip

Two user actions will be installed:

Insert Roman Numeral after a : in Title Field does as the name implies.

Insert Roman Numeral after a Pattern in Title Field will prompt you for a space and alphabetic case significant pattern which will be used as opposed to a colon.

Note that the actions are not smart and do not attempt to determine if there already is a roman numeral in place.
Both actions modify the Title field. If your screenshot was a list of filenames and you wanted the filename directly manipulated, I'll have to modify the actions.

SnowdogPostSeptember 18, 2022, 20:04
Pro
Posts: 279
Registered:
March 15, 2022, 17:12
Normal topicAdding Roman numerals sequentially

No, you are correct, it's the title field.

Thanks so much, I'll give them a go & report back.

SnowdogPostSeptember 19, 2022, 08:13
Pro
Posts: 279
Registered:
March 15, 2022, 17:12
Normal topicAdding Roman numerals sequentially

Boom!

Image

SnowdogPostSeptember 19, 2022, 10:24
Pro
Posts: 279
Registered:
March 15, 2022, 17:12
Normal topicAdding Roman numerals sequentially

If I wanted to replace the Arabic numerals with Roman numerals in the following example, is there some kind of expression I can put into the regular pattern in the second action above to achieve this?

Image

2MR2PostSeptember 19, 2022, 11:24
Avatar photo
Administrator
Posts: 2084
Registered:
August 23, 2012, 19:27
Normal topicAdding Roman numerals sequentially

I've updated the actions to work as follows:

If a file's Title field does not contain the 'pattern', ignore it.

If the pattern is followed by {integer}. change it to a Roman numeral. Note that the period after the integer is required.

If the pattern is followed by {Roman numeral}. Capitalize the Roman numeral. Note that the period after the Roman numeral is required.

... otherwise use the index+1 of the file in the list of files as the number to be inserted as a Roman numeral. This is what the previous actions did.

The action names are the same as before. The version number (check in the Action Manager) is 2.

https://2manyrobots.com/actions/Insert-Roman-Numeral-v2.zip

SnowdogPostSeptember 19, 2022, 15:44
Pro
Posts: 279
Registered:
March 15, 2022, 17:12
Normal topicAdding Roman numerals sequentially

Once again that works perfectly, thanks! 🙂

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