{"id":102,"date":"2008-08-10T03:23:20","date_gmt":"2008-08-10T02:23:20","guid":{"rendered":"http:\/\/simoncpage.co.uk\/blog\/?p=102"},"modified":"2008-10-19T15:00:32","modified_gmt":"2008-10-19T14:00:32","slug":"using-filemaker-to-convert-subtitle-srt-text-files-to-text-only-and-excel","status":"publish","type":"post","link":"https:\/\/simoncpage.co.uk\/blog\/2008\/08\/using-filemaker-to-convert-subtitle-srt-text-files-to-text-only-and-excel\/","title":{"rendered":"Filemaker | convert subtitle (.srt) text files to text only and Excel"},"content":{"rendered":"<p>Someone had asked me if they knew of a way to get .srt in to a more readable format like\u00a0a word document\u00a0and also an excel formatted sheet\u00a0&#8211; it was something they needed to do\u00a0with a large number of subtitle files. I instantly thought of Filemaker, (if I had had more time I would probably of\u00a0done\u00a0a nice fancy regex\u00a0(regular expressions) file, but I didn&#8217;t) so\u00a0using all very native commands\u00a0I created a conversion process &#8211;\u00a0and it only took me about 30 mins all in all.<\/p>\n<p><a href=\"http:\/\/en.wikipedia.org\/wiki\/SubRip\">.srt files<\/a> are formatted like this:<\/p>\n<blockquote><p>1<br \/>\n00:00:17,794 &#8211;&gt; 00:00:22,160<br \/>\n&#8220;Some of the biggest men in the United States,<br \/>\nin the Field of commerce and manufacture are afraid of something.<\/p>\n<p>2<br \/>\n00:00:23,873 &#8211;&gt; 00:00:28,707<br \/>\nThey know that there is a power somewhere so organized,<br \/>\nso subtle, so watchful, so interlocked, so complete, so pervasive,<\/p>\n<p>3<br \/>\n00:00:30,765 &#8211;&gt; 00:00:39,936<br \/>\nthat they better not speak above their breath when they speak in condemnation of it.&#8221;<br \/>\n~Woodrow Wilson, former President of the United States<\/p><\/blockquote>\n<p>So the basic structure is:<\/p>\n<p><strong><em>Subtitle number ID<br \/>\nStart time<\/em><\/strong> <em>&#8211;&gt;<\/em> <em><strong>End time<\/strong><\/em><br \/>\n<em><strong>Text of subtitle (one or more lines)<\/strong><\/em><br \/>\n<em><strong>Blank line<\/strong><\/em><\/p>\n<p>This looked simple enough and so I got to work.<\/p>\n<p>First thing to sort out was the fields needed. I decided to setup a global field to contain the .srt text and a number field to indicate which line I would like to display\u00a0on top of that I\u00a0then needed\u00a02 calculation fields to create the start and end points of the text for the specific subtitle number ID. Then finally 3 fields needed to be created to display\u00a0start time, end time\u00a0and text in separate fields.<\/p>\n<p>Using these the plan was to setup a loop which would go through from 1 up to however\u00a0big the last subtitle\u00a0number ID was in\u00a0the .srt text\u00a0&#8211; creating a new record for each and extract just the text needed\u00a0and adding it to the previous ID extraction in another global field (of course the loop would simply exit when the calculated text field was empty i.e. end of file).<\/p>\n<p>At the end you would end up with X records all with the relevant start time, end time and specific text in separate fields (which can be exported to excel) and a global field which can then be copied and pasted in to another application\u00a0with the full\u00a0text from all the IDs.<\/p>\n<p>There were a few things extra I added to these which I saw from the examples files I was given &#8211; that was the use of &#8221; and ~ these were used to start some of the text as quotes and the ~ was used to show who the quote was from. For these I added extra paragraph returns so the text was to some extent better arranged to read.<\/p>\n<p>The open file is below &#8211; just remember to toggle the &#8221; and ~ option if you use it with other .srt files that don&#8217;t follow this formatting. Also note that once you have run this process it will automatically export a csv file to your desktop and open it.<\/p>\n<p>Let me know how you would of chosen to do this and\u00a0any bugs you find? Thanks<\/p>\n<p><a href=\"None\"><\/a><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-105\" title=\"filemaker1\" src=\"https:\/\/simoncpage.co.uk\/blog\/wp-content\/uploads\/2008\/08\/filemaker1.jpg\" alt=\"\" width=\"59\" height=\"65\" \/><\/p>\n<p><a href=\"https:\/\/simoncpage.co.uk\/blog\/wp-content\/uploads\/2008\/08\/extract_srt_data.zip\">Extract .srt fp7 Filemaker file<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Someone had asked me if they knew of a way to get .srt in to a more readable format like\u00a0a word document\u00a0and also an excel formatted sheet\u00a0&#8211; it was something they needed to do\u00a0with a large number of subtitle files. I instantly thought of Filemaker, (if I had had more time I would probably of\u00a0done\u00a0a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[26,4],"tags":[123,138,117,136,137,135],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/simoncpage.co.uk\/blog\/wp-json\/wp\/v2\/posts\/102"}],"collection":[{"href":"https:\/\/simoncpage.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/simoncpage.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/simoncpage.co.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/simoncpage.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=102"}],"version-history":[{"count":0,"href":"https:\/\/simoncpage.co.uk\/blog\/wp-json\/wp\/v2\/posts\/102\/revisions"}],"wp:attachment":[{"href":"https:\/\/simoncpage.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=102"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/simoncpage.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=102"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/simoncpage.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=102"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}