Add sample image download helper script.
authorIvan Alejandro <ivanalejandro0@gmail.com>
Fri, 10 Jan 2014 18:45:11 +0000 (15:45 -0300)
committerIvan Alejandro <ivanalejandro0@gmail.com>
Mon, 13 Jan 2014 19:18:11 +0000 (16:18 -0300)
src/util/lorempixel-downloader.sh [new file with mode: 0755]

diff --git a/src/util/lorempixel-downloader.sh b/src/util/lorempixel-downloader.sh
new file mode 100755 (executable)
index 0000000..84b1a9a
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+# small script that allows you to download some random images from lorempixel
+
+download_images(){
+    # args:
+    #   $1: initial number
+    #   $2: final number
+    #   $3: image width
+    #   $4: image height
+    for n in $(seq -w $1 $2); do wget http://lorempixel.com/$3/$4/ -O $n.jpg; done
+}
+
+# download a set of images from 01..30
+
+# 5 images 640x480
+download_images 01 05 640 480
+
+# 5 images 1280x720
+download_images 05 10 1280 720
+
+# 5 images 1920x1080
+download_images 10 15 1920 1080