I suggest changes to make it easier to use in complex pipelines:
Print all messages (including progress bars) to stderr
Allow to override file extension with a command-line switch. The output file probably doesn't need this override, since its format meant to be inferred from the incorrect-sub-file.
I made a quick patch just for my own needs, but I'm not very good at rust, I think you could implement it better.
Example use case
Given that I have these symlinks:
$ cd ~ && ls -l std{in.ass,out.srt} | cut -d' ' -f 10-12
stdin.ass -> /dev/stdin
stdout.srt -> /dev/stdout
Here's an example of a pipeline I use it in:
T="$GOPATH/src/github.com/Des-Nerger/sinojapsubs-tools"
go run "$T"/make-parallel-ass-subs.go \
<(eval "$ESUBS" | go run "$T"/sync.go -o /dev/stdout ~/stdin.ass +0.75s | \
go run "$T"/english/blank_frequent_english_idstems.go \
$(awk '{printf$1FS} NR==384{print"";exit}' \
~/Documentation/hermitdave_FrequencyIDStems_en_full.txt)) \
<(eval "$ESUBS" | alass-cli --disable-fps-guessing --split-penalty 20 ~/stdin.ass \
<(eval "$JSUBS" | python3 ~/Documents/half_to_full_katakana.py) ~/stdout.srt | \
go run "$T"/japanese/add-auto-furigana.go | \
go run "$T"/rubied-srt2ass.go /dev/stdin /dev/stdout) \
"$BASENAME".ben+furija.ass
I suggest changes to make it easier to use in complex pipelines:
I made a quick patch just for my own needs, but I'm not very good at rust, I think you could implement it better.
Example use case
Given that I have these symlinks:
Here's an example of a pipeline I use it in: