12345678910111213141516171819202122232425262728 |
- #!/bin/bash
- # Coding: utf-8
- # Editor: kate
- # Created 2022-02-02
- #_sudo_apt_install_ sendxmpp yt-dlp_linux
- #_sudo_dpkg_i_
- domain="$(echo "$1" | cut -f4 -d"/")"
- post="$(echo "$1" | cut -f5 -d"/")"
- tg_pattern="https://t.me"
- if [[ "$1" == *"$tg_pattern"* ]]
- then
- $HOME/.Telegram/Telegram -workdir $HOME/.local/share/TelegramDesktop/ -- "tg://resolve?domain=${domain}&post=${post}" &
- exit 0
- fi
- title="$($HOME/.local/bin/yt-dlp_linux --print "%(title)s" "$1")"
- yt_pattern="https://www.youtube.com"
- if [[ "$1" == *"$yt_pattern"* ]]
- then
- echo "newsboat_linker.sh $title $1" | sendxmpp -t -f $HOME/.ssh/sendxmpp optron@openim.eu &
- zenity --error --title="newsboat_linker.sh" --text="Link $title send to tvbox" --no-wrap
- exit 0
- fi
|