From 913710ded90eb74ffc8d7d2384b9ddc554f3d1bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Ortega=20Froysa?= Date: Mon, 28 Aug 2023 18:08:56 +0200 Subject: [PATCH] Initial commit. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nicolás Ortega Froysa --- invid-conv | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 invid-conv diff --git a/invid-conv b/invid-conv new file mode 100755 index 0000000..f2a05e6 --- /dev/null +++ b/invid-conv @@ -0,0 +1,14 @@ +#!/bin/bash + +YT_URL=$1 +INVID_BASE="https://yewtu.be" + +if [[ $YT_URL == *"youtu.be"* ]] +then + INVID_URL="${INVID_BASE}/watch?v=${YT_URL##*/}" +elif [[ $YT_URL == *"www.youtube.com"* ]] +then + INVID_URL="${INVID_BASE}/${YT_URL##*/}" +fi + +echo $INVID_URL