Telegram Group & Telegram Channel
replace srt / vrt index numbers in subtitles...not really needed. In VSCode can simply do search for (^\d+\n) and replace (nothing) ...but to do in a script is much harder it appears. Here's what I found after lots of searching.

This one removes the number starting at beginning of a line and appends a newline but that creates two newlines (two empty lines)
sed -i 'N;s|^[0-9]\+||' test.vtt

Now to search for two empty lines and just remove one of them.

sed -i '/^$/{ :l N; s/^\n$//; t l p; d; }' test.vtt

So I guess I'll just stick with the first method.

sed -i 'N;s|^[0-9]\+||' test.vtt

So it went from 4.4MB down to 4.3MB so hmmm maybe not that much of a difference. Ok just did another one it went from 7.4MB to 6.8MB ..so it's a bit.



tg-me.com/geektips/875
Create:
Last Update:

replace srt / vrt index numbers in subtitles...not really needed. In VSCode can simply do search for (^\d+\n) and replace (nothing) ...but to do in a script is much harder it appears. Here's what I found after lots of searching.

This one removes the number starting at beginning of a line and appends a newline but that creates two newlines (two empty lines)
sed -i 'N;s|^[0-9]\+||' test.vtt

Now to search for two empty lines and just remove one of them.

sed -i '/^$/{ :l N; s/^\n$//; t l p; d; }' test.vtt

So I guess I'll just stick with the first method.

sed -i 'N;s|^[0-9]\+||' test.vtt

So it went from 4.4MB down to 4.3MB so hmmm maybe not that much of a difference. Ok just did another one it went from 7.4MB to 6.8MB ..so it's a bit.

BY GeekTips





Share with your friend now:
tg-me.com/geektips/875

View MORE
Open in Telegram


GeekTips Telegram | DID YOU KNOW?

Date: |

Pinterest (PINS) Stock Sinks As Market Gains

Pinterest (PINS) closed at $71.75 in the latest trading session, marking a -0.18% move from the prior day. This change lagged the S&P 500's daily gain of 0.1%. Meanwhile, the Dow gained 0.9%, and the Nasdaq, a tech-heavy index, lost 0.59%. Heading into today, shares of the digital pinboard and shopping tool company had lost 17.41% over the past month, lagging the Computer and Technology sector's loss of 5.38% and the S&P 500's gain of 0.71% in that time. Investors will be hoping for strength from PINS as it approaches its next earnings release. The company is expected to report EPS of $0.07, up 170% from the prior-year quarter. Our most recent consensus estimate is calling for quarterly revenue of $467.87 million, up 72.05% from the year-ago period.

The messaging service and social-media platform owes creditors roughly $700 million by the end of April, according to people briefed on the company’s plans and loan documents viewed by The Wall Street Journal. At the same time, Telegram Group Inc. must cover rising equipment and bandwidth expenses because of its rapid growth, despite going years without attempting to generate revenue.

GeekTips from hk


Telegram GeekTips
FROM USA