Suggestion: Add comments to action types

For example in

Replace with regular expression

we have

Field:
Regular expression:
Replace matches with:

It would be very nice if there was

Comments:

So we could remember what is all about after coming back from a long time.

Looks a little like this post:

TBH: you can only save an action in an action group if you want to re-use it. And as you have to name the action group, it should be possible to give it a name that reveals the purpose.
If you use an action as an "Action (quick)", then it is gone after use - and so would be the comment.
Here, the only way out would be to store the parameters in a separate text file where you take all the liberties and add comments and other information.

If you have an action group with several actions, then I still think that the name of the action group should be enough as then only the order and types of actions make up the full function.
So I would prefer a comment for the whole action group that explains to me what it does - but that is already in the name.

I have a little text file where I store regular expressions and special filters, all with a comment. The good thing about that: I can use the search function in the text editor to find something specific.
So, until there are comments, perhaps the extra text file bridges the gap.

If you name the action group gives you a general idea (for me nothing unless you wright a poem )

but what if you have several action types like this:

%TITLE% $regexp(%ARTIST%,'(^.+?)(\s*[[({<]?\s*\bf(ea)?t(uring)?\b.?\s*(((\w|\W)(?=({1}))|(\w|\W)))(.+$)?','$2',1)

or more complex.

Storing the parameters in a separate text file(s) is inevitability, but i think it would be way better having comments in hand (even with a pop up but i would prefer a multi line re sizable column)

Changing, moving, repairing, reading, testing and so on with separate text file(s) (and with a couple of programs open) is not a good solution for big projects or complex scripting when you have to sync both. It's a kind of brain melting.

As an example i wanted ( and i started ) to translate greeklish to greek. But after i left it aside for awhile and then came back to it with my notes messed up (and the momentum lost) ........ oh no, i had to read them and test them all from the beginning

I gave it up.

I'm not saying that the program it's not good, the opposite, it's the best out there.

One possible way is to break down such complex formulas in several smaller, much easier manageable parts. It doesn't help to compress multiple steps in to one extremely hard to read formula. They are not faster or "better" in any way.

And if a problem requires it?

OK!

(?# comment) will do the trick for now!!!

https://www.regular-expressions.info/freespacing.html

I doubt, that some inserted (?#comment) help to understand your RegEx above...

Feel free to convince me.

Make a new

Format value

Field: TITLE

Format string:

%TITLE% $regexp(%ARTIST%,'(?# FIND ALL AFTER FT - FEAT - FEATURE - FEATURING UNTILL ONE OF THE SPECIAL CHARACTERS LIKE PARENTHESIS OR THE END OF LINE)(^.+?)(\s*[[({<]?\s*\bf(ea)?t(uring)?\b.?\s*(((\w|\W)(?=({1}))|(\w|\W)))(.+$)?','$2',1)

Doesn't your eyes and brain thank you?

I know what you mean. But if you add this comments for all the used parts in your RegEx, including the mysterious (((\w|\W)*(?=({1}))|(\w|\W))) I'm still not convinced about the usefullness of such inline-comments.

As long as it helps to solve YOUR request,you should use it.

Don't look at the code itself. It's not finished yet.

The problem was the comments.

The idea about ability for a built in comments for actions have been floating around

Very nice link

but for me i think it has 3 problems

  1. The comments goes at the end ( for a very long script this is not good )
  2. Doesn't seem to work for replace with regular expressions ( which is what i want most, but i might be wrong )
  3. The [ ] that can go in front doesn't accept all characters like in (?#)

For example in format value:

you can't put this:
[blah [ blah ] blah]%artist%

but you can put this:
$regexp(?#blah [ blah ] blah)%artist%

Anyway i am happy to know there is one more solution.

An example of how much easier is to read - understand, or use it as a guide after long time of no use. At least for me.

1 Like