archive-ferry 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. archive_ferry-0.1.0/.github/workflows/ci.yml +32 -0
  2. archive_ferry-0.1.0/.github/workflows/release.yml +49 -0
  3. archive_ferry-0.1.0/.gitignore +13 -0
  4. archive_ferry-0.1.0/CHANGELOG.md +14 -0
  5. archive_ferry-0.1.0/LICENSE +661 -0
  6. archive_ferry-0.1.0/PKG-INFO +270 -0
  7. archive_ferry-0.1.0/README.md +242 -0
  8. archive_ferry-0.1.0/pyproject.toml +63 -0
  9. archive_ferry-0.1.0/src/archive_ferry/__init__.py +3 -0
  10. archive_ferry-0.1.0/src/archive_ferry/__main__.py +3 -0
  11. archive_ferry-0.1.0/src/archive_ferry/archive.py +193 -0
  12. archive_ferry-0.1.0/src/archive_ferry/cli.py +346 -0
  13. archive_ferry-0.1.0/src/archive_ferry/config.py +135 -0
  14. archive_ferry-0.1.0/src/archive_ferry/db.py +254 -0
  15. archive_ferry-0.1.0/src/archive_ferry/doctor.py +65 -0
  16. archive_ferry-0.1.0/src/archive_ferry/downloader.py +149 -0
  17. archive_ferry-0.1.0/src/archive_ferry/lock.py +56 -0
  18. archive_ferry-0.1.0/src/archive_ferry/power.py +35 -0
  19. archive_ferry-0.1.0/src/archive_ferry/progress.py +104 -0
  20. archive_ferry-0.1.0/src/archive_ferry/static/fonts/OFL-LibreFranklin.txt +93 -0
  21. archive_ferry-0.1.0/src/archive_ferry/static/fonts/OFL-Newsreader.txt +93 -0
  22. archive_ferry-0.1.0/src/archive_ferry/static/fonts/OFL-UnifrakturMaguntia.txt +94 -0
  23. archive_ferry-0.1.0/src/archive_ferry/static/fonts/libre-franklin.woff2 +0 -0
  24. archive_ferry-0.1.0/src/archive_ferry/static/fonts/newsreader-italic.woff2 +0 -0
  25. archive_ferry-0.1.0/src/archive_ferry/static/fonts/newsreader.woff2 +0 -0
  26. archive_ferry-0.1.0/src/archive_ferry/static/fonts/unifraktur-maguntia.woff2 +0 -0
  27. archive_ferry-0.1.0/src/archive_ferry/static/index.html +719 -0
  28. archive_ferry-0.1.0/src/archive_ferry/sync.py +107 -0
  29. archive_ferry-0.1.0/src/archive_ferry/tools.py +43 -0
  30. archive_ferry-0.1.0/src/archive_ferry/web.py +376 -0
  31. archive_ferry-0.1.0/src/archive_ferry/worker.py +421 -0
  32. archive_ferry-0.1.0/src/archive_ferry/ytdl.py +41 -0
  33. archive_ferry-0.1.0/tests/__init__.py +0 -0
  34. archive_ferry-0.1.0/tests/conftest.py +35 -0
  35. archive_ferry-0.1.0/tests/test_archive.py +37 -0
  36. archive_ferry-0.1.0/tests/test_cleanup_and_speed.py +77 -0
  37. archive_ferry-0.1.0/tests/test_cli.py +25 -0
  38. archive_ferry-0.1.0/tests/test_config.py +39 -0
  39. archive_ferry-0.1.0/tests/test_db.py +40 -0
  40. archive_ferry-0.1.0/tests/test_downloader.py +56 -0
  41. archive_ferry-0.1.0/tests/test_progress.py +43 -0
  42. archive_ferry-0.1.0/tests/test_sync.py +45 -0
  43. archive_ferry-0.1.0/tests/test_tools.py +29 -0
  44. archive_ferry-0.1.0/tests/test_uploader.py +71 -0
  45. archive_ferry-0.1.0/tests/test_web.py +122 -0
  46. archive_ferry-0.1.0/tests/test_worker.py +208 -0
  47. archive_ferry-0.1.0/uv.lock +1107 -0
@@ -0,0 +1,32 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ jobs:
12
+ test:
13
+ name: Test (${{ matrix.os }}, Python ${{ matrix.python }})
14
+ runs-on: ${{ matrix.os }}
15
+ strategy:
16
+ fail-fast: false
17
+ matrix:
18
+ os: [windows-latest, macos-latest, ubuntu-latest]
19
+ python: ["3.10", "3.13"]
20
+ steps:
21
+ - uses: actions/checkout@v4
22
+ - uses: astral-sh/setup-uv@v6
23
+ with:
24
+ python-version: ${{ matrix.python }}
25
+ - name: Install
26
+ run: uv sync --locked
27
+ - name: Test
28
+ run: uv run pytest -q
29
+ - name: Check the commands start
30
+ run: |
31
+ uv run archive-ferry --version
32
+ uv run archive-ferry --home ./doctor-check doctor || true
@@ -0,0 +1,49 @@
1
+ name: Release
2
+
3
+ # Push a tag like v0.1.0 to publish that version to PyPI.
4
+ on:
5
+ push:
6
+ tags: ["v*"]
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ jobs:
12
+ build:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+ - uses: astral-sh/setup-uv@v6
17
+ - name: Check that the tag matches the package version
18
+ run: |
19
+ version=$(uv version --short)
20
+ if [ "v$version" != "$GITHUB_REF_NAME" ]; then
21
+ echo "Tag $GITHUB_REF_NAME does not match version $version in pyproject.toml" >&2
22
+ exit 1
23
+ fi
24
+ - name: Test
25
+ run: |
26
+ uv sync --locked
27
+ uv run pytest -q
28
+ - name: Build
29
+ run: uv build
30
+ - uses: actions/upload-artifact@v4
31
+ with:
32
+ name: dist
33
+ path: dist/
34
+
35
+ publish:
36
+ needs: build
37
+ runs-on: ubuntu-latest
38
+ # Trusted Publishing: PyPI trusts this workflow, so no API token is stored.
39
+ environment:
40
+ name: pypi
41
+ url: https://pypi.org/project/archive-ferry/
42
+ permissions:
43
+ id-token: write
44
+ steps:
45
+ - uses: actions/download-artifact@v4
46
+ with:
47
+ name: dist
48
+ path: dist/
49
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,13 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ .venv/
4
+ .pytest_cache/
5
+ dist/
6
+ build/
7
+ *.egg-info/
8
+ uv.lock.bak
9
+ archive-ferry-data/
10
+ *.db
11
+ *.db-wal
12
+ *.db-shm
13
+ .claude/
@@ -0,0 +1,14 @@
1
+ # Changelog
2
+
3
+ ## 0.1.0 (beta)
4
+
5
+ The first public release.
6
+
7
+ - Copy all videos, shorts and streams of a YouTube channel to the Internet Archive, one video at a time.
8
+ - Pause and resume at any time. A SQLite queue survives crashes and power cuts.
9
+ - Check a channel again to add only its new videos.
10
+ - Delete local files right after each upload. Keep a record of each video in the database.
11
+ - Show the download speed, the upload speed and the time left for the current video.
12
+ - Local web page ("The Archive Record") and a full command line.
13
+ - ffmpeg and Deno come with the package, so nothing else needs to be installed.
14
+ - Licensed under AGPL-3.0-or-later.