otsaloma / gaupol

Editor for text-based subtitle files
https://otsaloma.io/gaupol/
GNU General Public License v3.0
247 stars 35 forks source link

[FEATURE] use gaupol as cli tool to set format / encoding / newlines #228

Open jeandestouches opened 6 days ago

jeandestouches commented 6 days ago

Hello, Would you consider adding an option to use gaupol as cli tool to set format / encoding / newlines so it can be used in a bash script to mass convert subtitles ?

Something like : gaupol --format subrip --encoding utf-8 --newlines unix --output $OUT $FILE

Thanks!

PS: If someone knows a cli tool as reliable as gaupol to do this, I'm interested by your suggestions too. :)

otsaloma commented 6 days ago

I don't really have interest in that, but if you can write a tiny amount of Python, you should be able to do this with the aeidon package, which is installed as part of Gaupol. See the first example here: https://otsaloma.io/gaupol/doc/api/aeidon.html

Regarding other tools, ffmpeg might do format conversions, not sure. For encoding and newline conversions you can also use general tools like iconv and fromdos/todos.