Removing boop and twitnit
This commit is contained in:
parent
e520fc99a4
commit
76c67a86b7
2 changed files with 0 additions and 40 deletions
|
@ -1,20 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Siina's bootleg boop.icu uploader
|
||||
#
|
||||
# Requires:
|
||||
# - xsel: for clipboard manipulation
|
||||
# - curl: for uploading
|
||||
remote="https://boop.icu"
|
||||
sound="$HOME/Projects/local-bin/sounds/success.ogg"
|
||||
|
||||
# Make sure necessary applications are installed
|
||||
if [[ ! -n "$(which xsel)" ]]; then echo "Please install xsel"; exit; fi
|
||||
if [[ ! -n "$(which curl)" ]]; then echo "Please install curl"; exit; fi
|
||||
|
||||
url=$(curl -F"file=@$1" $remote)
|
||||
echo "$url" | tr -d '\n' | xsel -ib -l /tmp/xsel.log
|
||||
|
||||
if [[ -n "$(which ffplay)" ]]; then
|
||||
ffplay $sound -nodisp -autoexit -loglevel error
|
||||
fi
|
|
@ -1,20 +0,0 @@
|
|||
#!/bin/sh
|
||||
# Requires xsel
|
||||
if ! xsel --version &>/dev/null || ! notify-send --version &>/dev/null; then
|
||||
echo "Make sure this machien has xsel and notify-send"
|
||||
exit
|
||||
fi
|
||||
|
||||
# Make sure naked domain is at end
|
||||
m=("mobile.twitter.com" "m.twitter.com" "twitter.com")
|
||||
r="nitter.eu"
|
||||
clip=$(xsel -p -l /tmp/xsel.log)
|
||||
|
||||
for f in ${m[@]}; do
|
||||
echo "looking for $f"
|
||||
if echo "$clip" | grep "$f"; then
|
||||
echo "Found!"
|
||||
clip=$(echo $clip | sed -e "s/${f}/${r}/g" | tr -d '\n' | xsel -ib)
|
||||
notify-send -a TwitNit "Changed $f to $r"
|
||||
fi
|
||||
done
|
Loading…
Reference in a new issue