Submerger
Watching movies in a foreign language with dual subtitles is a good way to learn that language. However, most of the subtitles are in a single language. This project aims to overcome that barrier by providing the functionality to create dual subtitles by merging two separate subtitle files.
System requirements
Python >= 3.10
Install
pip install submerger
Install for development
You have to include $HOME/.local/bin to your $PATH. Simply add export PATH="$HOME/.local/bin:$PATH" to .bashrc.
pip install --prefix=$(python -m site --user-base) --editable .
NOTE: --prefix=$(python3 -m site --user-base) is a workaround for a known setuptools issue
Usage
Merge two .srt files
submerge --subtitles subtitle1.srt subtitle2.srt --output dualsub.srt
Create a dual subtitles by extracting embedded subtitles from a video file
submerge --video video.mkv --language eng ger --output dualsub.srt
Merge subtitles for all videos in a directory
submerge --global --language eng ger --directory path/to/series
Check for available subtitles
ffprobe -loglevel error -print_format json video.mkv -print_format json -show_entries "stream=index:stream_tags=language" -select_streams s
Testing
Run unit tests
python scripts/run_tests.py --unit
Run integration tests
python scripts/run_tests.py --integration
Run lint tests
python scripts/run_tests.py --lint
Or run periodically with watch
watch python scripts/run_tests.py --all
License
Metadata
Release files for submerger 2023.5.13
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| submerger-2023.5.13.tar.gz | 21.6 kB | Without provenance | Details for submerger-2023.5.13.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| submerger-2023.5.13-py3-none-any.whl | Python 3 | none | any | Details for submerger-2023.5.13-py3-none-any.whl |
Total release size: 45.0 kB
Release files / submerger-2023.5.13.tar.gz
| Download URL | submerger-2023.5.13.tar.gz |
|---|---|
| Size | 21.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7eef2d47be2e5dc2e0ceaeedddb6947ff4684f88b742f0665e27b3d2b1bfdaa9
|
|
BLAKE2b-256 checksum How to use checksums |
9b3a6ad7500e2d7e29e285108d1db12bf33d4673530ea2f94c075415736a5613
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|
Release files / submerger-2023.5.13-py3-none-any.whl
| Download URL | submerger-2023.5.13-py3-none-any.whl |
|---|---|
| Size | 23.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ca65b08b418c649eb048da5ea8c6865f94a306d02306f51104890d79546abf3c
|
|
BLAKE2b-256 checksum How to use checksums |
601f0a9ef17d3e2d50e0bc8c796020c375c5bc18b9eba74fc4de5eedcd99c1e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|
Security for submerger 2023.5.13
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.