Auto reload webpage in Conky
Dear LQ members,
I have just install conky to my Linux Mint 9 system.I like to know if I can set up conky to auto reload a webpage.FYI, the webpage do not have rss feed therefore I cannot set conky to use rss.Any other method are appreciated to get conky to do as per my wish Thanks |
Quote:
What are you trying to do with yours? Do you have it set up to display part of a webpage? All the statistics I had on my old conky setup updated automatically, so either I'm misunderstanding what you're trying to do, what you're trying to do works differently to what I was doing, or you've messed up your ~/.conkyrc file :P |
Hi Snark1994,
I have set up my conky to display things like system name,kernel,cpu and ram usage and local ip.But I have seen others displaying things like songs details and web pages using conky.Therefore I would like to know the steps needed to display information from a webpage which automatically refresh at 5 mins interval.I will search again and paste the picture,this may help in understanding what I wanted By the way,my conky does not start automatically each time I start my pc.I do not know why,I have follow instructions from some other forum members but still not working.I will need to use terminal to call it out and each time the below error will appear in terminal oem@oem-desktop ~ $ conky Conky: forked to background, pid is 17876 oem@oem-desktop ~ $ Conky: desktop window (18000aa) is subwindow of root window (103) Conky: window type - normal Conky: drawing to created window (0x4000001) Conky: drawing to double buffer Appreciate all the help Thanks |
Quote:
Code:
${if_running rhythmbox} Quote:
Quote:
Quote:
|
Hi Snark1994,
Thank you for replying. I try pasting the below code into my conky and it is working well.A few problems that I have is that I cannot close rhythmbox even when I am not using due to conky.When I take away the code from conky,then I can close rhythmbox completely.Another problem is when rhythmbox is playing,terminal show errors as per attach file. ${if_running rhythmbox} Track:$alignr${exec rhythmbox-client --print-playing-format %tt --no-start} Artist:$alignr${exec rhythmbox-client --print-playing-format %ta --no-start} Album:$alignr${exec rhythmbox-client --print-playing-format %at --no-start} Time:$alignr${exec rhythmbox-client --print-playing-format "%te / %td" -- no-start} ${execbar ~/coding/bash/trackElapsed} $endif Ahhh... Are you just looking for a bit of the text, then? I thought you meant showing the webpage as you would see it in your browser. Displaying part of the text from a site could be done with a batch script - use "wget" to download the website's HTML, then you can do more processing on it with the rest of the script to get what you actually want. Then finally you can use the "exec" command in your .conkyrc to display the information in your conky. Yes,information I need is display as webpage but not all of them I need.There are only part of the information I want that hopefully can be display on conky with auto update interval of 5 mins.I do not know how to extrach the information as no knowledge of programming.Maybe if u can assist in the config and give me a step by step.Attach is link of the site http://www.onemotoring.com.sg/publis...ffic_news.html with screenshot of information I want. As for the start up after reboot,I have added the information in Start Up.Please refer attachment. Thank you |
Quote:
Quote:
Here it is, if you want it (I'm no bash expert, I dislike it as a language - in particular, this script has problems if the track is longer than 10 mins...): Code:
#!/bin/bash Quote:
Quote:
Okay, I've written something. However, I've discovered that you can't easily use conky to do what you want it to - it cuts off the output at a certain limit. So you can view the first couple of items, but not the entire list. Perhaps you need to find another programme which is designed for more heavy scripting? Anyway, I'll post what I wrote anyway, for you to see how it's done. It's written in Python v3, which you may have to install if you haven't done so already. It's not written in a brilliant way (or an ideal language for what it's doing), but was trying to make it as simple as possible so you could 'get' what it's doing. Here goes: Code:
#!/usr/bin/python3 Welp, we tried ;) |
Dear Snark1994,
I would wish to pick up that knowledge but just do not know where to start after extensive of searching in google. Code:
#!/usr/bin/python3 Welp, we tried ;)[/QUOTE] I have saved the script in my /oem/home/file.py but do I need to allow it to run as program in the permission? A big thanks to your help. :newbie: |
First, check if you have python by running '/usr/bin/python3'
If you get a shell prompt, then it's good, if it gives an error then you need to install python (just use 'sudo apt-get install python3'). Then you can either run 'python3 /path/to/file.py' (doesn't need executable permissions) or just '/path/to/file.py' (does need executable permissions). |
Dear Snark1994,
It is working. Thank you so much.Attach is a screenshot of the message.Which line do I have to change if I would like to display more than 3 lines of updates.Currently only 3 lines of updates appear, I like to have around 5-10 lines of updates.As u can see from the screenshots,conky appear big when displaying the message.Is there any way to make the message display within a standard size frame? Thanks |
Quote:
However, with regards to the second problem, that's just because you're sending very long lines of text to Conky, so it stretches the window to include the text. You can cut a line short using python by typing: Code:
lineOfText = lineOfText[:10] Sorry I couldn't be of more help :) |
Dear Snark1994,
Thanks for the reply and sorry that I have requested more from you. Anyway u have helped a lot. Thank you |
All times are GMT -5. The time now is 04:44 AM. |