Re: [libreoffice-users] auto edit youtube transcript?

2021-05-16 Thread Brian Barker

At 20:39 15/05/2021 -0700, Dave Stevens wrote:
Here's a snippet of a youtube auto-generated CC transcript. Can 
someone show how to delete the lines that have times? as far as i 
know they are strictly alternating and have exactly 1 colon, but that's

where my smarts end. Anyone have a suggestion?


If you indeed just need to remove all odd-numbered lines of the text, 
you could do this:


o Paste the material into column A of a spreadsheet, starting at A1 - 
so that each line occupies one cell.

o In cell B1 (say), enter =OFFSET(A$1,ROW()*2-1,0)
o Fill down column B.

I think this works whether your original "lines" are separated by 
line breaks or are actually separate paragraphs. You can copy and 
paste the material in column B back into a text document for further 
formatting as required, of course.


I trust this helps.

Brian Barker


--
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy



Re: [libreoffice-users] auto edit youtube transcript?

2021-05-16 Thread Johnny Rosenberg
Den sön 16 maj 2021 kl 05:48 skrev Dave Stevens :

> Here's a snippet of a youtube auto-generated CC transcript.
> Can someone show how to delete the lines that have times? as far as i
> know they are strictly alternating and have exactly 1 colon, but that's
> where my smarts end. Anyone have a suggestion?
>
> Dave
>
>
in Writer?
If so:
Search7Replace
Check Regular expressions.
In the search field: [0-9:]+ \n
Leave the replace field empty.
Click Replace all and BAM, those lines are gone almost before you clicked….
If that's too scary, first click Search all to see if the right stuff was
found.

I tested this with the data in your post and every line is ended with a
space and a new line (not a paragraph break). If the space isn't there in
the real data, just remove it from the search field:
[0-9:]+\n
If the real data have paragraph breaks instead of newline characters, this
won't work.
Also note that this would also delete lines that ends with a number or
colon followed by a space. Tell me if that's a problem and we'll try to
work something out.


Kind regards

Johnny Rosenberg



>
>
> 25:49
> that's always been the case yeah and
> 25:52
> that's essentially it and a recently a
> 25:55
> study team
> 25:56
> ... more
>
> --
> To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
> Problems?
> https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
> Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
> List archive: https://listarchives.libreoffice.org/global/users/
> Privacy Policy: https://www.documentfoundation.org/privacy
>
>

-- 
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy


[libreoffice-users] auto edit youtube transcript?

2021-05-15 Thread Dave Stevens
Here's a snippet of a youtube auto-generated CC transcript.
Can someone show how to delete the lines that have times? as far as i
know they are strictly alternating and have exactly 1 colon, but that's
where my smarts end. Anyone have a suggestion?

Dave



25:49 
that's always been the case yeah and 
25:52 
that's essentially it and a recently a 
25:55 
study team 
25:56 
... more

-- 
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy