Verificar correo en Conky (Script)
2008 Junio 17
Si ustedes recuerdan el post que realize sobre mi archivo .conkyrc, este utilizaba un script en Python, el cual verificaba el correo electronico (utilizando Gmail), y mostraba en Conky, la cantidad de emails que tenemos para leer (en bandeja de entrada).
Ese script es el siguiente (no es de mi autoria, no recuerdo de donde lo saque).
El script en cuestión:
import os
import string
#Enter your username and password below within double quotes
# eg. username="username" and password="password"
username="USERNAME"
password="PASSWORD"
ttext=""
title=""
ntext=[]
nam=[]
mtext=[]
mes=[]
sum=[]
ema=[]
nom=""
tot=0
rtot=0
com="wget -O - https://"+username+":"+password+"
@mail.google.com/mail/feed/atom --no-check-certificate"
temp=os.popen(com)
msg=temp.read()
")<br /> index2=string.find(msg," index = string.find(msg,"")
title=msg[index+25:index2]
index=index2
index=string.find(msg,"")
index2=string.find(msg,"")
fc=msg[index+11:index2]
if(int(fc)>20):tot=20
else: tot=(int(fc))
rtot=tot
import os
import string
#Enter your username and password below within double quotes
# eg. username="username" and password="password"
username="USERNAME"
password="PASSWORD"
ttext=""
title=""
ntext=[]
nam=[]
mtext=[]
mes=[]
sum=[]
ema=[]
nom=""
tot=0
rtot=0
com="wget -O - https://"+username+":"
+password+"@mail.google.com/mail/feed/atom --no-check-certificate"
temp=os.popen(com)
msg=temp.read()
")<br /> index2=string.find(msg," index = string.find(msg,"")
title=msg[index+25:index2]
index=index2
index=string.find(msg,"")
index2=string.find(msg,"")
fc=msg[index+11:index2]
if(int(fc)>20):tot=20
else: tot=(int(fc))
rtot=tot
if (int(fc)==1):
print "You have "+fc+" new message\n"
elif rtot==0:
print "You have no new messages\n"
elif rtot>1:
print "You have "+fc+" new messages\n"
else:
print "ERROR!!!"
index=index2
i=-1
x=0
while index != -1:
i=i+1
",index)<br /> index2=string.find(msg,"
index=string.find(msg,"",index)


NO SE QUE ES ESTA PAGINA PERO SOLAMENTE PASABA A INVITARLOS PARA QUE VEAN LA MIA
http://www.reviviendobandas.wordpress.com
es de rock argentino
Tiene muy buena pinta el script, pero no consigo que me funcione, no se nada de python y al copiar el código no hacen mas que saltar errores, podría ponerlo en un documento para descargar?
Gracias!
pues ya que estamos…
jajaja
http://www.costarap.com