From 1bc1487ecca5a730cac2650388cbe5aac9c7ec7a Mon Sep 17 00:00:00 2001 From: JustAnotherArchivist Date: Wed, 11 Mar 2020 21:02:55 +0000 Subject: [PATCH] Add script for extracting remaining wpull 2 queue --- wpull2-extract-remaining | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 wpull2-extract-remaining diff --git a/wpull2-extract-remaining b/wpull2-extract-remaining new file mode 100644 index 0000000..0aeba51 --- /dev/null +++ b/wpull2-extract-remaining @@ -0,0 +1,8 @@ +#!/bin/bash +# Usage: wpull2-extract-remaining FILENAME +# FILENAME points to a wpull 2.x SQLite DB +# Prints all remaining URLs from the DB on stdout +for status in in_progress todo error +do + sqlite3 "$1" 'SELECT url_strings.url FROM queued_urls JOIN url_strings ON url_string_id = url_strings.id WHERE status = "'$status'"' +done