Formatting srt files

36 views
Skip to first unread message

Otto Munters

unread,
May 30, 2023, 2:37:39 PM5/30/23
to BBEdit Talk
Is it possible to format srt files correctly?  
The correct way is shown below.
1st line: number
2nd line: timing
3rd line: subtitle line 1
4th line: subtitle line 2
5th line: blank

27
00:04:18,240 --> 00:04:25,440
Although you will have various kind of 
spiritual experiences during these talks.  

28
00:04:26,880 --> 00:04:38,700
But the basic purpose of this is self knowledge. 
The topic of Vedanta is you. It's who you are.  

29
00:04:41,040 --> 00:04:48,420
Not you as a person but you as 
you're true self as who you really are.  

Below are errors that I want to correct with BBedit.
In #27 wrongful termination in line 2
27
00:04:18,240 --> 00:04:25,440
Although you will have various kind of 
spiritual 
experiences during these talks.  

In line 28 one blank line too many under line 2
28
00:04:26,880 --> 00:04:38,700
But the basic purpose of this is self knowledge. 
The topic of Vedanta is you. It's who you are.  



In line 29 a blank line between line 1 and line 2
29
00:04:41,040 --> 00:04:48,420
Not you as a person but you as 

you're true self as who you really are.

Can I do this with Breg and find and replace
Thanks in advance for your help!






Kaveh Bazargan

unread,
May 30, 2023, 2:43:51 PM5/30/23
to bbe...@googlegroups.com
In 27 how do you know if "spiritual" belongs to line above or below?

--
This is the BBEdit Talk public discussion group. If you have a feature request or need technical support, please email "sup...@barebones.com" rather than posting here. Follow @bbedit on Twitter: <https://twitter.com/bbedit>
---
You received this message because you are subscribed to the Google Groups "BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bbedit+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bbedit/7396a4a9-3342-42d2-a283-f7612204e380n%40googlegroups.com.


--
Kaveh Bazargan PhD
Director
Accelerating the Communication of Research
  https://rivervalley.io/gigabyte-wins-the-alpsp-scholarly-publishing-innovation-award-using-river-valleys-publishing-technology/

Bruce Van Allen

unread,
May 30, 2023, 2:53:13 PM5/30/23
to bbe...@googlegroups.com
How are the errors created? E.g., manual input, database query, computer transcription from audio, etc.? I’m not familiar with srt files, so I don’t have a picture of your workflow. In general it’s best to catch errors when they’re created, rather than passing them on to the next user.

If you’re stuck with no control over how the files come to you, do the error examples you gave cover the full range of corrections needed?

This might need either multiple find/replace ops, or perhaps would be better handled with a script (Applescript, Perl, Javascript) or a BBEdit text factory…

No matter which, BBEdit gives you a good framework for it.

— Bruce

_bruce__van_allen__santa_cruz_ca_

Otto Munters

unread,
May 30, 2023, 3:21:33 PM5/30/23
to BBEdit Talk
It doesn’t matter to which of the two lines it belongs, as long as the two lines have about the same lenght. 

Op dinsdag 30 mei 2023 om 20:43:51 UTC+2 schreef Kaveh Bazargan:
Reply all
Reply to author
Forward
0 new messages