setup script and url handler

This commit is contained in:
qvalentin 2022-01-01 17:21:46 +01:00
parent 4dcc21854e
commit 53fd8e2857
3 changed files with 21 additions and 0 deletions

7
setup.sh Executable file
View File

@ -0,0 +1,7 @@
#!/usr/bin/env bash
ln -s ./termux-url-opener $HOME/bin/termux-url-opener
ln -S ./das_erste.py $HOME/.scripts/das_erste.py
ln -S ./youtube.py $HOME/.scripts/youtube.py

13
termux-url-opener Executable file
View File

@ -0,0 +1,13 @@
#!/usr/bin/env bash
url=$1
echo $url
if [[ "$url" =~ "youtube" ]]; then
video_id=$(echo $url | sed 's#https://www.youtube.com/watch?v=##g')
echo $video_id
youtube.py $video_id
exit 0
fi
echo "not passed"

1
termux-url-opener.py Executable file
View File

@ -0,0 +1 @@
#!/usr/bin/env bash