mirror of
https://github.com/dewomser/Toot_music_is_playing.git
synced 2026-03-13 16:37:17 +01:00
Zeilenumbruch nach ich höre gerade bei toot und tweet
This commit is contained in:
parent
db0e6ced1d
commit
b96e088d95
2 changed files with 11 additions and 14 deletions
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
|
||||
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')"
|
||||
toot post "${a[1]} ${a[2]} ${a[3]} ${a[4]}" --media "${a[0]}"
|
||||
#!/bin/bash
|
||||
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:[[:space:]]file:\/\///g')"
|
||||
echo -e "Ich höre gerade \n${a[1]}${a[2]}${a[3]}${a[4]}"| toot post --media ${a[0]}
|
||||
|
|
|
|||
19
tweet_music
19
tweet_music
|
|
@ -1,21 +1,18 @@
|
|||
#!/bin/bash
|
||||
#//config. Twitteruser wihout @
|
||||
#//config
|
||||
#Path twurlis not EXPORT
|
||||
twurlp="/usr/bin/ruby /home/karl/.local/share/gem/ruby/3.0.0/bin/twurl"
|
||||
#twurlp="twurl"
|
||||
user="dewomser"
|
||||
#if you need full path … find with which ruby ; which twurl
|
||||
#twurlp="/usr/bin/ruby /home/foo/.local/share/gem/ruby/3.0.0/bin/twurl"
|
||||
twurlp="twurl"
|
||||
user="twitteruser"
|
||||
#//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')"
|
||||
|
||||
#//Bild kopieren
|
||||
# no quotes variable no format - strip \n
|
||||
pfad=$(pwd)
|
||||
# shellcheck disable=SC2086
|
||||
cp ${a[0]} "$pfad/cover.jpg"
|
||||
#cp ${a[0]} $HOME/git/twitter-pic/cover.jpg
|
||||
cp ${a[0]} cover.jpg
|
||||
#cp ${a[0]} $HOME/bin/twitter-pic/cover.jpg
|
||||
# Daten an den Twitterclient
|
||||
text="Ich höre gerade:${a[1]}${a[2]}${a[4]}"
|
||||
text1=$'ich höre gerade: \n'
|
||||
text="$text1${a[1]}${a[2]}${a[4]}"
|
||||
#// Bildgröße in Byte ermitteln
|
||||
byte=$(du -b cover.jpg | grep -Eo "^[0-9]+")
|
||||
#// initialisieren
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue