Ir al contenido principal

Ralsina.Me — El sitio web de Roberto Alsina

KRsN teaser number 4

Ok, so teas­er num­ber 3 was a long time ago ;-)

I just added web brows­ing ca­pa­bil­i­ties to it. Now, if you fol­low a link, it will open in KRsN's win­dow.

If you have KDE, it will soon open in an em­bed­ded kon­qy, but if you have Qt, it still dis­plays pages quite nice­ly, as shown here.

Ex­cept for the stylesheet, and some miss­ing im­ages, it looks al­most ok!

KRsN looking good

I left it work­ing and fetch­ing overnight, and it has­n't crashed. It even seems to have got all the items from about 12 feeds with­out prob­lems :-)

If any­one wants to give it a try, CVS from source­forge has all the stuff. It can't be in­stalled yet, though, just use it from its own fold­er.

Everything that happens has already happened

And some­one post­ed it on the in­ter­net.

So, the RSS date stuff I men­tioned? Mark Pil­gim al­ready fixed it with rss­find­er's parse_http_­date func­tion.

Ahh, the pleasure of coding.

And I mean it lit­er­al­ly this time.

I just had 6 hours of straight sol­id cod­ing (KRsN, if you are in­ter­est­ed), and I feel great.

I can't even re­mem­ber the last time I did this. But hey, at least now KRsN has a semi-de­cent da­ta han­dling, should­n't lock on the DB much (I still have some con­cept prob­lems there), and should pret­ty much work, as long as you don't take its mul­ti­thread­ing too se­ri­ous­ly.

And the real problem is...

That date pars­ing is aw­ful. Yes, I can just try strp­ti­me() with dif­fer­ent for­mats un­til one work­s, but look at this:

from time import *
strptime(strftime('%Z',localtime()),'%Z')
Traceback (most recent call last):
  File "stdin", line 1, in ?
ValueError: unconverted data remains: 'ART'

Now, what that is sup­posed to do, as far as I un­der­stand, is print my time­zone (that is the strf­time cal­l, it prints ART), and then parse it back (that is the strp­time cal­l, and it fail­s).

Maybe %Z is new... no, it is­nt. It is in the ref­er­ence guide for 2.2.2 (what I use).


Contents © 2000-2023 Roberto Alsina