salin 0.1.0__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 (47) hide show
  1. salin-0.1.0/.github/workflows/ci.yml +44 -0
  2. salin-0.1.0/.github/workflows/publish.yml +54 -0
  3. salin-0.1.0/.gitignore +15 -0
  4. salin-0.1.0/.python-version +1 -0
  5. salin-0.1.0/LICENSE +21 -0
  6. salin-0.1.0/PKG-INFO +670 -0
  7. salin-0.1.0/README.md +648 -0
  8. salin-0.1.0/assets/logo.svg +12 -0
  9. salin-0.1.0/pyproject.toml +57 -0
  10. salin-0.1.0/salin/__init__.py +29 -0
  11. salin-0.1.0/salin/cleaner/__init__.py +19 -0
  12. salin-0.1.0/salin/cleaner/cleaner.py +88 -0
  13. salin-0.1.0/salin/cleaner/dedup.py +53 -0
  14. salin-0.1.0/salin/cleaner/normalize.py +54 -0
  15. salin-0.1.0/salin/cleaner/parsers/__init__.py +97 -0
  16. salin-0.1.0/salin/cleaner/parsers/common.py +64 -0
  17. salin-0.1.0/salin/cleaner/parsers/json3.py +72 -0
  18. salin-0.1.0/salin/cleaner/parsers/srt.py +71 -0
  19. salin-0.1.0/salin/cleaner/parsers/srv.py +151 -0
  20. salin-0.1.0/salin/cleaner/parsers/ttml.py +68 -0
  21. salin-0.1.0/salin/cleaner/parsers/vtt.py +72 -0
  22. salin-0.1.0/salin/client.py +714 -0
  23. salin-0.1.0/salin/core/__init__.py +37 -0
  24. salin-0.1.0/salin/core/downloader.py +690 -0
  25. salin-0.1.0/salin/core/extractor.py +234 -0
  26. salin-0.1.0/salin/core/fetcher.py +130 -0
  27. salin-0.1.0/salin/core/resolver.py +196 -0
  28. salin-0.1.0/salin/core/ytdlp_opts.py +191 -0
  29. salin-0.1.0/salin/error.py +58 -0
  30. salin-0.1.0/salin/languages.py +124 -0
  31. salin-0.1.0/salin/py.typed +0 -0
  32. salin-0.1.0/salin/shared/models.py +258 -0
  33. salin-0.1.0/salin/transcript.py +66 -0
  34. salin-0.1.0/salin/urls.py +36 -0
  35. salin-0.1.0/tests/__init__.py +0 -0
  36. salin-0.1.0/tests/fixtures.py +127 -0
  37. salin-0.1.0/tests/test_cleaner.py +514 -0
  38. salin-0.1.0/tests/test_core.py +195 -0
  39. salin-0.1.0/tests/test_downloader.py +223 -0
  40. salin-0.1.0/tests/test_fetch.py +207 -0
  41. salin-0.1.0/tests/test_info_reuse.py +167 -0
  42. salin-0.1.0/tests/test_paths.py +349 -0
  43. salin-0.1.0/tests/test_rate_limits.py +460 -0
  44. salin-0.1.0/tests/test_request_config.py +545 -0
  45. salin-0.1.0/tests/test_ydl_pool.py +113 -0
  46. salin-0.1.0/tests/test_ytdlp_opts.py +159 -0
  47. salin-0.1.0/uv.lock +546 -0
@@ -0,0 +1,44 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ concurrency:
9
+ group: ${{ github.workflow }}-${{ github.ref }}
10
+ cancel-in-progress: true
11
+
12
+ jobs:
13
+ test:
14
+ name: py${{ matrix.python-version }}
15
+ runs-on: ubuntu-latest
16
+ strategy:
17
+ fail-fast: false
18
+ matrix:
19
+ python-version: ["3.12", "3.13"]
20
+ steps:
21
+ - uses: actions/checkout@v4
22
+
23
+ - name: Install uv
24
+ uses: astral-sh/setup-uv@v5
25
+ with:
26
+ enable-cache: true
27
+
28
+ - name: Install dependencies
29
+ run: uv sync --all-groups --python ${{ matrix.python-version }}
30
+
31
+ - name: Lint
32
+ run: uv run ruff check
33
+
34
+ - name: Check formatting
35
+ run: uv run ruff format --check
36
+
37
+ - name: Type check
38
+ run: uv run ty check
39
+
40
+ - name: Test
41
+ run: uv run pytest
42
+
43
+ - name: Build
44
+ run: uv build
@@ -0,0 +1,54 @@
1
+ name: Publish
2
+
3
+ on:
4
+ push:
5
+ tags: ["v*"]
6
+ workflow_dispatch:
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ jobs:
12
+ build:
13
+ name: Build distributions
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+
18
+ - name: Install uv
19
+ uses: astral-sh/setup-uv@v5
20
+ with:
21
+ enable-cache: true
22
+
23
+ - name: Build
24
+ run: uv build
25
+
26
+ - name: Check metadata
27
+ run: uvx twine check dist/*
28
+
29
+ - name: Upload distributions
30
+ uses: actions/upload-artifact@v4
31
+ with:
32
+ name: dist
33
+ path: dist/
34
+
35
+ publish:
36
+ name: Upload to PyPI
37
+ needs: build
38
+ runs-on: ubuntu-latest
39
+ environment:
40
+ name: pypi
41
+ url: https://pypi.org/p/salin
42
+ permissions:
43
+ id-token: write
44
+ steps:
45
+ - name: Download distributions
46
+ uses: actions/download-artifact@v4
47
+ with:
48
+ name: dist
49
+ path: dist/
50
+
51
+ - name: Publish
52
+ uses: pypa/gh-action-pypi-publish@release/v1
53
+ with:
54
+ packages-dir: dist/
salin-0.1.0/.gitignore ADDED
@@ -0,0 +1,15 @@
1
+ # Python-generated files
2
+ __pycache__/
3
+ *.py[oc]
4
+ build/
5
+ dist/
6
+ wheels/
7
+ *.egg-info
8
+
9
+ # Virtual environments
10
+ .venv
11
+
12
+ # Secrets
13
+ .env
14
+ .env.*
15
+ !.env.example
@@ -0,0 +1 @@
1
+ 3.12
salin-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 krvspacetime
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.