aboutsummaryrefslogtreecommitdiff
path: root/urlinfo
diff options
context:
space:
mode:
Diffstat (limited to 'urlinfo')
-rwxr-xr-xurlinfo43
1 files changed, 0 insertions, 43 deletions
diff --git a/urlinfo b/urlinfo
deleted file mode 100755
index 276a7bd..0000000
--- a/urlinfo
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/bash
-#
-# Retrieve and set basic URL info.
-#
-
-# Parameters
-BASENAME="`basename $0`"
-URL="$1"
-shift
-TAGS="$*"
-
-# Check
-if [ -z "$URL" ]; then
- echo "usage: $BASENAME <url> [tag1] ... [tagN]"
- exit 1
-fi
-
-# Dispatch
-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:
-#DESC="`torify curl youtube-dl -e $URL`"
-
-# Verify
-if [ -z "$DESC" ]; then
- DESC="$URL"
-fi
-
-# Tag
-if [ ! -z "$TAGS" ]; then
- IDENTIFIER="$URL $TAGS"
-else
- IDENTIFIER="$URL"
-fi
-
-# Display
-if [ "$BASENAME" == "urlinfo" ]; then
- echo "- title: \"$DESC\""
- echo " identifier:"
- echo " - $IDENTIFIER"
-elif [ "$BASENAME" == "urlmd" ]; then
- echo "[$DESC]($URL)"
-fi