request: howto create Desklet/Screenlet ? (eve online)

Questions about applications and software
Forum rules
Before you post please read how to get help
Level 1
Level 1
Posts: 10
Joined: Sun Nov 09, 2008 7:08 pm

request: howto create Desklet/Screenlet ? (eve online)

Postby molakay » Wed Nov 26, 2008 6:04 am

Hi and hello.

This is a real simple question really.. I have a conky script wich call's python script to check status of my EVE-online account. (sort of EVEmon for those who are familiar) Just in plain text.

Is it any "easy" way to put that into a desklet/screenlet ? Since i have the python scripts etc ?

Python script is making a xml file.. wich conky shows on desktop i assume..

It's a total of 6 python scripts who will get info from eve-online account. charname, race, skilltraining, wallet etc..

Here is an example of the skilltraining python script

Code: Select all

from xml.dom import minidom
import time
import datetime
import os

doc = minidom.parse("/home/"+os.environ["USERNAME"]+"/Conky/eve/skills.xml")
refdoc = minidom.parse("/home/"+os.environ["USERNAME"]+"/Conky/eve/skilltree.xml")

skillsInTraining = doc.getElementsByTagName("skillInTraining")[0].childNodes[0].nodeValue

def skilltimeleft(endtimestring):
   thistime =
   endtime = datetime.datetime.strptime(endtimestring, "%Y-%m-%d %H:%M:%S")
   timediff = endtime - thistime
   if endtime > thistime:
      weeksleft, daysleft = divmod(timediff.days, 7)
      minutesleft, secondsleft = divmod(timediff.seconds, 60)
      hoursleft, minutesleft = divmod(minutesleft, 60)
      return 0
   return "%dw %dd %dh %dm" % (weeksleft, daysleft, hoursleft, minutesleft)

def skillname(refid):
   found = False
   for refnode in refdoc.getElementsByTagName("row"):
      if refnode.hasChildNodes() == True and refnode.attributes.length == 3:
         if refnode.attributes.item(2).value == refid:
            found = True
            return refnode.attributes.item(0).value
            found = False
         found = False
   if found == False:
      return "unknown skill"

if int(skillsInTraining) > 0:
   if skilltimeleft(doc.getElementsByTagName("trainingEndTime")[0].childNodes[0].nodeValue) != 0:
      print skillsInTraining + " skill in training",
      print "(" + skillname(doc.getElementsByTagName("trainingTypeID")[0].childNodes[0].nodeValue),
      print "level",
      print doc.getElementsByTagName("trainingToLevel")[0].childNodes[0].nodeValue + ",",
      print skilltimeleft(doc.getElementsByTagName("trainingEndTime")[0].childNodes[0].nodeValue) + ")",
      print "0 skills in training"
   print "0 skills in training",

And here is the xml file

Code: Select all

<?xml version='1.0' encoding='UTF-8'?>

<eveapi version="2">

  <currentTime>2008-11-10 20:20:55</currentTime>


    <currentTQTime offset="0">2008-11-10 20:20:55</currentTQTime>

    <trainingEndTime>2008-11-23 16:04:26</trainingEndTime>

    <trainingStartTime>2008-11-07 00:56:08</trainingStartTime>







  <cachedUntil>2008-11-10 20:30:30</cachedUntil>



Re: request: howto create Desklet/Screenlet ? (eve online)

Postby zebra9000 » Fri Nov 28, 2008 1:25 am

install wine doors or use pkg mgr, or search google install> " EDESKLETS " maby they will help..they work on my mint..

Return to “Software & Applications”

Who is online

Users browsing this forum: slinger1953, xSlart01x and 7 guests