Go Back   Champions of Regnum > English > General discussion

General discussion Topics related to various aspects of Champions of Regnum

Reply
 
Thread Tools Display Modes
Old 11-16-2010, 10:43 AM   #31
Bruho82
Pledge
 
Bruho82's Avatar
 
Join Date: Jan 2009
Location: Russia, Kurgan
Posts: 5
Bruho82 is on a distinguished road
Default

Quote:
Originally Posted by Bruho View Post
There is remaded conky script (horizontal), thanx to Miraculix for the idea and to the author
http://img.flashtux.org/img132b72f1608ex55e6f95a.png

Code:
http://pastebin.com/2CMPPUsa
After updating the site script stopped working properly. Here, the corrected script:
http://tinypaste.com/d76f20
Bruho82 no ha iniciado sesión   Reply With Quote
Old 11-17-2010, 12:22 AM   #32
ov3rcl0ck
Apprentice
 
Join Date: Oct 2008
Posts: 72
ov3rcl0ck is on a distinguished road
Default

Quote:
Originally Posted by Bruho View Post
After updating the site script stopped working properly. Here, the corrected script:
http://tinypaste.com/d76f20
It'll just break again in a week... The war stats page changes weekly now.

Last edited by ov3rcl0ck; 11-17-2010 at 12:34 AM.
ov3rcl0ck no ha iniciado sesión   Reply With Quote
Old 11-17-2010, 11:39 PM   #33
Bruho82
Pledge
 
Bruho82's Avatar
 
Join Date: Jan 2009
Location: Russia, Kurgan
Posts: 5
Bruho82 is on a distinguished road
Default

Quote:
Originally Posted by ov3rcl0ck View Post
It'll just break again in a week... The war stats page changes weekly now.
a good idea to change the method of finding the right strings, the problem is that I do not know python
maybe XPath can help...
Bruho82 no ha iniciado sesión   Reply With Quote
Old 01-10-2011, 02:36 PM   #34
Miraculix
Count
 
Miraculix's Avatar
 
Join Date: Nov 2007
Location: Infinite Improbability Drive
Posts: 1,287
Miraculix will become famous soon enough
Default

I re-wrote the script from scratch to use Xia's JSON status API instead of the rankings page.

The status API:
http://rostatus.heroku.com/api

The new script:
http://pastebin.com/F1aZCG7p

It can probably be done a lot cleaner & in fewer lines, I just wrote this between coffee & lunch cause I wanted my conky status back
__________________
Hit me, nail me, make me God.
Panoramix :: Half Elf Hunter ## Miraculix :: Half Elf Marksman ## Aspirinix :: Wood Elf Conjurer
Syrtis :: Horus :: Antartes
Miraculix no ha iniciado sesión   Reply With Quote
Old 01-10-2011, 03:15 PM   #35
HidraA
Banned
 
Join Date: Dec 2009
Posts: 843
HidraA is an unknown quantity at this point
Default

Quote:
Originally Posted by Miraculix View Post
I re-wrote the script from scratch to use Xia's JSON status API instead of the rankings page.

The status API:
http://rostatus.heroku.com/api

The new script:
http://pastebin.com/F1aZCG7p

It can probably be done a lot cleaner & in fewer lines, I just wrote this between coffee & lunch cause I wanted my conky status back
So now difference is: if before line was readet from page by build in script of widget...now u use a server script what export all this line in JSON format(what is almoust symilar with xml).
If there is no update now:
-Server is down;
-Xia's server cant fetch data;
-Widget dosen't connect to xia server;
HidraA no ha iniciado sesión   Reply With Quote
Old 01-10-2011, 03:29 PM   #36
Miraculix
Count
 
Miraculix's Avatar
 
Join Date: Nov 2007
Location: Infinite Improbability Drive
Posts: 1,287
Miraculix will become famous soon enough
Default

Quote:
Originally Posted by HidraA View Post
So now difference is: if before line was readet from page by build in script of widget...now u use a server script what export all this line in JSON format(what is almoust symilar with xml).
If there is no update now:
-Server is down;
-Xia's server cant fetch data;
-Widget dosen't connect to xia server;
The difference is mostly that the previous script was parsing HTML which now because of "Top Player" rankings is broken.

I don't like parsing HTML so instead of fixing the previous script, I re-wrote it to use 1 line of JSON that Xia's server provides, much simpler.

If the information is not available to anyone, it does not matter what you are using (HTML, JSON, whatever), it will not display valid info. You cannot create information where it does not exist
__________________
Hit me, nail me, make me God.
Panoramix :: Half Elf Hunter ## Miraculix :: Half Elf Marksman ## Aspirinix :: Wood Elf Conjurer
Syrtis :: Horus :: Antartes
Miraculix no ha iniciado sesión   Reply With Quote
Old 01-11-2011, 10:58 AM   #37
Bruho82
Pledge
 
Bruho82's Avatar
 
Join Date: Jan 2009
Location: Russia, Kurgan
Posts: 5
Bruho82 is on a distinguished road
Default

Quote:
Originally Posted by Miraculix View Post
The difference is mostly that the previous script was parsing HTML which now because of "Top Player" rankings is broken.

I don't like parsing HTML so instead of fixing the previous script, I re-wrote it to use 1 line of JSON that Xia's server provides, much simpler.

If the information is not available to anyone, it does not matter what you are using (HTML, JSON, whatever), it will not display valid info. You cannot create information where it does not exist
Good job! I first heard about this API. This method is much simpler than parsing HTML.
Bruho82 no ha iniciado sesión   Reply With Quote
Old 01-12-2011, 06:21 PM   #38
Whitewolf91
Pledge
 
Join Date: Dec 2010
Posts: 1
Whitewolf91 is on a distinguished road
Default

is this program also available for the german server muspell?

or only ra and horus?
Whitewolf91 no ha iniciado sesión   Reply With Quote
Old 01-13-2011, 12:08 PM   #39
Miraculix
Count
 
Miraculix's Avatar
 
Join Date: Nov 2007
Location: Infinite Improbability Drive
Posts: 1,287
Miraculix will become famous soon enough
Default

Quote:
Originally Posted by Whitewolf91 View Post
is this program also available for the german server muspell?

or only ra and horus?
You can just change the word "horus" in my python script to "muspel", "niflheim" or whatever server you want, and it will work
__________________
Hit me, nail me, make me God.
Panoramix :: Half Elf Hunter ## Miraculix :: Half Elf Marksman ## Aspirinix :: Wood Elf Conjurer
Syrtis :: Horus :: Antartes
Miraculix no ha iniciado sesión   Reply With Quote
Old 04-29-2011, 11:42 PM   #40
Ashnurazg
Initiate
 
Ashnurazg's Avatar
 
Join Date: May 2010
Location: Europe, Germany
Posts: 128
Ashnurazg is on a distinguished road
Default

Blow away dust from this thread ...

I re-write Miraculix script: http://pastebin.com/PLr4ugg7
A more compact layout and adapt the new warzone mechanics (including passive realm status).

Feel free to customize it on your own needs.



PS: Default server at this script is muspell, oops.
Ashnurazg no ha iniciado sesión   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:52 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
NGD Studios 2002-2024 © All rights reserved