![]() |
|
How can I remove the Chinese lines from Chi&Jap subs - Printable Version +- kanji koohii FORUM (http://forum.koohii.com) +-- Forum: Learning Japanese (http://forum.koohii.com/forum-4.html) +--- Forum: Off topic (http://forum.koohii.com/forum-13.html) +--- Thread: How can I remove the Chinese lines from Chi&Jap subs (/thread-13082.html) |
How can I remove the Chinese lines from Chi&Jap subs - Kuroro - 2015-10-18 I found the subtitles for さくら荘のペットな彼女 on Kitsunekko, but when I open them in Aegisub the two languages are not separated and every line includes them both, for example: 早かったわね\N{\fn方正中倩简体}{\fs50}真早呢 However I noticed that in every line between the Japanese and the Chinese part these characters '\N{\fn方正中倩简体}{\fs50}' always appear, so I was wondering if there was a way to have the software automatically delete them, and what follows, in every line. Of course if anybody already has the Japanese only subtitles to share that would be even better
How can I remove the Chinese lines from Chi&Jap subs - ReneSac - 2015-10-18 You can open it in any text editor that supports regex search and replace and trivially replace all those bits by nothing. You just need lots of scaping: \\N\{\\fn方正中倩简体\}\{\\fs50\}.*$ How can I remove the Chinese lines from Chi&Jap subs - SellingTokyo - 2015-10-18 I think many text editors probably support multiple file search-and-replace, For example I use Sublime Text and this is allowed and simple. http://docs.sublimetext.info/en/latest/search_and_replace/search_and_replace_files.html#search-scope How can I remove the Chinese lines from Chi&Jap subs - Kuroro - 2015-10-18 Thank you I tried to open the ass file with Textedit in OSX which has the search and replace function, however if I try to paste in the search bar the expression \\N\{\\fn方正中倩简体\}\{\\fs50\}.*$ I won't get any results and if I simply write \N{\fn方正中倩简体}{\fs50} then it won't replace what comes after it. Am I doing something wrong?I don't know if this is of any help but this is what a portion of the file looks like in the editor: Dialogue: 0,0:00:23.17,0:00:26.86,*Default,NTP,0000,0000,0000,,何もおこらないことを誰かのせいにしてた\N{\fn方正中倩简体}{\fs50}没有把没发生什么特别的事情怪罪与谁 Dialogue: 0,0:00:33.20,0:00:33.65,*Default,NTP,0000,0000,0000,,だけど\N{\fn方正中倩简体}{\fs50}但是 Dialogue: 0,0:01:00.79,0:01:01.90,*Default,NTP,0000,0000,0000,,惨いな \N{\fn方正中倩简体}{\fs50}好惨啊 Dialogue: 0,0:01:05.48,0:01:07.05,*Default,NTP,0000,0000,0000,,起きたら猫の尻って俺の青春 惨過ぎるよう\N{\fn方正中倩简体}{\fs50}一起来就看到猫屁股的青春 实在太悲惨了 And this is what I would like to get: Dialogue: 0,0:00:23.17,0:00:26.86,*Default,NTP,0000,0000,0000,,何もおこらないことを誰かのせいにしてた Dialogue: 0,0:00:33.20,0:00:33.65,*Default,NTP,0000,0000,0000,,だけど Dialogue: 0,0:01:00.79,0:01:01.90,*Default,NTP,0000,0000,0000,,惨いな Dialogue: 0,0:01:05.48,0:01:07.05,*Default,NTP,0000,0000,0000,,起きたら猫の尻って俺の青春 惨過ぎるよう How can I remove the Chinese lines from Chi&Jap subs - SellingTokyo - 2015-10-18 ReneSac's "\\N\{\\fn方正中倩简体\}\{\\fs50\}.*$" looks good and works as desired in Sublime Text, so you can always download that program and use it. Or probably any number of other programs. I am not familiar with Textedit. How can I remove the Chinese lines from Chi&Jap subs - anotherjohn - 2015-10-18 Maybe OSX has sed available on the commandline: sed "s/\\\\N{.*//" file.txt > out.txt Though the escaping required is reminiscent of the movie Inception
How can I remove the Chinese lines from Chi&Jap subs - Kuroro - 2015-10-18 I tried it in Sublime Text too, but I still can't get it to work. I must be doing something wrong. I go to Find -> Replace… and use the two bars at the bottom but it just won't work. Here is a screenshot: http://s22.postimg.org/dqvs026a9/Screen_Shot_2015_10_18_at_18_52_13.png How can I remove the Chinese lines from Chi&Jap subs - ReneSac - 2015-10-18 Your editor has a search and replace function, but not a regex search and replace function. You can try another one, or look at this link that promises regex for textedit (I don't know that editor): http://cocoadev.com/TextEdit] edit: I'm not familiar with Sublime Text either, but maybe you have to turn some knob to enable regex search (like you would for "Match Case" and similar things). That ".*" icon looks suspect. How can I remove the Chinese lines from Chi&Jap subs - SellingTokyo - 2015-10-18 Sublime Text - I see the issue. Look in the bottom right, to the button on the left of "Aa". click that, try again. Now you are in business! Edit: Rene beat me to it! How can I remove the Chinese lines from Chi&Jap subs - Kuroro - 2015-10-18 You guys are awesome! Thank you so much!!!
|