The little things give you away... A collection of various small helper stuff
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

21 lines
608 B

  1. #!/bin/bash
  2. if [[ "$1" == '--help' || "$1" == '-h' ]]; then
  3. printf 'Usage: %q [FILENAME]\n' "$0" >&2
  4. printf 'Prints all ignored URLs from the wpull 2.x SQLite DB at FILENAME (default: wpull.db) to stdout\n' >&2
  5. exit
  6. fi
  7. if [[ $# -eq 1 ]]
  8. then
  9. filename="$1"
  10. else
  11. filename=wpull.db
  12. fi
  13. if [[ ! -f "${filename}" ]]
  14. then
  15. printf 'Error: %q does not exist or is not a regular file\n' "${filename}" >&2
  16. exit 1
  17. fi
  18. sqlite3 "${filename}" 'SELECT url FROM queued_urls JOIN url_strings ON url_string_id = url_strings.id WHERE status = "skipped" AND status_code IS NULL AND try_count = 1 AND inline_level IS NULL'