Script to rename from Cyrillic to English
Script to rename from Cyrillic to English
Hello,
Thank you in advance to everyone who will help me with this. Little bit of a prologue: I have a bunch (over 200) of video files whose file names are in Russian. I also use Nero (please don't try to discourage me) to burn stuff onto DVDs but unfortunately Nero isn't Unicode so the filenames are all in weird characters. Therefore, I need them renamed from Cyrillic characters into Latin ones. This is a process that's often called transliteration (http://en.wikipedia.org/wiki/Translit). As you can see from the info link there are set associations between Cyrillic characters and Latin ones.
What I'm wondering is if there is a way to create a matrix of associations between Cyrillic characters and Latin characters and apply it to rename the batch of files?
Thanks again!
Thank you in advance to everyone who will help me with this. Little bit of a prologue: I have a bunch (over 200) of video files whose file names are in Russian. I also use Nero (please don't try to discourage me) to burn stuff onto DVDs but unfortunately Nero isn't Unicode so the filenames are all in weird characters. Therefore, I need them renamed from Cyrillic characters into Latin ones. This is a process that's often called transliteration (http://en.wikipedia.org/wiki/Translit). As you can see from the info link there are set associations between Cyrillic characters and Latin ones.
What I'm wondering is if there is a way to create a matrix of associations between Cyrillic characters and Latin characters and apply it to rename the batch of files?
Thanks again!
-
- Site Admin
- Posts: 60602
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Script to rename from Cyrillic to English
Interesting task. But there should be specialized software to do this, or?
FAQ | XY News RSS | XY Twitter
-
- Site Admin
- Posts: 60602
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Actually, the very next version will make some progress here!infimum wrote:Writing in unicode characters (I am assuming you are not using Russian Windows) are poorly supported at the moment. I doubt this is possible. I am happy to be proved wrong, though.
FAQ | XY News RSS | XY Twitter
Re: Script to rename from Cyrillic to English
I am not aware of specialist software that does it. If anyone knows then please let me know. The only way I get by these days is using a webpage that has JavaScript text area which on the fly converts from english characters into russian ones (reverse transliteration so to speak). Then I just copy/paste text where i need it. But for over 200 files? That's a headache I don't want to imagine...admin wrote:Interesting task. But there should be specialized software to do this, or?
ivan, there you go.
http://www.den4b.com/downloads.php?project=ReNamer
http://www.den4b.com/downloads.php?project=ReNamer
Thanks a lot! Will definitely give this a go! However, I don't think that program allows the editing of rules of what Cyrillic symbols are substituted by what Latin ones. Having a script that would do it would be great because it would offer more flexibility.infimum wrote:ivan, there you go.
http://www.den4b.com/downloads.php?project=ReNamer
Aah, I noticed that translit rules are stored in TXT files and that way I can edit them. My bad and thanks a bunch. Though it's still a challenge to create a script to do it...*imagines being able to press one button and have it done for you*infimum wrote:Are you sure you checked "Click here to add a rule" >"Translit"?ivan wrote:I don't think that program allows the editing of rules of what Cyrillic symbols are substituted by what Latin ones.
-
- Site Admin
- Posts: 60602
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
The next version can do it even without a script!ivan wrote:Though it's still a challenge to create a script to do it...*imagines being able to press one button and have it done for you*
I leave it to you to find out how...
FAQ | XY News RSS | XY Twitter
-
- Site Admin
- Posts: 60602
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
I mean the one that comes up in a few minutes...ivan wrote:Do you mean the next full stable release or your daily beta ones? In either case...*gets excited and giggles like a little girl*
You can do something in the meantime. Create 2 dummy files named as you intend to map the charsets:
abcdefghijklmnopqrstuvwxyz.txt
... and the same with the cyrillic characters (use Explorer for that... )
There's only monographemic (1:1) transliteration, hope that's enough for now... other (1:n) will be possible as well, but a bit harder to script.
FAQ | XY News RSS | XY Twitter
Good effort. It's a start.
The problem I see is that Russian (my native language) is much more phonetic than English is. What I'm trying to say is that often to create the same sound as you would pronouncing one letter in English you'd need 2 Russian letters and vice versa.
Therefore, the only way I see how this could work is by "brute-forcing" aka storing all possible combinations of 1-3 English letters that result in a Russian letter and reverse-apply the principle in a renaming script. It's a challenge indeed...
The problem I see is that Russian (my native language) is much more phonetic than English is. What I'm trying to say is that often to create the same sound as you would pronouncing one letter in English you'd need 2 Russian letters and vice versa.
Therefore, the only way I see how this could work is by "brute-forcing" aka storing all possible combinations of 1-3 English letters that result in a Russian letter and reverse-apply the principle in a renaming script. It's a challenge indeed...
-
- Site Admin
- Posts: 60602
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
As I said, you also will be able to do 1:n mappings... I just need to add a new rename command to scripting to make it fairly easy: in the meantime you can create your 2 lists like this:ivan wrote:Good effort. It's a start.
The problem I see is that Russian (my native language) is much more phonetic than English is. What I'm trying to say is that often to create the same sound as you would pronouncing one letter in English you'd need 2 Russian letters and vice versa.
Therefore, the only way I see how this could work is by "brute-forcing" aka storing all possible combinations of 1-3 English letters that result in a Russian letter and reverse-apply the principle in a renaming script. It's a challenge indeed...
a,b,c,dss,e .... (latin)
X,Xer,sh,ss,... (cyrill)
You see: simply separate with commas...
(BUT; this way won't be ready today -- only tomorrow...)
FAQ | XY News RSS | XY Twitter