mirror of
https://github.com/dewomser/Toot_music_is_playing.git
synced 2026-03-13 16:37:17 +01:00
tweet_music jetzt mit yt-link
This commit is contained in:
parent
4c642744dd
commit
f774e9bd95
1 changed files with 18 additions and 8 deletions
24
tweet_music
24
tweet_music
|
|
@ -1,19 +1,29 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#//config
|
#//config
|
||||||
#Path twurlis not EXPORT
|
#Path twurlis not EXPORT
|
||||||
# shellcheck disable=SC2086 # code is irrelevant because it is already double quoted grrrr…
|
|
||||||
twurlp="/usr/bin/ruby /home/karl/.local/share/gem/ruby/3.0.0/bin/twurl"
|
twurlp="/usr/bin/ruby /home/karl/.local/share/gem/ruby/3.0.0/bin/twurl"
|
||||||
#twurlp="twurl"
|
#twurlp="twurl"
|
||||||
user="dewomser"
|
user="dewomser"
|
||||||
#//Musikinfo von Clementie Audioplayer holen
|
#//Musikinfo von Clementie Audioplayer holen
|
||||||
readarray a <<< "$(qdbus org.mpris.MediaPlayer2.clementine /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Metadata | grep -E 'artUrl|genre|artist|album:|title:'| sed -e 's/xesam://g'| sed -e 's/mpris:artUrl: file:\/\///g')"
|
readarray -t a <<< "$(qdbus org.mpris.MediaPlayer2.clementine /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Metadata | grep -E 'artUrl|genre|artist|album:|title:'| sed -e 's/xesam://g'| sed -e 's/mpris:artUrl: file:\/\///g')"
|
||||||
#//Bild kopieren
|
#//Bild kopieren
|
||||||
#pfad=$(pwd)
|
pfad=$(pwd)
|
||||||
cp "${a[0]}" cover.jpg
|
#cp ${a[0]} "$pfad"cover.jpg
|
||||||
#cp ${a[0]} $HOME/bin/twitter-pic/cover.jpg
|
cp ${a[0]} $PWD/cover.jpg
|
||||||
# Daten an den Twitterclient
|
# Daten an den Twitterclient
|
||||||
text1=$'ich höre gerade: \n'
|
a[5]="https://www.youtube.com/results?search_query=${a[2]} ${a[4]}"
|
||||||
text="$text1${a[1]}${a[2]}${a[4]}"
|
lolo="${a[5]// /+}"
|
||||||
|
|
||||||
|
text1=$"ich höre gerade:"
|
||||||
|
text="$text1
|
||||||
|
${a[1]}
|
||||||
|
${a[2]}
|
||||||
|
${a[4]}
|
||||||
|
$lolo"
|
||||||
|
|
||||||
|
echo $text
|
||||||
|
|
||||||
|
#exit
|
||||||
#// Bildgröße in Byte ermitteln
|
#// Bildgröße in Byte ermitteln
|
||||||
byte=$(du -b cover.jpg | grep -Eo "^[0-9]+")
|
byte=$(du -b cover.jpg | grep -Eo "^[0-9]+")
|
||||||
#// initialisieren
|
#// initialisieren
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue