Solved Replace a character with JMTE
#1
Hi,

I carefully read https://www.tinymediamanager.org/docs/jmte but I don't know how to use it to replace apostrophe(s) with a "_" in the movie name

Thanks for your help !!!
#2
modifying the content of a token is only possible with renderers - and there is no renderer for such a task yet.. let me think if I can find a usable solution for that problem
tinyMediaManager - THE media manager of your choice - available for Windows, macOS and Linux
Help us translate tinyMediaManager at Weblate | Translations at 66%
Found a bug or want to submit a feature request? Contact us at GitLab
#3
(2020-04-09, 08:19)mlaggner Wrote: modifying the content of a token is only possible with renderers - and there is no renderer for such a task yet.. let me think if I can find a usable solution for that problem

THANKS mlaggner for taking my request into account

Is it possible to create a keyboard shortcut for the function "create an offline movie" ?

Kind Regards
#4
Hi mlaggner

Are there any solutions to my questions :
  • Replace a character with JMTE (" ' " by " _ " ; "ä" by "a" (and not "ae") ...) ? 
  • Create a keyboard shortcut for the function "create an offline movie" ?

Thanks for your help !!!
#5
Yes, it would be great if we can use regex replace for export/rename command.
For now I am running search & replace several times with a text editor after exporting to address such issues.
#6
the problem here is that we may need a lookup table to search/replace single characters (or even multiple characters).. you can only pass a small amount of parameters to a renderer and only attach one renderer to a token in JMTE.

so the approach with regex would result in a really huge regexp (if possible to do all replacements in a single regex!) and with a lookup table, we need to implement some sort of configuration for the map..
we also use JMTE in 4 different areas

- movie rename
- movie export
- tv show rename
- tv show export

should we use the lookup tables everywhere or maintain them differently? should we even support multiple lookup tables for every area?

so for now I do not see any _usable/implementable_ solution here.. Input welcome Wink
tinyMediaManager - THE media manager of your choice - available for Windows, macOS and Linux
Help us translate tinyMediaManager at Weblate | Translations at 66%
Found a bug or want to submit a feature request? Contact us at GitLab
#7
Tongue 
Thanks for your answer, even negative  Wink

I understand that JMTE or regexp may not be appropriate ...

On the other hand, I do not understand why the apostrophe could not be proposed to be treated in the parameters, such as spaces or colons
(for colons, they are almost always framed by spaces : it would therefore be better replace " : " by "-" with capitalizing the 1st letter following "-")

Ditto for the conversion ä, ë, ï, ö and ü : propose by parameters, the version without "e" attached would by possible, not ?

Finally, create a keyboard shortcut for the function "create an offline movie" should also be possible ?
#8
(2021-01-03, 12:23)mlaggner Wrote: a lookup table to search/replace single characters (or even multiple characters).. you can only pass a small amount of parameters to a renderer and only attach one renderer to a token in JMTE.

That would be wonderful! Forget about the regex and they should be applied to all four areas as the code will specify which renderer will be used where when needed.
#9
I have some good news here: I've created a custom replacement renderer which can be customized totally free:

append ";replace(filename)" to each field where you want to replace special characters. "filename" points to a csv file inside the data folder - so you can use different replacement sets in different areas/for different fields. I'll write a blog post about that soon Wink
tinyMediaManager - THE media manager of your choice - available for Windows, macOS and Linux
Help us translate tinyMediaManager at Weblate | Translations at 66%
Found a bug or want to submit a feature request? Contact us at GitLab
#10
Great! Sounds really easy to use for various purposes.
#11
GREAT !!!
This function should be applied BEFORE the filters proposed in parameters
(in order to transform the ä, ë, ï and ö by a, e, i and o THEN apply the conversion of the other characters via the parameters filters)

Could you take the opportunity to create a keyboard shortcut for the function "create an offline movie" ?

THANK YOU for taking my request into account 👍👍👍
#12
official post: https://www.tinymediamanager.org/blog/jm...-renderer/

yes, renderer are always first (they belong directly to the _field_ - the ASCII replacement is being done at the end on the whole result.
yes your shortcut is already there Wink... in v4.1 Tongue
tinyMediaManager - THE media manager of your choice - available for Windows, macOS and Linux
Help us translate tinyMediaManager at Weblate | Translations at 66%
Found a bug or want to submit a feature request? Contact us at GitLab
#13
YESSSS : it works well  Big Grin

.. EXCEPT " : " which I would like to transform into "-"
ALL my attempts failed : "_:_"   OR   " :" and ": " after   OR   "_-_"
(because line just after, I have ":" replaced by "-" which works fine)
(and all my tests with/without quotes, before/after the single colon)

Finaly, is it possible to replace all upper case letters in lower case EXCEPT :
1/ at the start of the string ?
2/ after a point or a colon (both preceded or not by a space) ?

Thanks for the shortcut Wink
#14
(2021-01-07, 19:20)VERSEAU44 Wrote: .. EXCEPT " : " which I would like to transform into "-"
ALL my attempts failed : "_:_"   OR   " :" and ": " after   OR   "_-_"
(because line just after, I have ":" replaced by "-" which works fine)
(and all my tests with/without quotes, before/after the single colon)

I think that's because it's pre-converted by colon setting under renamer advanced options.
If you select underscore for that setting, then

Code:
" _ ",-
will work.
#15
YESSSSSS ... fine 👍👍👍

Always for renamer : is there a way to replace all uppercase letters in lowercase EXCEPT :
1/ at the start of the string ?
2/ after a point or a colon (both preceded or not by a space) ?

THANKS for your help !

Logout Mark Read Team Forum Stats Members Help
Replace a character with JMTE0