summaryrefslogtreecommitdiff
path: root/ia-upload-crawl.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ia-upload-crawl.sh')
-rwxr-xr-xia-upload-crawl.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/ia-upload-crawl.sh b/ia-upload-crawl.sh
new file mode 100755
index 0000000..7610545
--- /dev/null
+++ b/ia-upload-crawl.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+title="$(echo $1 | sed 's/\(-[0-9][0-9][0-9][0-9]-[0-9]\+-[0-9]\+.*\)//g')"
+date="$(echo $1 | sed -n 's/.*\([0-9][0-9][0-9][0-9]-[0-9]\+-[0-9]\+\).*/\1/p')"
+id=$title-$date
+seeds="$(sed 'N;s/\n/, /' $1/seed_urls)"
+
+ia upload $id $1/*.gz --metadata="mediatype:web" \
+--metadata="date:$date" --metadata="title:$title" \
+--metadata="description:recursive crawl of $seeds using https://git.jordan.im/crawl, \
+taken on $date" --metadata="source:$title"