maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   witter - a python twitter client (https://talk.maemo.org/showthread.php?t=35596)

ofels 2010-03-18 16:55

Re: witter - a python twitter client
 
Quote:

Originally Posted by dwould (Post 570916)
so for avatars...how often should they be re-downloaded? daily? weekly? would monthly be enough?
or would it be preferable to have a specific button to clear out saved ones and force redownload?

Looking at Thwirl and Mauku it seems it reflects avatar changes immediately with the next tweet. However I would make it configurable:
Next tweet and per minute/hour/day/...

dwould 2010-03-18 17:33

Re: witter - a python twitter client
 
Quote:

Originally Posted by ofels (Post 572155)
Looking at Thwirl and Mauku it seems it reflects avatar changes immediately with the next tweet. However I would make it configurable:
Next tweet and per minute/hour/day/...

The problem with 'configurable' is that it == more code which == more time required.

maybe I'm just over sensitive to the idea of pulling new images every time you do anything. I guess the cost isn't that much, but for someone roaming on 3g its a lot of needless data movement.
I'm thinking I might settle on weekly, but potentially update for anyone you @reply/mention on the basis that you are probably more interested in their stuff being up to date.

Ideally I'm looking for a strategy that will minimise wasted bandwidth, not require lots of code to implement, and keep people moderately up to date with avatars.

at the moment I just look for a file which is twitter_id.jpg and if it doesn't exist then download avatar pic and store it in file of twitter_id.jpg
this was nice and simple. I'm sure I can come up with something lightweight to compromise between the above factors.

ofels 2010-03-18 18:45

Re: witter - a python twitter client
 
Quote:

Originally Posted by dwould (Post 572200)

Ideally I'm looking for a strategy that will minimise wasted bandwidth, not require lots of code to implement, and keep people moderately up to date with avatars.

I am wondering how other apps handle this issue. I actually havenīt coped with the Twitter API but could imagine that there is a mean of detecting an avatar change.
On the other hand it might be that all apps just download the avatar each time together with the tweet.
Could be worth checking.

sondjata 2010-03-18 18:49

Re: witter - a python twitter client
 
Quote:

Originally Posted by dwould (Post 570970)
sorry, in theory the code in svn is easier than ever for an enthusiastic person to port back for n8*0, but I have little enough time for development as it is.

Somebody? Anybody? Please.

tywtyw2002 2010-03-20 16:16

Re: witter - a python twitter client
 
The witter has a bug. The one chinese word occupancy 3 word.
but in web twitter one chinese word only occupancy 1 word.
http://www.twitpic.com/19sisx this is website of twitter
http://www.twitpic.com/19sjmh witter
http://www.twitpic.com/19sjrk mukan

dwould 2010-03-20 18:36

Re: witter - a python twitter client
 
Quote:

Originally Posted by tywtyw2002 (Post 574865)
The witter has a bug. The one chinese word occupancy 3 word.
but in web twitter one chinese word only occupancy 1 word.
http://www.twitpic.com/19sisx this is website of twitter
http://www.twitpic.com/19sjmh witter
http://www.twitpic.com/19sjrk mukan

weird, witter just asks for the length of the string in the entry box. presumably gtk thinks it*'s three characters.
i was considering switching from a hard limit to a warned limit which would let you send and just get truncated if twitter doesn't like it.

do you have any experience coding for chinese characters? any special calculation to get the o****ing 'right'?

evil_m0nkey 2010-03-20 21:06

Re: witter - a python twitter client
 
whoa, okay i seem to have a bug.
my witter hasn't updated for quite a while. i still don't have avatars. I have 29 percent rootfs space, all my repositories are working fine, yet it won't update.

any idea guys??

evil_m0nkey 2010-03-20 21:13

Re: witter - a python twitter client
 
nevermind
i just skimmed and assumed there was sth wrong
my bad :P

tywtyw2002 2010-03-21 08:06

Re: witter - a python twitter client
 
Quote:

Originally Posted by dwould (Post 575024)
weird, witter just asks for the length of the string in the entry box. presumably gtk thinks it*'s three characters.
i was considering switching from a hard limit to a warned limit which would let you send and just get truncated if twitter doesn't like it.

do you have any experience coding for chinese characters? any special calculation to get the o****ing 'right'?

sorry i'm not understand the code of n900.
chinese characters in linux we always use utf8,
In website we use utf8 unicode and other china criterion.
i just know php, i can give you some code of php

$str = "我sadasdas" // this must use utf8 code .
for ($i=0 ; $i<strlen($str);$i++)
{
if(ord( $str{$i} )> 127)
{
$length++;
i++;
}else{
$length++;
}

}
echo $str." length is ".$length; //我sadasdas length is 9

dwould 2010-03-21 21:57

Re: witter - a python twitter client
 
witter 0.3.1 is now available in extras-devel.
see http://danielwould.wordpress.com/witter for details

tywtyw2002, I've not figured out anything yet, but I have made 140 a 'soft' limit so it might mean you can just submit wiht something witter things is much longer but which twitter will be fine with.


All times are GMT. The time now is 16:21.

vBulletin® Version 3.8.8