From 3a8b893ce70ebbc9dafe441e7962f86f5dffc547 Mon Sep 17 00:00:00 2001 From: "Y. Meyer-Norwood" <106889957+norwd@users.noreply.github.com> Date: Wed, 11 Dec 2024 13:07:22 +1300 Subject: [PATCH] Make mirror step easier to read --- .github/workflows/mirror.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/mirror.yml b/.github/workflows/mirror.yml index 5df20b3..b232305 100644 --- a/.github/workflows/mirror.yml +++ b/.github/workflows/mirror.yml @@ -35,11 +35,17 @@ jobs: do ENDPOINT="$(curl -sS "${ENDPOINT}" | tee "${TMP_FILE}" | jq --raw-output "${JQ_QUERY}")" cat "${TMP_FILE}" - done | jq --slurp '[.[].results[]]' | tee "index.json" | jq --raw-output '.[].formats[]' | xargs -P "$(nproc)" -IURL wget --no-verbose --execute robots=off --random-wait --wait 10 --no-host-directories --force-directories URL + done | \ + jq --slurp '[.[].results[]]' | \ + tee "index.json" | \ + jq --raw-output '.[].formats[]' | \ + xargs --max-procs="$(nproc)" -IURL \ + wget --no-verbose --execute robots=off --random-wait --wait "${WAIT_SEC}" --no-host-directories --force-directories URL env: ENDPOINT: 'https://gutendex.com/books/?languages=eo' JQ_QUERY: '.next|tostring|sub("^null$"; ""; "i")' TMP_FILE: '${{ runner.temp }}/results' + WAIT_SEC: 10 - name: "Add files" run: git add .