assy 6.2__tar.gz → 6.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. {assy-6.2 → assy-6.4}/.gitignore +5 -0
  2. assy-6.4/CHANGELOG +8 -0
  3. assy-6.4/Dockerfile.cli +39 -0
  4. {assy-6.2 → assy-6.4}/PKG-INFO +149 -22
  5. {assy-6.2 → assy-6.4}/README.md +147 -20
  6. assy-6.4/main/VERSION +1 -0
  7. {assy-6.2 → assy-6.4}/main/call_autosubsync.py +1 -0
  8. {assy-6.2 → assy-6.4}/main/call_ffsubsync.py +22 -3
  9. assy-6.4/main/cli.py +822 -0
  10. assy-6.4/main/compat.py +60 -0
  11. {assy-6.2 → assy-6.4}/main/constants.py +41 -0
  12. {assy-6.2 → assy-6.4}/main/gui.py +30 -0
  13. {assy-6.2 → assy-6.4}/main/gui_auto_pairing.py +5 -1
  14. {assy-6.2 → assy-6.4}/main/gui_batch_mode.py +2 -99
  15. {assy-6.2 → assy-6.4}/main/gui_log_window.py +8 -1
  16. {assy-6.2 → assy-6.4}/main/main.py +1 -0
  17. assy-6.4/main/pairing.py +135 -0
  18. assy-6.4/main/resources/alass-bin/alass-cli.exe +0 -0
  19. {assy-6.2 → assy-6.4}/main/sync_auto.py +63 -468
  20. assy-6.4/main/sync_core.py +636 -0
  21. {assy-6.2 → assy-6.4}/main/texts.py +359 -0
  22. {assy-6.2 → assy-6.4}/main/utils.py +173 -30
  23. {assy-6.2 → assy-6.4}/pyproject.toml +8 -2
  24. assy-6.2/CHANGELOG +0 -36
  25. assy-6.2/main/VERSION +0 -1
  26. assy-6.2/main/main_docker.py +0 -143
  27. {assy-6.2 → assy-6.4}/.dockerignore +0 -0
  28. {assy-6.2 → assy-6.4}/LICENSE +0 -0
  29. {assy-6.2 → assy-6.4}/main/.SRCINFO +0 -0
  30. {assy-6.2 → assy-6.4}/main/__init__.py +0 -0
  31. {assy-6.2 → assy-6.4}/main/alass_encodings.py +0 -0
  32. {assy-6.2 → assy-6.4}/main/assets/fonts/hack.ttf +0 -0
  33. {assy-6.2 → assy-6.4}/main/assets/github.svg +0 -0
  34. {assy-6.2 → assy-6.4}/main/assets/icon.icns +0 -0
  35. {assy-6.2 → assy-6.4}/main/assets/icon.ico +0 -0
  36. {assy-6.2 → assy-6.4}/main/assets/icon.png +0 -0
  37. {assy-6.2 → assy-6.4}/main/assets/settings.svg +0 -0
  38. {assy-6.2 → assy-6.4}/main/gui_automatic_tab.py +0 -0
  39. {assy-6.2 → assy-6.4}/main/gui_load_library.py +0 -0
  40. {assy-6.2 → assy-6.4}/main/gui_manual_tab.py +0 -0
  41. {assy-6.2 → assy-6.4}/main/gui_multiple_subs.py +0 -0
  42. {assy-6.2 → assy-6.4}/main/processed_items_manager.py +0 -0
  43. {assy-6.2 → assy-6.4}/main/qt_compat.py +0 -0
  44. {assy-6.2 → assy-6.4}/main/resources/__init__.py +0 -0
  45. {assy-6.2 → assy-6.4}/main/resources/alass-bin/alass-linux64 +0 -0
  46. {assy-6.2 → assy-6.4}/main/resources/autosubsync/trained-model.bin +0 -0
  47. {assy-6.2 → assy-6.4}/main/subtitle_converter.py +0 -0
  48. {assy-6.2 → assy-6.4}/main/subtitle_extractor.py +0 -0
  49. {assy-6.2 → assy-6.4}/main/sync_manual.py +0 -0
  50. {assy-6.2 → assy-6.4}/main/version.py +0 -0
@@ -35,3 +35,8 @@ main/resources/versions.json
35
35
  test_subtitles/
36
36
  PROMPTS.md
37
37
  build_tools/
38
+
39
+ # Input/output directories
40
+ input/
41
+ output/
42
+ desktop/
assy-6.4/CHANGELOG ADDED
@@ -0,0 +1,8 @@
1
+ - **Headless CLI:** Added headless CLI for autonomous subtitle sync pipelines. Contributed by @Aidenir in PR [#86](https://github.com/denizsafak/AutoSubSync/pull/86):
2
+ >Introduces assy-cli with five subcommands (sync, shift, batch, config, version), JSON output mode, structured exit codes, and a slim Docker image - so AutoSubSync can run in CI/CD, scheduled jobs, and containers without a display or Qt event loop. The sync engine logic was extracted from SyncProcess into a new sync_core module that knows nothing about Qt; SyncProcess is now a thin adapter that wires Qt signals to sync_core callbacks. The pairing logic moved to a new pairing module the GUI re-imports. utils.py drops its top-level QtWidgets/QtGui imports so the CLI never loads Qt display libraries at runtime.
3
+
4
+ See [Command-line interface (assy-cli)](https://github.com/denizsafak/AutoSubSync#command-line-interface-assy-cli) for detailed instructions.
5
+ - **Python 3.14+ Compatibility:** Added a shim for `pkg_resources` to ensure compatibility with legacy dependencies (like `autosubsync`) that fail in recent Python versions where `setuptools` is not installed by default, Updated `pyproject.toml` to allow installation on Python 3.14. Contributed by @MateusSantos14 in PR [#85](https://github.com/denizsafak/AutoSubSync/pull/85)
6
+ - **Custom Subtitle Suffix:** Added a new option called `Add custom suffix for subtitles` in settings to define a default custom suffix for processed subtitles. All save locations (except "Overwrite input subtitle") will append this suffix to the output file name, added `--suffix` parameter in both CLI subcommands (`sync` and `batch`).
7
+ - Fixed `No executable found for alass` error in Windows with PyPI build, mentioned by @Milor123 in issue [#84](https://github.com/denizsafak/AutoSubSync/issues/79)
8
+ - `Auto-Pairing with Season/Episode` now sorts paired items correctly before adding to batch view, mentioned by @enchained in issue [#71](https://github.com/denizsafak/AutoSubSync/issues/71)
@@ -0,0 +1,39 @@
1
+ # Slim, headless image for autonomous pipeline use of AutoSubSync.
2
+ # Contains only what the CLI needs - no X11, VNC, or Qt display deps.
3
+ # main/cli.py is engineered to not load PyQt6 QtWidgets/QtGui at runtime,
4
+ # so the slim image works even though PyQt6 is still a transitive install dep.
5
+
6
+ # --- Builder stage: compile native deps (webrtcvad etc.) ---
7
+ FROM python:3.11-slim-bookworm AS builder
8
+
9
+ ENV PYTHONUNBUFFERED=1 \
10
+ PIP_NO_CACHE_DIR=1 \
11
+ PIP_DISABLE_PIP_VERSION_CHECK=1
12
+
13
+ RUN apt-get update && apt-get install -y --no-install-recommends \
14
+ build-essential \
15
+ && rm -rf /var/lib/apt/lists/*
16
+
17
+ WORKDIR /app
18
+ COPY pyproject.toml README.md ./
19
+ COPY main ./main
20
+ RUN python -m pip install --prefix=/install .
21
+
22
+ # --- Runtime stage: just glibc + libstdc++ + the installed wheels ---
23
+ FROM python:3.11-slim-bookworm
24
+
25
+ ENV PYTHONUNBUFFERED=1
26
+
27
+ RUN apt-get update && apt-get install -y --no-install-recommends \
28
+ ca-certificates \
29
+ libstdc++6 \
30
+ libglib2.0-0 \
31
+ && rm -rf /var/lib/apt/lists/*
32
+
33
+ COPY --from=builder /install /usr/local
34
+
35
+ WORKDIR /data
36
+ VOLUME ["/data"]
37
+
38
+ ENTRYPOINT ["assy-cli"]
39
+ CMD ["--help"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: assy
3
- Version: 6.2
3
+ Version: 6.4
4
4
  Summary: Automatic subtitle synchronization tool.
5
5
  Project-URL: Homepage, https://github.com/denizsafak/AutoSubSync
6
6
  Project-URL: Documentation, https://github.com/denizsafak/AutoSubSync
@@ -21,7 +21,7 @@ Classifier: Programming Language :: Python :: 3.12
21
21
  Classifier: Programming Language :: Python :: 3.13
22
22
  Classifier: Topic :: Multimedia :: Video
23
23
  Classifier: Topic :: Text Processing
24
- Requires-Python: <3.14,>=3.10
24
+ Requires-Python: >=3.10
25
25
  Requires-Dist: autosubsync
26
26
  Requires-Dist: chardet
27
27
  Requires-Dist: charset-normalizer
@@ -45,10 +45,12 @@ Description-Content-Type: text/markdown
45
45
 
46
46
  [![Build Status](https://github.com/denizsafak/AutoSubSync/actions/workflows/app.yml/badge.svg)](https://github.com/denizsafak/AutoSubSync/actions)
47
47
  <a href="https://github.com/psf/black"><img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg"></a>
48
- [![GitHub Release](https://img.shields.io/github/v/release/denizsafak/AutoSubSync)](https://github.com/denizsafak/AutoSubSync/releases/latest)
49
48
  [![PyPI version](https://img.shields.io/pypi/v/assy)](https://pypi.org/project/assy/)
49
+ [![GitHub Release](https://img.shields.io/github/v/release/denizsafak/AutoSubSync)](https://github.com/denizsafak/AutoSubSync/releases/latest)
50
50
  [![Operating Systems](https://img.shields.io/badge/os-windows%20%7C%20linux%20%7C%20macos%20-blue)](https://github.com/denizsafak/AutoSubSync/releases/latest)
51
- [![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/denizsafak/AutoSubSync/total?color=blue)](https://github.com/denizsafak/AutoSubSync/releases/latest)
51
+ ![Pepy Total Downloads](https://img.shields.io/pepy/dt/assy?label=downloads%20(pypi)&color=blue)
52
+ [![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/denizsafak/AutoSubSync/total?color=blue&label=downloads%20(github))](https://github.com/denizsafak/AutoSubSync/releases/latest)
53
+
52
54
 
53
55
  AutoSubSync is a user-friendly tool that automatically synchronizes your subtitles with your videos using powerful tools such as [ffsubsync](https://github.com/smacke/ffsubsync), [autosubsync](https://github.com/oseiskar/autosubsync) and [alass](https://github.com/kaegi/alass). It also lets you manually adjust the subtitle timings. Just drag and drop your files, and let AutoSubSync do the rest, making subtitle alignment both simple and efficient.
54
56
 
@@ -98,7 +100,9 @@ yay -S autosubsync-bin
98
100
  > ```
99
101
 
100
102
  ### PyPI (All Platforms)
101
- You can install AutoSubSync using either pip or uv (a fast Python package manager) on any platform with Python 3.10+:
103
+ [![PyPi Python Versions](https://img.shields.io/pypi/pyversions/assy)](https://pypi.org/project/assy/)
104
+
105
+ You can install AutoSubSync using either pip or uv (a fast Python package manager) on any platform with Python 3.10 - 3.13:
102
106
 
103
107
 
104
108
  ```bash
@@ -109,7 +113,7 @@ pip install assy
109
113
  <summary><strong>With uv (click to expand)</strong></summary>
110
114
 
111
115
  ```bash
112
- uv pip install --system assy
116
+ uv tool install assy
113
117
  ```
114
118
 
115
119
  </details>
@@ -123,7 +127,7 @@ pip install assy[torch]
123
127
  <summary><strong>With uv (click to expand)</strong></summary>
124
128
 
125
129
  ```bash
126
- uv pip install --system assy[torch]
130
+ uv tool install assy[torch]
127
131
  ```
128
132
 
129
133
  </details>
@@ -133,23 +137,44 @@ uv pip install --system assy[torch]
133
137
  assy
134
138
  ```
135
139
 
140
+
136
141
  #### If your system Python is not compatible (e.g., macOS with older Python):
137
142
 
138
- If your system Python version is below 3.10 or above 3.13, you can use `uv` to automatically download a compatible Python version and run AutoSubSync:
143
+ If your system Python version is below 3.10 or above 3.13, the recommended solution is to use [`uv`](https://docs.astral.sh/uv/getting-started/installation/) to install and run AutoSubSync with a compatible Python version automatically.
139
144
 
140
- ```bash
141
- # One-liner to run AutoSubSync with a compatible Python (downloads Python 3.12 if needed)
142
- uvx --python 3.12 assy
145
+ **First, install `uv` by following the instructions at [astral.sh/uv](https://docs.astral.sh/uv/getting-started/installation/).**
146
+
147
+ Then, simply run:
143
148
 
144
- # Or create a virtual environment with a specific Python version
145
- uv venv --python 3.12
146
- uv pip install assy
147
- uv run assy
149
+ ```bash
150
+ uv tool install assy
151
+ # Then run with:
152
+ assy
148
153
  ```
149
154
 
155
+ This will ensure you have a compatible Python version and the latest AutoSubSync installed, regardless of your system Python.
156
+
150
157
  > You can install uv from [astral.sh/uv](https://docs.astral.sh/uv/getting-started/installation/).
151
158
 
152
- ---
159
+
160
+ ### Docker Guide
161
+ Thanks to [@IlmariKu](https://github.com/IlmariKu) in PR [#61](https://github.com/denizsafak/AutoSubSync/pull/61), you can run AutoSubSync in a Docker container. This makes it easier to deploy and run AutoSubSync in different environments without worrying about dependencies.
162
+
163
+ ```bash
164
+ # Navigate to the AutoSubSync directory
165
+ cd AutoSubSync
166
+
167
+ # Create input and output directories
168
+ mkdir -p input output desktop
169
+
170
+ # Build and run the container
171
+ docker-compose up --build -d
172
+ ```
173
+ To access the GUI, open your web browser and go to: [http://localhost:6080](http://localhost:6080)
174
+
175
+ > [!TIP]
176
+ > For detailed instructions, go the Docker guide:
177
+ > ### **[Go to Docker Guide](DOCKER.md)**
153
178
 
154
179
  ## `How to use?`
155
180
 
@@ -175,6 +200,62 @@ uv run assy
175
200
  4. Select output location
176
201
  5. Click `Start`
177
202
 
203
+ ### Command-line interface (`assy-cli`)
204
+
205
+ For autonomous pipelines, CI/CD, scheduled jobs, and Docker, AutoSubSync ships a
206
+ fully-featured CLI that never starts a Qt event loop or requires a display.
207
+
208
+ ```bash
209
+ # Auto-sync one subtitle (machine-readable output)
210
+ assy-cli sync video.mkv subs.srt -o synced.srt --json
211
+ # {"ok": true, "input": "subs.srt", "output": "synced.srt", "tool": "ffsubsync", ...}
212
+
213
+ # Shift a subtitle by 1.5 seconds
214
+ assy-cli shift subs.srt 1500 -o shifted.srt
215
+
216
+ # Batch sync a folder of pairs and continue past failures
217
+ assy-cli batch --folder ./episodes --continue-on-error --json
218
+
219
+ # Two-folder pairing with explicit output dir
220
+ assy-cli batch --video-dir ./videos --subtitle-dir ./subs -o ./out --json
221
+
222
+ # Pick a sync engine per call
223
+ assy-cli sync video.mkv subs.srt -t alass
224
+
225
+ # Add a custom suffix to the output filename
226
+ assy-cli sync video.mkv subs.srt --suffix "_custom"
227
+
228
+ # Inspect or persist user config
229
+ assy-cli config path
230
+ assy-cli config get sync_tool
231
+ assy-cli config set sync_tool alass
232
+ ```
233
+
234
+ | Subcommand | Purpose |
235
+ |---|---|
236
+ | `sync` | Auto-sync one subtitle to a video or reference subtitle |
237
+ | `shift` | Shift subtitle timing by milliseconds |
238
+ | `batch` | Process many pairs from `--folder`, `--video-dir`+`--subtitle-dir`, or repeated `--pair` |
239
+ | `config` | `get` / `set` / `unset` / `list` / `path` for the user config JSON |
240
+ | `version` | Print version |
241
+
242
+ **Exit codes:** `0` success · `1` at least one sync failed · `2` usage or config error · `130` SIGINT.
243
+
244
+ **JSON mode** (`--json`) writes structured results to stdout (one object per sync; for `batch`, NDJSON plus a final `{"summary": ...}` line) while human-readable logs go to stderr. Pipe straight into `jq`:
245
+
246
+ ```bash
247
+ assy-cli sync video.mkv subs.srt --json | jq -r '.output'
248
+ ```
249
+
250
+ **Run from Docker** with no display:
251
+
252
+ ```bash
253
+ docker build -f Dockerfile.cli -t autosubsync-cli .
254
+ docker run --rm -v "$PWD:/data" autosubsync-cli sync /data/video.mkv /data/subs.srt -o /data/out.srt
255
+ ```
256
+
257
+ Or via compose: `docker compose --profile cli run --rm assy-cli sync /data/video.mkv /data/subs.srt`.
258
+
178
259
  ## `Features`
179
260
 
180
261
  ### Automatic Synchronization
@@ -333,9 +414,9 @@ This eliminates the need to navigate through file browser dialogs for most opera
333
414
 
334
415
  ### Interface Languages
335
416
 
336
- The application interface is available in 22 languages:
417
+ The application interface is available in 23 languages:
337
418
 
338
- `English`, `Español`, `Deutsch`, `Français`, `Italiano`, `Polski`, `Português`, `Türkçe`, `Tiếng Việt`, `Bahasa Indonesia`, `Bahasa Melayu`, `ไทย`, `Українська`, `Русский`, `中文`, `日本語`, `한국어`, `हिन्दी`, `বাংলা`, `العربية`, `فارسی`, `اردو`
419
+ `English`, `Español`, `Deutsch`, `Français`, `Italiano`, `Polski`, `Português`, `Türkçe`, `Tiếng Việt`, `Bahasa Indonesia`, `Bahasa Melayu`, `ไทย`, `Українська`, `Русский`, `中文`, `繁體中文`, `日本語`, `한국어`, `हिन्दी`, `বাংলা`, `العربية`, `فارسی`, `اردو`
339
420
 
340
421
  Change the language from `Settings` → `Language`. The interface will update after restarting the application.
341
422
 
@@ -358,6 +439,7 @@ Access settings via the gear icon in the **top right** corner.
358
439
  | **Keep extracted subtitles** | When synchronizing against embedded video subtitles, keep the extracted subtitle files instead of deleting them after processing. |
359
440
  | **Keep converted subtitles** | When subtitle format conversion is required, keep the converted file instead of deleting it after processing. |
360
441
  | **Add "tool_" prefix to subtitles** | Add the name of the sync tool (e.g., `ffsubsync_`, `alass_`) to the beginning of the output subtitle filename. |
442
+ | **Add custom suffix for subtitles** | Add a custom suffix to the end of the output subtitle filename (ignored in "Overwrite input subtitle" mode). |
361
443
  | **Open config file directory** | Open the folder where configuration files and databases (`processed_items.db`, `library_folders.db`) are stored. |
362
444
  | **Open logs directory** | Open the folder where application log files are stored for troubleshooting. |
363
445
  | **Keep log records** | When enabled, saves detailed logs of synchronization operations for debugging purposes. |
@@ -369,10 +451,6 @@ Access settings via the gear icon in the **top right** corner.
369
451
 
370
452
  ---
371
453
 
372
- ## `Docker Guide`
373
- Thanks to [@IlmariKu](https://github.com/IlmariKu), you can now run AutoSubSync in a Docker container. This makes it easier to deploy and run AutoSubSync in different environments without worrying about dependencies.
374
- > ### [Go to Docker Guide](DOCKER.md)
375
-
376
454
  ## `Contributing`
377
455
  I welcome contributions! If you have ideas for new features, improvements, or bug fixes, please fork the repository and submit a pull request.
378
456
 
@@ -394,4 +472,53 @@ Thanks to creators of [ffsubsync](https://github.com/smacke/ffsubsync), [autosub
394
472
  > [!IMPORTANT]
395
473
  > The automatic sync feature is not always perfect. I recommend you to check the subtitles after syncing.
396
474
 
475
+ ## `How to uninstall?`
476
+
477
+ Before uninstalling, you may want to cleanup your settings and logs. Open AutoSubSync and go to:
478
+
479
+ - `Settings` → `Open config file directory` to locate your configuration files and databases. **(You may want to back up these files if you plan to reinstall AutoSubSync later.)**
480
+ - `Settings` → `Open logs directory` to delete log files.
481
+
482
+ Then, follow the appropriate method below based on how you installed AutoSubSync:
483
+
484
+ <details>
485
+ <summary><strong>If installed with pip</strong></summary>
486
+
487
+ ```bash
488
+ pip uninstall assy
489
+ ```
490
+ </details>
491
+
492
+ <details>
493
+ <summary><strong>If installed with uv</strong></summary>
494
+
495
+ ```bash
496
+ uv tool uninstall assy
497
+ ```
498
+ </details>
499
+
500
+ <details>
501
+ <summary><strong>If installed from AUR (yay)</strong></summary>
502
+
503
+ ```bash
504
+ yay -R autosubsync-bin
505
+ ```
506
+ </details>
507
+
508
+ <details>
509
+ <summary><strong>If using AppImage or standalone binary</strong></summary>
510
+
511
+ - **Linux:** Delete the `AppImage` file from your system.
512
+ - **macOS:** Delete the `.app` file from your Applications or wherever you placed it.
513
+ - **Windows:** Delete the folder that contains the extracted files (including the `.exe`).
514
+ </details>
515
+
516
+ <details>
517
+ <summary><strong>If you created a virtual environment</strong></summary>
518
+
519
+ Simply remove the virtual environment directory you created for AutoSubSync.
520
+ </details>
521
+
522
+ ---
523
+
397
524
  > Tags: automatic subtitle synchronization, autosubsync, automatic sub sync, subtitle synchronization, resync subtitles, re-sync subtitles, subtitle shifter, subtitle adjuster, subtitle tools, subtitle utilities, synchronize subtitles, adjust subtitle timing, subtitle management, Python subtitle tool, subtitle manipulation, subtitle synchronization script, subtitle sync fixing, subtitle sync fix, fix subtitle sync.
@@ -2,10 +2,12 @@
2
2
 
3
3
  [![Build Status](https://github.com/denizsafak/AutoSubSync/actions/workflows/app.yml/badge.svg)](https://github.com/denizsafak/AutoSubSync/actions)
4
4
  <a href="https://github.com/psf/black"><img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg"></a>
5
- [![GitHub Release](https://img.shields.io/github/v/release/denizsafak/AutoSubSync)](https://github.com/denizsafak/AutoSubSync/releases/latest)
6
5
  [![PyPI version](https://img.shields.io/pypi/v/assy)](https://pypi.org/project/assy/)
6
+ [![GitHub Release](https://img.shields.io/github/v/release/denizsafak/AutoSubSync)](https://github.com/denizsafak/AutoSubSync/releases/latest)
7
7
  [![Operating Systems](https://img.shields.io/badge/os-windows%20%7C%20linux%20%7C%20macos%20-blue)](https://github.com/denizsafak/AutoSubSync/releases/latest)
8
- [![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/denizsafak/AutoSubSync/total?color=blue)](https://github.com/denizsafak/AutoSubSync/releases/latest)
8
+ ![Pepy Total Downloads](https://img.shields.io/pepy/dt/assy?label=downloads%20(pypi)&color=blue)
9
+ [![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/denizsafak/AutoSubSync/total?color=blue&label=downloads%20(github))](https://github.com/denizsafak/AutoSubSync/releases/latest)
10
+
9
11
 
10
12
  AutoSubSync is a user-friendly tool that automatically synchronizes your subtitles with your videos using powerful tools such as [ffsubsync](https://github.com/smacke/ffsubsync), [autosubsync](https://github.com/oseiskar/autosubsync) and [alass](https://github.com/kaegi/alass). It also lets you manually adjust the subtitle timings. Just drag and drop your files, and let AutoSubSync do the rest, making subtitle alignment both simple and efficient.
11
13
 
@@ -55,7 +57,9 @@ yay -S autosubsync-bin
55
57
  > ```
56
58
 
57
59
  ### PyPI (All Platforms)
58
- You can install AutoSubSync using either pip or uv (a fast Python package manager) on any platform with Python 3.10+:
60
+ [![PyPi Python Versions](https://img.shields.io/pypi/pyversions/assy)](https://pypi.org/project/assy/)
61
+
62
+ You can install AutoSubSync using either pip or uv (a fast Python package manager) on any platform with Python 3.10 - 3.13:
59
63
 
60
64
 
61
65
  ```bash
@@ -66,7 +70,7 @@ pip install assy
66
70
  <summary><strong>With uv (click to expand)</strong></summary>
67
71
 
68
72
  ```bash
69
- uv pip install --system assy
73
+ uv tool install assy
70
74
  ```
71
75
 
72
76
  </details>
@@ -80,7 +84,7 @@ pip install assy[torch]
80
84
  <summary><strong>With uv (click to expand)</strong></summary>
81
85
 
82
86
  ```bash
83
- uv pip install --system assy[torch]
87
+ uv tool install assy[torch]
84
88
  ```
85
89
 
86
90
  </details>
@@ -90,23 +94,44 @@ uv pip install --system assy[torch]
90
94
  assy
91
95
  ```
92
96
 
97
+
93
98
  #### If your system Python is not compatible (e.g., macOS with older Python):
94
99
 
95
- If your system Python version is below 3.10 or above 3.13, you can use `uv` to automatically download a compatible Python version and run AutoSubSync:
100
+ If your system Python version is below 3.10 or above 3.13, the recommended solution is to use [`uv`](https://docs.astral.sh/uv/getting-started/installation/) to install and run AutoSubSync with a compatible Python version automatically.
96
101
 
97
- ```bash
98
- # One-liner to run AutoSubSync with a compatible Python (downloads Python 3.12 if needed)
99
- uvx --python 3.12 assy
102
+ **First, install `uv` by following the instructions at [astral.sh/uv](https://docs.astral.sh/uv/getting-started/installation/).**
103
+
104
+ Then, simply run:
100
105
 
101
- # Or create a virtual environment with a specific Python version
102
- uv venv --python 3.12
103
- uv pip install assy
104
- uv run assy
106
+ ```bash
107
+ uv tool install assy
108
+ # Then run with:
109
+ assy
105
110
  ```
106
111
 
112
+ This will ensure you have a compatible Python version and the latest AutoSubSync installed, regardless of your system Python.
113
+
107
114
  > You can install uv from [astral.sh/uv](https://docs.astral.sh/uv/getting-started/installation/).
108
115
 
109
- ---
116
+
117
+ ### Docker Guide
118
+ Thanks to [@IlmariKu](https://github.com/IlmariKu) in PR [#61](https://github.com/denizsafak/AutoSubSync/pull/61), you can run AutoSubSync in a Docker container. This makes it easier to deploy and run AutoSubSync in different environments without worrying about dependencies.
119
+
120
+ ```bash
121
+ # Navigate to the AutoSubSync directory
122
+ cd AutoSubSync
123
+
124
+ # Create input and output directories
125
+ mkdir -p input output desktop
126
+
127
+ # Build and run the container
128
+ docker-compose up --build -d
129
+ ```
130
+ To access the GUI, open your web browser and go to: [http://localhost:6080](http://localhost:6080)
131
+
132
+ > [!TIP]
133
+ > For detailed instructions, go the Docker guide:
134
+ > ### **[Go to Docker Guide](DOCKER.md)**
110
135
 
111
136
  ## `How to use?`
112
137
 
@@ -132,6 +157,62 @@ uv run assy
132
157
  4. Select output location
133
158
  5. Click `Start`
134
159
 
160
+ ### Command-line interface (`assy-cli`)
161
+
162
+ For autonomous pipelines, CI/CD, scheduled jobs, and Docker, AutoSubSync ships a
163
+ fully-featured CLI that never starts a Qt event loop or requires a display.
164
+
165
+ ```bash
166
+ # Auto-sync one subtitle (machine-readable output)
167
+ assy-cli sync video.mkv subs.srt -o synced.srt --json
168
+ # {"ok": true, "input": "subs.srt", "output": "synced.srt", "tool": "ffsubsync", ...}
169
+
170
+ # Shift a subtitle by 1.5 seconds
171
+ assy-cli shift subs.srt 1500 -o shifted.srt
172
+
173
+ # Batch sync a folder of pairs and continue past failures
174
+ assy-cli batch --folder ./episodes --continue-on-error --json
175
+
176
+ # Two-folder pairing with explicit output dir
177
+ assy-cli batch --video-dir ./videos --subtitle-dir ./subs -o ./out --json
178
+
179
+ # Pick a sync engine per call
180
+ assy-cli sync video.mkv subs.srt -t alass
181
+
182
+ # Add a custom suffix to the output filename
183
+ assy-cli sync video.mkv subs.srt --suffix "_custom"
184
+
185
+ # Inspect or persist user config
186
+ assy-cli config path
187
+ assy-cli config get sync_tool
188
+ assy-cli config set sync_tool alass
189
+ ```
190
+
191
+ | Subcommand | Purpose |
192
+ |---|---|
193
+ | `sync` | Auto-sync one subtitle to a video or reference subtitle |
194
+ | `shift` | Shift subtitle timing by milliseconds |
195
+ | `batch` | Process many pairs from `--folder`, `--video-dir`+`--subtitle-dir`, or repeated `--pair` |
196
+ | `config` | `get` / `set` / `unset` / `list` / `path` for the user config JSON |
197
+ | `version` | Print version |
198
+
199
+ **Exit codes:** `0` success · `1` at least one sync failed · `2` usage or config error · `130` SIGINT.
200
+
201
+ **JSON mode** (`--json`) writes structured results to stdout (one object per sync; for `batch`, NDJSON plus a final `{"summary": ...}` line) while human-readable logs go to stderr. Pipe straight into `jq`:
202
+
203
+ ```bash
204
+ assy-cli sync video.mkv subs.srt --json | jq -r '.output'
205
+ ```
206
+
207
+ **Run from Docker** with no display:
208
+
209
+ ```bash
210
+ docker build -f Dockerfile.cli -t autosubsync-cli .
211
+ docker run --rm -v "$PWD:/data" autosubsync-cli sync /data/video.mkv /data/subs.srt -o /data/out.srt
212
+ ```
213
+
214
+ Or via compose: `docker compose --profile cli run --rm assy-cli sync /data/video.mkv /data/subs.srt`.
215
+
135
216
  ## `Features`
136
217
 
137
218
  ### Automatic Synchronization
@@ -290,9 +371,9 @@ This eliminates the need to navigate through file browser dialogs for most opera
290
371
 
291
372
  ### Interface Languages
292
373
 
293
- The application interface is available in 22 languages:
374
+ The application interface is available in 23 languages:
294
375
 
295
- `English`, `Español`, `Deutsch`, `Français`, `Italiano`, `Polski`, `Português`, `Türkçe`, `Tiếng Việt`, `Bahasa Indonesia`, `Bahasa Melayu`, `ไทย`, `Українська`, `Русский`, `中文`, `日本語`, `한국어`, `हिन्दी`, `বাংলা`, `العربية`, `فارسی`, `اردو`
376
+ `English`, `Español`, `Deutsch`, `Français`, `Italiano`, `Polski`, `Português`, `Türkçe`, `Tiếng Việt`, `Bahasa Indonesia`, `Bahasa Melayu`, `ไทย`, `Українська`, `Русский`, `中文`, `繁體中文`, `日本語`, `한국어`, `हिन्दी`, `বাংলা`, `العربية`, `فارسی`, `اردو`
296
377
 
297
378
  Change the language from `Settings` → `Language`. The interface will update after restarting the application.
298
379
 
@@ -315,6 +396,7 @@ Access settings via the gear icon in the **top right** corner.
315
396
  | **Keep extracted subtitles** | When synchronizing against embedded video subtitles, keep the extracted subtitle files instead of deleting them after processing. |
316
397
  | **Keep converted subtitles** | When subtitle format conversion is required, keep the converted file instead of deleting it after processing. |
317
398
  | **Add "tool_" prefix to subtitles** | Add the name of the sync tool (e.g., `ffsubsync_`, `alass_`) to the beginning of the output subtitle filename. |
399
+ | **Add custom suffix for subtitles** | Add a custom suffix to the end of the output subtitle filename (ignored in "Overwrite input subtitle" mode). |
318
400
  | **Open config file directory** | Open the folder where configuration files and databases (`processed_items.db`, `library_folders.db`) are stored. |
319
401
  | **Open logs directory** | Open the folder where application log files are stored for troubleshooting. |
320
402
  | **Keep log records** | When enabled, saves detailed logs of synchronization operations for debugging purposes. |
@@ -326,10 +408,6 @@ Access settings via the gear icon in the **top right** corner.
326
408
 
327
409
  ---
328
410
 
329
- ## `Docker Guide`
330
- Thanks to [@IlmariKu](https://github.com/IlmariKu), you can now run AutoSubSync in a Docker container. This makes it easier to deploy and run AutoSubSync in different environments without worrying about dependencies.
331
- > ### [Go to Docker Guide](DOCKER.md)
332
-
333
411
  ## `Contributing`
334
412
  I welcome contributions! If you have ideas for new features, improvements, or bug fixes, please fork the repository and submit a pull request.
335
413
 
@@ -351,4 +429,53 @@ Thanks to creators of [ffsubsync](https://github.com/smacke/ffsubsync), [autosub
351
429
  > [!IMPORTANT]
352
430
  > The automatic sync feature is not always perfect. I recommend you to check the subtitles after syncing.
353
431
 
432
+ ## `How to uninstall?`
433
+
434
+ Before uninstalling, you may want to cleanup your settings and logs. Open AutoSubSync and go to:
435
+
436
+ - `Settings` → `Open config file directory` to locate your configuration files and databases. **(You may want to back up these files if you plan to reinstall AutoSubSync later.)**
437
+ - `Settings` → `Open logs directory` to delete log files.
438
+
439
+ Then, follow the appropriate method below based on how you installed AutoSubSync:
440
+
441
+ <details>
442
+ <summary><strong>If installed with pip</strong></summary>
443
+
444
+ ```bash
445
+ pip uninstall assy
446
+ ```
447
+ </details>
448
+
449
+ <details>
450
+ <summary><strong>If installed with uv</strong></summary>
451
+
452
+ ```bash
453
+ uv tool uninstall assy
454
+ ```
455
+ </details>
456
+
457
+ <details>
458
+ <summary><strong>If installed from AUR (yay)</strong></summary>
459
+
460
+ ```bash
461
+ yay -R autosubsync-bin
462
+ ```
463
+ </details>
464
+
465
+ <details>
466
+ <summary><strong>If using AppImage or standalone binary</strong></summary>
467
+
468
+ - **Linux:** Delete the `AppImage` file from your system.
469
+ - **macOS:** Delete the `.app` file from your Applications or wherever you placed it.
470
+ - **Windows:** Delete the folder that contains the extracted files (including the `.exe`).
471
+ </details>
472
+
473
+ <details>
474
+ <summary><strong>If you created a virtual environment</strong></summary>
475
+
476
+ Simply remove the virtual environment directory you created for AutoSubSync.
477
+ </details>
478
+
479
+ ---
480
+
354
481
  > Tags: automatic subtitle synchronization, autosubsync, automatic sub sync, subtitle synchronization, resync subtitles, re-sync subtitles, subtitle shifter, subtitle adjuster, subtitle tools, subtitle utilities, synchronize subtitles, adjust subtitle timing, subtitle management, Python subtitle tool, subtitle manipulation, subtitle synchronization script, subtitle sync fixing, subtitle sync fix, fix subtitle sync.
assy-6.4/main/VERSION ADDED
@@ -0,0 +1 @@
1
+ 6.4
@@ -4,6 +4,7 @@ import runpy, os, threading
4
4
  import logging
5
5
  from multiprocessing import freeze_support
6
6
  from utils import get_resource_path
7
+ import compat # Shim for pkg_resources (removed in Python 3.14+)
7
8
 
8
9
  # Monkey-patch subprocess.Popen to always use CREATE_NO_WINDOW on Windows
9
10
  import subprocess
@@ -1,7 +1,7 @@
1
1
  import sys
2
2
  import platform
3
3
  from multiprocessing import freeze_support
4
- from ffsubsync.ffsubsync import main
4
+ import compat # Shim for pkg_resources (removed in Python 3.14+)
5
5
 
6
6
  # Monkey-patch subprocess.Popen to always use CREATE_NO_WINDOW on Windows
7
7
  import subprocess
@@ -18,6 +18,14 @@ if platform.system() == "Windows":
18
18
  subprocess.Popen = _patched_popen
19
19
 
20
20
 
21
+ def _load_ffsubsync():
22
+ try:
23
+ from ffsubsync.ffsubsync import main as ffsubsync_main
24
+ return ffsubsync_main, None
25
+ except Exception as e:
26
+ return None, e
27
+
28
+
21
29
  def cli_entry(args=None):
22
30
  """
23
31
  Entry point for module-based execution. Accepts a list of arguments (excluding script name),
@@ -26,15 +34,26 @@ def cli_entry(args=None):
26
34
  """
27
35
  import sys as _sys
28
36
 
37
+ ffsubsync_main, import_error = _load_ffsubsync()
38
+ if ffsubsync_main is None:
39
+ msg = (
40
+ "ffsubsync is not available. Install it with 'pip install ffsubsync' "
41
+ "or 'pip install assy' to use this sync tool."
42
+ )
43
+ print(msg, file=_sys.stderr)
44
+ if import_error:
45
+ print(f"Import error: {import_error}", file=_sys.stderr)
46
+ return 1
47
+
29
48
  old_argv = _sys.argv
30
49
  if args is not None:
31
50
  _sys.argv = [old_argv[0]] + args
32
51
  try:
33
- return main()
52
+ return ffsubsync_main()
34
53
  finally:
35
54
  _sys.argv = old_argv
36
55
 
37
56
 
38
57
  if __name__ == "__main__":
39
58
  freeze_support() # fix https://github.com/pyinstaller/pyinstaller/issues/4104
40
- sys.exit(main())
59
+ sys.exit(cli_entry())