Skip to content

Ajatt-Tools/subs2srs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

153 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

subs2srs (GTK4 port)

AUR CI Chat License Spec

screenshot

A tool that creates Anki flashcards from movies and TV shows with subtitles, for language learning.

This is a GTK4 / .NET 10 rewrite of the UI layer. The processing core (subtitle parsing, ffmpeg calls, SRS generation) is carried over from the original with minimal changes.

Credits

What changed from the Mono/WinForms version

Area Old (erjiang fork) This port
UI toolkit WinForms on Mono GTK4 via GirCore
Runtime Mono .NET 10+
System.Drawing Required everywhere RemovedSrsColor, FontInfo used instead
Serialization BinaryFormatter System.Text.Json (ObjectCloner)
Preferences format Custom key = value text with regex updates JSON (preferences.json)
Progress dialogs BackgroundWorker + modal DialogProgress async/await + IProgressReporter
PropertyGrid (Preferences) WinForms PropertyGrid ColumnView with editable cells
Preview dialog BackgroundWorker (deadlocked on Wayland) Task.Run + async
Font/Color pickers WinForms dialogs FontDialogButton / ColorDialogButton (native GTK4)
VobSub support Built-in Optional (compile with EnableVobSub=true)
MS fonts Required fontconfig workaround Not needed
Build system mcs / xbuild dotnet publish via Makefile

Removed components

  • SubsReTimer — separate tool, not part of this port
  • DialogAbout — removed (was WinForms bitmap-based)
  • DialogPreviewSnapshot — merged into DialogPreview
  • DialogVideoDimensionsChooser — removed (size set directly in settings)
  • GroupBoxCheck — WinForms custom control, not needed in GTK

Dependencies

Runtime:

Build:

Optional:

Build

make build

Test

make test

Install

AUR

yay -S subs2srs-gui

Manual

git clone https://github.com/ajatt-tools/subs2srs.git
cd subs2srs
sudo make install

Installs to /usr/lib/subs2srs/, launcher to /usr/bin/subs2srs.

Uninstall

sudo make uninstall

Configuration

On first run, preferences.json is created in ~/.config/subs2srs/.

If a preferences.txt from a previous version exists in the same directory, it is automatically migrated to JSON on first launch. The old file is left intact.

Projects are saved as .s2s.json files (File → Save/Load Project).

Edit preferences via Preferences dialog or by editing preferences.json directly.

Adding a new preference

  1. Add default constant to PrefDefaults
  2. Add property to PreferencesData.cs with default from PrefDefaults
  3. Add delegating property to ConstantSettings
  4. Add to DialogPref.BuildPropTable() + DialogPref.SavePreferences()
  5. Add to Logger.writeSettingsToLog()
  6. If the preference maps to Settings.Instance, add to Settings.Reset()

Parallelism

Set max_parallel_tasks in Preferences → Misc (or in preferences.json):

  • 0 — auto (number of CPU cores, default)
  • 1 — sequential (no parallelism)
  • N — use up to N threads for media generation

Building with VobSub support

VobSub (.sub/.idx) parsing requires System.Drawing.Common and is disabled by default. To enable:

dotnet publish subs2srs/subs2srs.csproj -c Release -p:EnableVobSub=true

License

GPL-3.0-or-later

About

Anki decks from subtitled media. Batch processing for language immersion.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors