mirror of
https://github.com/dewomser/Toot_music_is_playing.git
synced 2026-03-13 16:37:17 +01:00
Eine Zeile wenigeR
This commit is contained in:
parent
d975558e8a
commit
1112138749
1 changed files with 8 additions and 3 deletions
11
tweet_music
11
tweet_music
|
|
@ -25,7 +25,10 @@ readarray -t a <<< "$(qdbus org.mpris.MediaPlayer2.$player /org/mpris/MediaPlaye
|
|||
|
||||
#//Bild kopieren
|
||||
lolo1=$(urldecode "${a[0]}")
|
||||
cp "$lolo1" "$PWD"/cover.jpg
|
||||
|
||||
convert $lolo1 -gravity south -background YellowGreen -splice 0x18 -annotate +0+2 'Die Tweet_Music-App ist vom @dewomser' cover.jpg
|
||||
|
||||
#cp "$lolo1" "$PWD"/cover.jpg
|
||||
|
||||
# Daten an den Twitterclient
|
||||
a[5]="https://www.youtube.com/results?search_query=${a[2]} ${a[4]}"
|
||||
|
|
@ -41,14 +44,16 @@ Video(geraten):$lolo"
|
|||
#// Bildgröße in Byte ermitteln
|
||||
byte=$(du -b cover.jpg | grep -Eo "^[0-9]+")
|
||||
#// initialisieren
|
||||
mis=$($twurlp -u $user -H upload.twitter.com "/1.1/media/upload.json" -d "command=INIT&media_type=image/jpg&total_bytes=$byte" | jq .media_id_string)
|
||||
mis="${mis:1: -1}"
|
||||
mis=$($twurlp -u $user -H upload.twitter.com "/1.1/media/upload.json" -d "command=INIT&media_type=image/jpg&total_bytes=$byte" | jq -r .media_id_string)
|
||||
# jq -r macht das jetzt mis="${mis:1: -1}"
|
||||
|
||||
#//hochladen
|
||||
$twurlp -u $user -H upload.twitter.com "/1.1/media/upload.json" -d "command=APPEND&media_id=$mis&segment_index=0" --file cover.jpg --file-field "media" | jq .
|
||||
|
||||
|
||||
#//finalisieren
|
||||
$twurlp -u $user -H upload.twitter.com "/1.1/media/upload.json" -d "command=FINALIZE&media_id=$mis" | jq .
|
||||
|
||||
|
||||
#//text hinzufügen
|
||||
$twurlp -u $user "/1.1/statuses/update.json" -d "media_ids=$mis&status=$text"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue