aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2021-02-19 16:14:08 -0300
committerSilvio Rhatto <rhatto@riseup.net>2021-02-19 16:14:08 -0300
commitd2d12680f7b81d4a5655759e8f25d5941a9589c8 (patch)
tree629c7f3152d7aafd7b2465d7e696716b3581eb9d
parent835d41f2cd5eafbbd5ff92eae66b1a0d91c5547b (diff)
downloadscripts-d2d12680f7b81d4a5655759e8f25d5941a9589c8.tar.gz
scripts-d2d12680f7b81d4a5655759e8f25d5941a9589c8.tar.bz2
Feat: adds urlssave
-rwxr-xr-xurlinfo1
-rwxr-xr-xurlsave1
-rwxr-xr-xurlssave9
3 files changed, 11 insertions, 0 deletions
diff --git a/urlinfo b/urlinfo
index cde32fa..cce2113 100755
--- a/urlinfo
+++ b/urlinfo
@@ -16,6 +16,7 @@ if [ -z "$URL" ]; then
fi
# Dispatch
+echo "Getting info for $URL..."
DESC="`torify curl --max-redirs 10 -L -s $URL | grep -i "<title>" | sed -n 's/.*<title>\(.*\)<\/title>.*/\1/ip;T;q' 2> /dev/null`"
# YouTube:
diff --git a/urlsave b/urlsave
index afef452..e58245c 100755
--- a/urlsave
+++ b/urlsave
@@ -17,4 +17,5 @@ if [ -z "$URLFILE" ] || [ ! -e "$URLFILE" ]; then
fi
# Dispatch
+echo "" >> $URLFILE
urlinfo $* >> $URLFILE
diff --git a/urlssave b/urlssave
new file mode 100755
index 0000000..85c7a6f
--- /dev/null
+++ b/urlssave
@@ -0,0 +1,9 @@
+#!/bin/bash
+#
+# Save multiple URLs using the same tags.
+#
+
+# Dispatch
+while read url; do
+ urlsave $url $*
+done