You are not logged in.

#1 2017-01-27 13:03:58

unklar
Member
Registered: 2015-10-31
Posts: 937

[solved]conky and radiotray

Hello everybody,

I recently discovered a radiostation that is exactly the same as my taste.  smile
http://www.radioswisspop.ch/en


With radiotray and the Conky of Sectorr11 wink runs it all day.
Now I would like to present the cover of the title.

On crunchbang I found from dk75 a script, which he wrote especially for the station "lounge-radio".

#!/bin/bash

wget -q http://www.lounge-radio.com/code/pushed_files/now.html -O /tmp/loungeradio.html &&

mawk ' \
	/id="artist"/ {getline; gsub(/<div>|<\/div>|^ +|[\f\n\r]/,""); artist=$0} \
	/id="album"/ {getline; gsub(/<div>|<\/div>|^ +|[\f\n\r]/,""); album=$0} \
	/id="track"/ {getline; gsub(/<div>|<\/div>|^ +|[\f\n\r]/,""); track=$0} \
	END{
		print "${goto 20}Artist:${goto 90}"artist; \
		print "${goto 20}Album:${goto 90}"album; \
		print "${goto 20}Track:${goto 90}"track; \
	} \
	' /tmp/loungeradio.html

wget -q "http://www.lounge-radio.com/code/pushed_files/$(mawk -F"\"" '/id="covercontainer"/ {print $4}' /tmp/loungeradio.html)" -O - | convert - -scale 100x100 /tmp/loungeradio.png &&

echo '${image /tmp/loungeradio.png -p 100,70 -s 100x100}'

exit 

I need only the upper and lower part to cut the cover from the website. The size is 60x60pix.

Artist, album and track I already have in Conky.

Can anyone help?

Last edited by unklar (2017-01-27 20:08:42)

Offline

#2 2017-01-27 14:52:44

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 1,850
Website

Re: [solved]conky and radiotray

to get a cover url?

wget -qO- http://www.radioswisspop.ch/en | grep "hidden-xs cover" # | more filtering here

maybe

wget -qO- http://www.radioswisspop.ch/en | grep "hidden-xs cover" | grep -o -P '(?<=src=\").*(?=\")'

Last edited by brontosaurusrex (2017-01-27 15:00:25)

Offline

#3 2017-01-27 15:11:28

unklar
Member
Registered: 2015-10-31
Posts: 937

Re: [solved]conky and radiotray

Sorry  ops

http://www.radioswisspop.ch/common/images/booklets/web/050/000/014/14773.jpg

this part changing ../014/14773

2017-01-27-16-34-36_scrot.th.png

Last edited by unklar (2017-01-27 15:39:59)

Offline

#4 2017-01-27 15:53:43

loutch
Member
Registered: 2015-12-12
Posts: 383

Re: [solved]conky and radiotray

Hello

here my script to found cover for all radio stream .It use google image search.



 
#!bin/bash

 
titre=$(head -1 ~/.conky/radiotray/artiste_titre.txt)
lienMiniature=$(wget -U'Googlebot-Image/1.0' -qO - "www.google.fr/search?q=$titre\&tbm=isch" | perl -pe 's!.*?<img .*?src="([^"]*)".*!$1!')
wget -qO miniatureGoogleImage $lienMiniature

convert ~/miniatureGoogleImage ~/.conky/radiotray/pochette.png

here line to make .txt in conkyrc

${execi 10 qdbus net.sourceforge.radiotray /net/sourceforge/radiotray getCurrentMetaData| fold -s -w80 > ~/.conky/radiotray/artiste_titre.txt}

here to have image (i use lua )

${texeci 20 ~/.conky/radiotray/pochette.sh}
${lua fDrawImage ~/.conky/radiotray/pochette.png 24 14 68 70}

RFM with U2 cover

1483130123.png

MAXI 80 beach boys

1485532357.png

@+


Linuxmint 19.1 Tessa cinnamon & mageia 7 mate on ssd hp pavilion g7
Xubuntu 18.04 lts & 19.04 xfce on ASUS Rog STRIX

Offline

#5 2017-01-27 19:10:09

unklar
Member
Registered: 2015-10-31
Posts: 937

Re: [solved]conky and radiotray

big_smile  big_smile

Thank you very much, @loutch  smile
It's perfect!

2017-01-27-20-03-28_scrot.th.png

Offline

#6 2017-01-27 19:34:18

loutch
Member
Registered: 2015-12-12
Posts: 383

Re: [solved]conky and radiotray

@ unklar

Great  Radio ,adopted.

For once that it is I who can help

@+


Linuxmint 19.1 Tessa cinnamon & mageia 7 mate on ssd hp pavilion g7
Xubuntu 18.04 lts & 19.04 xfce on ASUS Rog STRIX

Offline

#7 2017-01-27 20:08:01

unklar
Member
Registered: 2015-10-31
Posts: 937

Re: [solved]conky and radiotray

^

@loutch
+1  clapping.gif

Offline

#8 2018-10-01 18:09:13

unklar
Member
Registered: 2015-10-31
Posts: 937

Re: [solved]conky and radiotray

Bonjour loutch,

J'espère que vous lisez encore ici avec

J'ai un problème d'image avec la syntaxe Conky 1.10 (en 1.9 c'est bien)
L'image de la title/couver lue change constamment avec celle de Google et vice-versa.

conky10radiotray.th.png conky10radiotray1.th.png

Vous le connaissez ?
Voici ma configuration:
conkyrc

conky.config = {
	background = true,
	use_xft = true,
	font = 'Liberation Sans:size=8',
	xftalpha = 1,
	update_interval = 1.0,
	total_run_times = 0,
	own_window = true,
	own_window_transparent = true,
--own_window_color 000000
own_window_argb_visual = true,
--own_window_argb_value = 250,
	own_window_type = 'normal',
	own_window_hints = 'undecorated,below,skip_taskbar,skip_pager',
	double_buffer = true,
	minimum_width = 200, minimum_height = 180,
--maximum_width 200
	text_buffer_size = 2048,
	draw_shades = false,
	draw_outline = false,
	draw_borders = false,
	draw_graph_borders = false,
	default_color = 'white',
	default_outline_color = 'white',
	alignment = 'top_right',
	gap_x = 70,
	gap_y = 10,
	no_buffers = true,
	uppercase = false,
	cpu_avg_samples = 2,
	override_utf8_locale = true,
imlib_cache_flush_interval = 60,
	imlib_cache_size = 0,


-- Taille des pointillés
	stippled_borders = 5,

-- Couleurs
	default_color = '#ffffff',--ffd579
	default_shade_color = '#333333',
	default_outline_color = 'black',

lua_load = '~/LUA/image.lua',

};

conky.text = [[
${lua fDrawImage ~/.conky/radiotray/images/caset.png 00 00 150 150}
${voffset 120}${if_match "${execi 5 qdbus net.sourceforge.radiotray /net/sourceforge/radiotray getCurrentMetaData| fold -s -w40}" == "Playing"} 
${else}${execi 5 qdbus net.sourceforge.radiotray /net/sourceforge/radiotray getCurrentMetaData| fold -s -w40 }${endif}
${execi 5 qdbus net.sourceforge.radiotray /net/sourceforge/radiotray getCurrentMetaData| fold -s -w40 > ~/.conky/radiotray/artiste_titre.txt}
${execi 5 qdbus net.sourceforge.radiotray /net/sourceforge/radiotray net.sourceforge.radiotray.getCurrentRadio > ~/.conky/radiotray/logo.txt}
${texeci 5 ~/.conky/radiotray/pochette.sh}${texeci 2 ~/.conky/radiotray/logo.sh}
${if_match "${execi 5 qdbus net.sourceforge.radiotray /net/sourceforge/radiotray getCurrentMetaData| fold -s -w40}" == "Playing"}${lua fDrawImage ~/.conky/radiotray/logo.png 19 19 112 112}
${else}${lua fDrawImage ~/.conky/radiotray/pochette.png 19 19 112 112}${endif}
${voffset -800} 
]];

pochette.sh

 
#!bin/bash
#créé par loutch

 
titre=$(head -1 ~/.conky/radiotray/artiste_titre.txt)
lienMiniature=$(wget -U'Googlebot-Image/1.0' -o /dev/null -O - "www.google.fr/search?q=$titre\&tbm=isch" | perl -pe 's!.*?<img .*?src="([^"]*)".*!$1!')
wget -o /dev/null -O  miniatureGoogleImage $lienMiniature

convert ~/miniatureGoogleImage ~/.conky/radiotray/pochette.png 

logo.sh

 
#!bin/bash
# créé par loutch

 
titre=$(head -1 ~/.conky/radiotray/logo.txt)
lienMiniature=$(wget -U'Googlebot-Image/1.0' -o /dev/null -O - "www.google.fr/search?q=$titre\&tbm=isch" | perl -pe 's!.*?<img .*?src="([^"]*)".*!$1!')
wget -o /dev/null -O Googlelogo $lienMiniature

convert ~/Googlelogo ~/.conky/radiotray/logo.png 

Je vous remercie beaucoup.   smile

Offline

#9 2018-12-18 14:19:36

loutch
Member
Registered: 2015-12-12
Posts: 383

Re: [solved]conky and radiotray

Hello

Ich habe noch keine conky in 1.10 ; vielliecht  hat es mit den texeci ebes zu tun.

ich bin aber lieder nicht siecher .

@+


Linuxmint 19.1 Tessa cinnamon & mageia 7 mate on ssd hp pavilion g7
Xubuntu 18.04 lts & 19.04 xfce on ASUS Rog STRIX

Offline

#10 2018-12-18 16:57:25

loutch
Member
Registered: 2015-12-12
Posts: 383

Re: [solved]conky and radiotray

hello

conky 1.09 hat selbe problem hat etwas zu tun mit wget

konsole gib das

Utilisation : wget [OPTION]... [URL]...

Utilisez « wget --help » pour obtenir plus de renseignements.
wget : URL manquante
Utilisation : wget [OPTION]... [URL]...

Utilisez « wget --help » pour obtenir plus de renseignements.

Um Theo bitten, das skript mit Lynx zu ändern

@+

edit

Selbe problem mit conky in Sarah

Last edited by loutch (2018-12-18 17:40:10)


Linuxmint 19.1 Tessa cinnamon & mageia 7 mate on ssd hp pavilion g7
Xubuntu 18.04 lts & 19.04 xfce on ASUS Rog STRIX

Offline

#11 2018-12-18 18:56:02

unklar
Member
Registered: 2015-10-31
Posts: 937

Re: [solved]conky and radiotray

@loutch, merci beaucoup ! J'ai envoyé l'"appel à l'aide" à @Teo.   wink

Offline

#12 2018-12-19 08:59:24

loutch
Member
Registered: 2015-12-12
Posts: 383

Re: [solved]conky and radiotray

Hello

ich habe angefagen mit lynx und ich habe eine pochette.png in meine radiotray Akte

#!bin/bash
#créé par loutch

 
titre=$(head -1 ~/.conky/radiotray/artiste_titre.txt)
lienMiniature=$(lynx -source 'Googlebot-Image/1.0' -qO - "www.google.fr/search?q=$titre\&tbm=isch" | perl -pe 's!.*?<img .*?src="([^"]*)".*!$1!') > pochette.png

problem mit das

lynx: Invalid Option: -qO
lynx: Invalid Option: -qO

Last edited by loutch (2018-12-19 16:17:41)


Linuxmint 19.1 Tessa cinnamon & mageia 7 mate on ssd hp pavilion g7
Xubuntu 18.04 lts & 19.04 xfce on ASUS Rog STRIX

Offline

#13 2018-12-19 16:20:46

loutch
Member
Registered: 2015-12-12
Posts: 383

Re: [solved]conky and radiotray

hello

Auf mageia5 geht noch der conky er muss swicher 45s und eine minut für das neue bild haben


Linuxmint 19.1 Tessa cinnamon & mageia 7 mate on ssd hp pavilion g7
Xubuntu 18.04 lts & 19.04 xfce on ASUS Rog STRIX

Offline

#14 2018-12-19 17:07:48

unklar
Member
Registered: 2015-10-31
Posts: 937

Re: [solved]conky and radiotray

@loutch, merci pour votre travail.  smile

Avec mageia5, je n'ai aucune difficulté. Cela fonctionne ici, comme prévu.

rpm -qa | grep wget
wget-1.15-5.4.mga5

dans bunsen est installé :

wget-1.18-5

attendre que Teo.

in siduction

apt policy wget
wget:
  Installiert:           1.20-1
  Installationskandidat: 1.20-1
  Versionstabelle:
 *** 1.20-1 500
        500 http://deb.debian.org/debian unstable/main amd64 Packages
        100 /var/lib/dpkg/status

Last edited by unklar (2018-12-19 18:23:41)

Offline

#15 2018-12-20 15:20:23

loutch
Member
Registered: 2015-12-12
Posts: 383

Re: [solved]conky and radiotray

hello unklar

schau hier

https://forums.bunsenlabs.org/viewtopic … 648#p79648


TEO war wieder erfolgreich, ich habe beide Skripte ausprobiert, sie funktionieren sehr gut auf meinem M5


@+


Linuxmint 19.1 Tessa cinnamon & mageia 7 mate on ssd hp pavilion g7
Xubuntu 18.04 lts & 19.04 xfce on ASUS Rog STRIX

Offline

Board footer

Powered by FluxBB