Help need to convert bi-lingual files in sub-title format
I have a large number of files in the standard subtitle format with the additional proviso that the files are bi-lingual i.e. English and a second language: in this case Hindi. A small sample is given below:
What I need is as under
that the time code is deleted and the English text would be on one single line and the corresponding Hindi text be provided on the same line with equal to as a delimiter
I have written a macro to the job, but since the data is huge, a Perl or Awk script would run much faster.
Many thanks
A small sample for testing is provided below:
The macro was written within the framework of a text editor: Ultraedit. It runs but is very slow and takes too long.
The file has a regular structure and the the logic of the macro is as under:
Delete the time-code i.e. the first two lines
Go to the next line. Go to the end and delete the hard return. This ensures that the English lines are now reduced to one single line.
Once again delete the time-code
Next repeat the same action for the Hind file
Now conjoin the the English file and the Hindi file with the equal to sign
This brings you back to the time-code of the next sub-title.
Save the macro and run it on the file
Here is the output
The only hitch was that it ran too slowly under UltraEdit and hence the request.
I am reproducing the macro below for what it's worth, since Macros in Ultraedit use their own logic:
Am out. And replying from my phone. I will test it out and get back to you. Many thanks for both solutions
---------- Post updated 08-06-16 at 06:08 AM ---------- Previous update was 08-05-16 at 08:17 AM ----------
Sorry for the late reply. Due to heavy rains my broadband which is from a fixed line was down.
I have tested the alternative solution and it works just as well
Hi Folks,
I have a large text file with multiple similar patterns on each line like:
blank">PATTERN1 some word PATTERN2
title=">PATTERN1 some word PATTERN2
blank">PATTERN1 another word PATTERN2
title=">PATTERN1 another word PATTERN2
blank">PATTERN1 one more time PATTERN2
title=">PATTERN1... (10 Replies)
I have a lot number audio files in the MP3 proprietary format, I want to convert them to 'opus' the free and higher quality format, with keep metadata also.
My selection command-line programs are SoX (Sound eXchange) for convert MP3 files to 'AIFF' format in order to keep quality and metadata*... (1 Reply)
Hi :)
I have a .txt file with thousands of words.
I was wondering if i could use a simple sed or awk command to convert / replace all words in the text file to Title Case format ?
Example:
from:
this is line one
this is line two
this is line three
to desired output:
This Is Line... (8 Replies)
Hi Folks,
I have written a perl script that reads data from excel sheet(.xls) using Spreadsheet::ParseExcel module. But the problem is this module doesn't work for excel sheets with extension .xlsx.
I have gone through Spreadsheet::XLSX module with which we can read from .xlsx file directly.... (1 Reply)
Hi all perl gurus,
I need your help to get the desired output in perl.
I have a file which has text in it in the format
Connection request start timestamp = 12/08/2008 00:58:36.956700
Connect request completion timestamp = 12/08/2008 00:58:36.959729
Application idle time ... (10 Replies)
Hi
I have a file which has ascii , binary, binary decimal coded,decimal & hexadecimal data with lot of special characters (like öƒ.ƒ.„İİ¡Š·œƒ.„İİ¡Š· ) in it. I want to standardize the file into ASCII format & later use that as source .
Can any one suggest a way a logic to convert such... (5 Replies)
:confused: Hi
i am trying to convert a file which is in UTF8 format to ANSI format i tried to use the function ICONV but it is throwing error
Function i used it as
$ iconv -f UTF8 -t ANSI filename
Error iam getting is NOT Supported UTF8 to ANSI
please some help me out on... (9 Replies)
:) Hi
i am trying to convert a file which is in UTF8 format to ANSI format i tried to use the function ICONV but it is throwing error
Function i used it as
$ iconv -f UTF8 -t ANSI filename
Error iam getting is NOT Supported UTF8 to ANSI
please some help me out on this.........Let me... (1 Reply)