From af0c93f1df39fc47da4855bcbc8aaaa6e3a7fea3 Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Mon, 8 Jan 2024 16:34:10 +0100 Subject: [PATCH 1/3] Update to new organization of warc2zim. Older `warc2zim` method is now named `main`. --- zimit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zimit.py b/zimit.py index cd5d66a..909decb 100755 --- a/zimit.py +++ b/zimit.py @@ -25,7 +25,7 @@ import inotify.adapters import requests from tld import get_fld -from warc2zim.main import warc2zim +from warc2zim.main import main as warc2zim from zimscraperlib.uri import rebuild_uri DEFAULT_USER_AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Safari/605.1.15" From 7bc0ed9c0203d8c0a605028c6ec91779e094ab84 Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Sun, 14 Jan 2024 10:31:38 +0100 Subject: [PATCH 2/3] Use main branch of warc2zim in dockerfile instead of released version. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR adapt to API changed made in main branch of warc2zim, so we must use it instead of released version. --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1909874..298f7ec 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,8 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* \ # python setup (in venv not to conflict with browsertrix) && python3 -m venv /app/zimit \ - && /app/zimit/bin/python -m pip install --no-cache-dir 'requests==2.31.0' 'inotify==0.2.10' 'tld==0.13' 'warc2zim==1.5.4' \ + && /app/zimit/bin/python -m pip install --no-cache-dir 'requests==2.31.0' 'inotify==0.2.10' 'tld==0.13' \ + 'git+https://github.com/openzim/warc2zim@main#egg_name=warc2zim' \ # placeholder (default output location) && mkdir -p /output \ # disable chrome upgrade From bbc8a48bc988a085863a8f7c9b5061f4cbf1da54 Mon Sep 17 00:00:00 2001 From: benoit74 Date: Mon, 15 Jan 2024 07:54:42 +0100 Subject: [PATCH 3/3] Update CHANGELOG --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a3d2894..1a9c7a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] + +### Changed + +- Adapt to new `warc2zim` code structure +- Using `main` warc2zim ⚠️ change before releasing! + ### Added - New `--build` parameter (optional) to specify the directory holding Browsertrix files ; if not set, `--output`