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/874
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/874

View MORE
Open in Telegram


GeekTips Telegram | DID YOU KNOW?

Date: |

Telegram announces Search Filters

With the help of the Search Filters option, users can now filter search results by type. They can do that by using the new tabs: Media, Links, Files and others. Searches can be done based on the particular time period like by typing in the date or even “Yesterday”. If users type in the name of a person, group, channel or bot, an extra filter will be applied to the searches.

Launched in 2013, Telegram allows users to broadcast messages to a following via “channels”, or create public and private groups that are simple for others to access. Users can also send and receive large data files, including text and zip files, directly via the app.The platform said it has more than 500m active users, and topped 1bn downloads in August, according to data from SensorTower.GeekTips from us


Telegram GeekTips
FROM USA