From a4627fa1c69596f18060d2f92a1db5e1663df34e Mon Sep 17 00:00:00 2001 From: JustAnotherArchivist Date: Fri, 11 Feb 2022 02:20:28 +0000 Subject: [PATCH] Queue derives with `ia tasks` instead of this manual curl rubbish --- ia-derive | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/ia-derive b/ia-derive index d62cf74..506d2e4 100755 --- a/ia-derive +++ b/ia-derive @@ -1,16 +1,4 @@ #!/bin/bash identifier="$1" if [[ -z "${identifier}" ]]; then exit 1; fi - -cookies="$(grep '^logged-in-' ~/.config/ia.ini | sed 's, = ,=,' | tr '\n' ';' | sed 's,;$,,; s,;,; ,')" - -result="$(curl -s -H "Cookie: ${cookies}" "https://archive.org/manage/${identifier}" --data "identifier=${identifier}&admin=derive")" - -main="$(tr -d '\n' <<<"${result}" | grep -Po '')" -catalogueUrl="$(grep -Po 'task ID: ]\+>,,g' <<< "${main}")" -fi +exec ia tasks "${identifier}" --cmd derive.php