Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds .ssa/.ass support and Multifile batch processing #6

Merged
merged 3 commits into from
Feb 3, 2025
Merged

Conversation

NebularNerd
Copy link
Owner

@NebularNerd NebularNerd commented Feb 3, 2025

Closes #3

SubStation Alpha .ssa/.ass support

Works well with a selection of files in differing languages and format versions, there will likely be some tweaking needed in the future for fringe cases and 'labelling'. This was quite an easy format in some respects and a pain in others. There are four versions, each with changes that were not so important and one that was very important when it came to the dialogue lines.

There are some new options specifically for this format, noname and nosort, details are in the readme.md and the repo front page.

SubStation Alpha subs are quite different beasts to regular .srt or .vtt ones. While .vtt supports some similar features they are almost never used. SSA's can have styling, fonts, colours and one of the key things, positioning. Fans of Anime will be familiar with this, not only can you understand the plot, but using position a subtitle creator can add labels to objects in the scene, for example; labelling a carton or drink, or translating the title of a document or sign. Removing these could be done by looking for the {\pos} tag, however, a really good subtitler may use this to allow for a conversation between characters to have their subs hovering near them, if you remove all {\pos} tags, you would possibly remove important dialogue.

Multiple file support

Want to process multiple files? Now we can simply use the new --dir/-d option and give it the name of your folder that contains the subtitles. It will process every file it understands.

Other tweaks

  • Some tweaks to accommodate SubStation Alpha files
  • Added the awesome Black Formatter into the PR workflow, this will help ensure consistent formatting on external PR's. It took me a while to start using this internally but it's a game changer.
  • Minor tweaks for argparse help text

Substation Alpha support now added, there will likely be some tweaking needed in the future but it works quite well at present.

Multiple file support now added, process files in bulk.

Other tweaks.
@NebularNerd NebularNerd marked this pull request as ready for review February 3, 2025 16:16
@NebularNerd NebularNerd merged commit 94980a6 into main Feb 3, 2025
2 checks passed
@MonsterSe7en
Copy link

Wow!! Thank You!!

@NebularNerd
Copy link
Owner Author

Wow!! Thank You!!

SubStation was something I wanted to do really early on but back when I first made this my Python skills were very basic. Let me know if anything weird pops up when you test it. 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Thank you note!!
2 participants