summaryrefslogtreecommitdiff
path: root/funia.sh
diff options
context:
space:
mode:
Diffstat (limited to 'funia.sh')
-rwxr-xr-xfunia.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/funia.sh b/funia.sh
new file mode 100755
index 0000000..c758f58
--- /dev/null
+++ b/funia.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+base_url=https://basic.photofunia.com
+
+tmpfile=$(mktemp /tmp/funia.XXXXXX)
+
+category=$(
+curl -s "$base_url/categories" \
+ | sed -n -e 's/[[:blank:]]//g' -e '/all_effects/d' -e 's|^.*href="/categories/\(.*\)".*$|\1|p' \
+ | sort \
+ | dmenu
+)
+
+page=1
+while curl -so "$tmpfile" "$base_url/categories/$category?page=$page"
+do
+ echo ----- $page -----
+ page="$(($page + 1))"
+done
+
+cat "$tmpfile"