summaryrefslogtreecommitdiff
path: root/getgfailed.sh
diff options
context:
space:
mode:
Diffstat (limited to 'getgfailed.sh')
-rwxr-xr-xgetgfailed.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/getgfailed.sh b/getgfailed.sh
new file mode 100755
index 0000000..9ecd9e3
--- /dev/null
+++ b/getgfailed.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+# See COPYING file for copyright and license details.
+#
+# Tries to download each page listed in a fail log (from a
+# previous run of getgbook -a bookid > faillog)
+
+test $# -ne 2 && echo "usage: $0 bookid faillog" && exit
+
+sort < $2 | sort | shuf | head -n 5 | while read i
+do
+ code=`echo $i|awk '{print $1}'`
+ echo $code | getgbook $1
+done