Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
3143bef
Rewrite and Update
l0westbob Mar 7, 2025
a284b1f
set default secret
l0westbob Mar 7, 2025
4fe336a
remove custom stuff
l0westbob Mar 7, 2025
a8ff207
Improve filename and add format parameter for pdf export
l0westbob Mar 8, 2025
1cb1300
Adds metadata option
l0westbob Mar 11, 2025
b71414e
Adds filecheck before processing
l0westbob Mar 11, 2025
a09607b
Adjusts export_path escaping
Mar 11, 2025
142a8d7
Adjusts expected filename
Mar 11, 2025
7226811
Adjusts filename sanitation
Mar 11, 2025
111d4dd
Catches encode/decode errors for filenames
Mar 11, 2025
c31987b
Adjusts meta data key with prepare_filename
Mar 12, 2025
5bb6672
Fix metadata json folder name
l0westbob Mar 16, 2025
067c32b
feat: adds tests and pytest execution on push/pr
l0westbob Feb 13, 2026
571e0d0
feat: upgrade
l0westbob Feb 13, 2026
e669d1f
feat: adds full test coverage/doc strings. removes legacy support
l0westbob Feb 13, 2026
40a445d
feat: hardening the code against failures
l0westbob Feb 13, 2026
678de3e
feat: adds real payload mocking tests
l0westbob Feb 13, 2026
3682659
feat: enforces python 3.14 and adds response shift test
l0westbob Feb 13, 2026
fd82ac0
doc: adds doc string about current secret key
l0westbob Feb 13, 2026
2e26e29
doc: adds pytest coverage
l0westbob Feb 13, 2026
944eae0
feat: Adds docker-image/compose and download all functionality
l0westbob Feb 24, 2026
b2d1f02
fix: Updates compose command
l0westbob Feb 24, 2026
bc1e8d6
feat: Adds language option for download all
l0westbob Feb 24, 2026
335731c
feat: Adds comicinfo xml for cbz
l0westbob Feb 24, 2026
7bfa119
feat: Updates compose command to download all english
l0westbob Feb 24, 2026
d0b0212
fix: Adds missing logging for download-all
l0westbob Feb 24, 2026
a303d78
refactor: Improves/Updates codebase
l0westbob Feb 24, 2026
7450c13
refactor: Improves documentations
l0westbob Feb 25, 2026
b28b4eb
refactor: Improves downloader and docs
l0westbob Feb 25, 2026
63eb78b
refactor: Updates docker image and fixes linting
l0westbob Feb 25, 2026
8df1821
refactor: Changes compose service to cronjob based full download
l0westbob Feb 25, 2026
25dd342
fix: Removes release please
l0westbob Feb 25, 2026
003ef1d
feat: Increase version
l0westbob Feb 25, 2026
730e23d
feat: Adds chapter number back and lets chapter id exist in parallel
l0westbob Feb 25, 2026
240b9bb
fix: Fixes missing test coverage
l0westbob Feb 25, 2026
bebb033
doc: Updates readme
l0westbob Feb 25, 2026
95c7ddf
doc: Updates readme and fixes cases with invalid responses
l0westbob Feb 27, 2026
12e3cf4
Merge branch 'dev'
l0westbob Feb 27, 2026
5acb5b6
doc: Fixes merge conflicts in readme
l0westbob Feb 27, 2026
e8d3ea4
doc: Fixes readme and tests using wrong chapter id
l0westbob Feb 27, 2026
a9077d3
feat: Adds verify scripts for all mloader command examples
l0westbob Feb 27, 2026
a4891b1
chore: runs readme sync command
l0westbob Feb 27, 2026
bf0f67d
feat: Adds OS env safeguard for unsupported values
l0westbob Feb 28, 2026
8b065de
Merge pull request #3 from l0westbob/dev
l0westbob Feb 28, 2026
98b4fd3
feat: Adds pypi package publishing
l0westbob Mar 9, 2026
6751f89
feat: Adds cover download parameter
l0westbob Mar 9, 2026
703dbaa
Merge pull request #6 from l0westbob/issue/cover-download
l0westbob Mar 9, 2026
733da68
Merge pull request #5 from l0westbob/dev
l0westbob Mar 9, 2026
d45b075
fix: Switches cover download to primary cover instead of portrait
l0westbob Mar 9, 2026
a37079b
Merge pull request #7 from l0westbob/fix/cover-selection
l0westbob Mar 9, 2026
3252cbe
rename distribution to mloader-ng
l0westbob Mar 9, 2026
3ba9217
Merge pull request #8 from l0westbob/fix/pypi-publish
l0westbob Mar 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .coverage
Binary file not shown.
13 changes: 13 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.git
.github
.idea
.mypy_cache
.pytest_cache
.ruff_cache
.venv
build
capture
captures
tests
*.egg-info
.coverage
35 changes: 35 additions & 0 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Publish to PyPI

on:
workflow_dispatch:
push:
tags:
- "v*"

jobs:
publish:
name: Build and publish package
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.14"

- name: Install build backend
run: |
python -m pip install --upgrade pip
pip install build

- name: Build distribution artifacts
run: python -m build

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
46 changes: 0 additions & 46 deletions .github/workflows/publish-to-pypi.yml

This file was deleted.

29 changes: 29 additions & 0 deletions .github/workflows/readme-examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Verify README Examples

on:
workflow_dispatch:
schedule:
- cron: "0 6 * * 1"

jobs:
verify-readme-examples:
name: Verify README example targets
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.14"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[dev]

- name: Verify README examples
run: |
python scripts/verify_readme_examples.py
135 changes: 135 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
name: Tests

on:
push:
pull_request:

jobs:
mypy:
name: Mypy type check
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.14"]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[dev]

- name: Run mypy
run: mypy mloader

ruff:
name: Ruff lint
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.14"]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[dev]

- name: Run ruff
run: ruff check .

pytest:
name: Run pytest with coverage
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.14"]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[dev]

- name: Run tests
run: pytest --cov=mloader --cov-report=term-missing --cov-fail-under=100

capture-verify:
name: Verify capture schema fixtures
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.14"]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[dev]

- name: Verify baseline capture schema
run: |
mloader --verify-capture-schema tests/fixtures/api_captures/baseline \
--verify-capture-baseline tests/fixtures/api_captures/baseline

docs-lint:
name: Docs lint (README option sync)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.14"]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[dev]

- name: Run docs lint tests
run: |
python scripts/sync_readme_cli_reference.py --check
pytest -q tests/test_readme_cli_options.py tests/test_cli_readme_reference.py
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,8 @@ venv/
# [date]full_name(id) report folders
\[*\]*\(*\)/
*.egg-info
mloader_downloads/
mloader_downloads/
build
capture/
captures/
!tests/fixtures/**/*.json
68 changes: 68 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Contributing

Thanks for contributing to `mloader`.

## Local setup

1. Use Python 3.14 or newer.
2. Create and activate a virtual environment.
3. Install package and development dependencies:

```bash
pip install -e .[dev]
```

## Development workflow

1. Create a feature branch.
2. Implement change with tests.
3. Run the test suite:

```bash
pytest
```

4. Open a pull request with:
- problem statement
- implementation notes
- test evidence

## Architecture overview

Core areas:
- `mloader/cli/`: command-line interface and argument validation.
- `mloader/manga_loader/`: API integration, normalization, downloading, and decryption mixins.
- `mloader/exporters/`: output backends (`raw`, `cbz`, `pdf`) built on `ExporterBase`.

## Extension points

### Add a new exporter

1. Create a new file in `mloader/exporters/`.
2. Subclass `ExporterBase`.
3. Define a unique `format` class attribute.
4. Implement:
- `add_image(self, image_data, index)`
- `skip_image(self, index)`
5. Export your class from `mloader/exporters/init.py`.
6. Add tests in `tests/test_exporters.py` (or a new test module).

### Add CLI options

1. Add a new click option in `mloader/cli/main.py`.
2. Thread option data into `MangaLoader` or exporter configuration.
3. Add CLI tests in `tests/test_cli_main.py`.

### Add loader behavior

1. Keep API/parsing logic in `mloader/manga_loader/api.py`.
2. Keep download orchestration in `mloader/manga_loader/downloader.py`.
3. Prefer pure helper functions for data transformations.
4. Cover behavior in tests with fakes/mocks, not network calls.

## Quality bar

- No untested behavior changes.
- No network in unit tests.
- Backward-compatible CLI flags unless intentionally deprecated.
- Prefer small, composable changes over broad rewrites.
Loading