Ajatt-Tools / impd

🍵 AJATT-style passive listening and condensed audio without bloat.
https://tatsumoto-ren.github.io/blog/passive-listening
GNU General Public License v3.0
40 stars 4 forks source link

Feature request: remove lyrics subtitles #2

Closed tunjan closed 3 years ago

tunjan commented 3 years ago

Add an option (i.e: impd add -l) to remove the openings and endings from subtitles.

rg -n -B2 "pattern" file | cut -f1 -d: | sed 's/-.*//' | sed '/^$/d'

This script would output the line of the music pattern + two lines before (in case the mime type is srt).

sed -i '${line}d' output.srt

This one would delete the lines outputed by the previous command.

tatsumoto-ren commented 3 years ago

Is it fixed now?

tunjan commented 3 years ago

Yes, works flawlessly. Thank you.